mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Merge branch 'homelab'
This commit is contained in:
commit
8bbe4f9a6c
26 changed files with 767 additions and 237 deletions
121
hosts/muho/configuration.nix
Normal file
121
hosts/muho/configuration.nix
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
{ config, lib, pkgs, inputs, system, ... }:
|
||||
let cfg = config.mods;
|
||||
|
||||
in {
|
||||
# Hardware
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
environment.systemPackages = with inputs.nix-alien.packages.${system};
|
||||
[ nix-alien ];
|
||||
|
||||
# System
|
||||
mods.user.name = "muon";
|
||||
networking.hostName = "muho";
|
||||
networking.hostId = "56e55e83";
|
||||
mods.home.file = ./home.nix;
|
||||
|
||||
# Modules
|
||||
mods.desktop.enable = true;
|
||||
mods.desktop.gaming.enable = true;
|
||||
mods.boot.enable = true;
|
||||
|
||||
mods.theme.enable = true;
|
||||
mods.theme.scheme = "woodland";
|
||||
|
||||
mods.server.media.enable = true;
|
||||
|
||||
mods.server.search.enable = true;
|
||||
|
||||
mods.tailscale.enable = true;
|
||||
mods.wireguard.id = 3;
|
||||
|
||||
services.xserver.windowManager.i3.enable = true;
|
||||
|
||||
# Proprietary </3
|
||||
mods.unfree.steam.enable = true;
|
||||
mods.unfree.nvidia.enable = false;
|
||||
mods.unfree.minecraft.enable = true;
|
||||
|
||||
# Hardware preferences
|
||||
|
||||
## Mouse
|
||||
services.libinput.mouse.accelProfile = "flat";
|
||||
|
||||
## Monitors
|
||||
mods.monitors = {
|
||||
primary = {
|
||||
name = "DVI-I-1";
|
||||
config = {
|
||||
enable = true;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
primary = true;
|
||||
rate = "59.93";
|
||||
};
|
||||
};
|
||||
secondary = {
|
||||
name = "HDMI-1";
|
||||
config = {
|
||||
enable = true;
|
||||
mode = "1280x768";
|
||||
position = "1920x312";
|
||||
rate = "59.99";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.extraInit = ''
|
||||
xset s off -dpms
|
||||
'';
|
||||
|
||||
## GPU (AMD Radeon 7950)
|
||||
## https://wiki.nixos.org/wiki/AMD_GPU
|
||||
boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ];
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
## GPU (NVidia GTX 1060)
|
||||
## https://nixos.wiki/wiki/Nvidia
|
||||
# Enable OpenGL
|
||||
# hardware.graphics = { enable = true; };
|
||||
|
||||
# # Load nvidia driver for Xorg and Wayland
|
||||
# services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
# hardware.nvidia = {
|
||||
|
||||
# # Modesetting is required.
|
||||
# modesetting.enable = true;
|
||||
|
||||
# # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# # Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# # of just the bare essentials.
|
||||
# powerManagement.enable = false;
|
||||
|
||||
# # Fine-grained power management. Turns off GPU when not in use.
|
||||
# # Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
# powerManagement.finegrained = false;
|
||||
|
||||
# # Use the NVidia open source kernel module (not to be confused with the
|
||||
# # independent third-party "nouveau" open source driver).
|
||||
# # Support is limited to the Turing and later architectures. Full list of
|
||||
# # supported GPUs is at:
|
||||
# # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# # Only available from driver 515.43.04+
|
||||
# # Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
# open = false;
|
||||
|
||||
# # Enable the Nvidia settings menu,
|
||||
# # accessible via `nvidia-settings`.
|
||||
# nvidiaSettings = true;
|
||||
|
||||
# # Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
# };
|
||||
|
||||
# Version of first install
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
52
hosts/muho/hardware-configuration.nix
Normal file
52
hosts/muho/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.supportedFilesystems = [ "zfs" "ntfs" ];
|
||||
services.zfs.autoScrub.enable = true;
|
||||
services.zfs.autoSnapshot.enable = true;
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/034b9530-2c01-4108-9dbb-44557eddf6d5";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/9D45-AA14";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
fileSystems."/storage0" = {
|
||||
device = "storage0";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/storage1" = {
|
||||
device = "storage1";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/f7ce07eb-563c-4c65-b465-b6c1ab88aede"; }];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
62
hosts/muho/home.nix
Normal file
62
hosts/muho/home.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ pkgs, lib, osConfig, ... }:
|
||||
let cfg = osConfig.mods;
|
||||
in {
|
||||
# Modules
|
||||
mods.xdg.enable = true;
|
||||
mods.social.enable = true;
|
||||
mods.i3.enable = true;
|
||||
mods.terminal.zsh.enable = true;
|
||||
mods.terminal.emulator.enable = true;
|
||||
mods.terminal.development.enable = true;
|
||||
mods.terminal.tools.enable = true;
|
||||
mods.desktop.development.enable = true;
|
||||
mods.desktop.productivity.enable = true;
|
||||
mods.desktop.media.enable = true;
|
||||
|
||||
# Hardware preferences
|
||||
|
||||
## Monitors
|
||||
xsession.windowManager.i3.config.workspaceOutputAssign = [
|
||||
{
|
||||
workspace = "1";
|
||||
output = "${cfg.monitors.primary.name}";
|
||||
}
|
||||
{
|
||||
workspace = "2";
|
||||
output = "${cfg.monitors.secondary.name}";
|
||||
}
|
||||
];
|
||||
services.autorandr.enable = true;
|
||||
programs.autorandr = {
|
||||
enable = true;
|
||||
hooks.postswitch = {
|
||||
"notify-i3" = "${pkgs.i3}/bin/i3-msg restart";
|
||||
"set-wallpaper" = ''
|
||||
${lib.getExe pkgs.feh} --bg-fill --nofehbg ${./wallpaper.png}
|
||||
'';
|
||||
};
|
||||
profiles.default = {
|
||||
fingerprint = {
|
||||
"${cfg.monitors.primary.name}" =
|
||||
"00ffffffffffff004c2d850433324d431a120103803420782aee91a3544c99260f5054bfef80714f8100814081809500a940b30001011a3680a070381f403020350006202000001a000000fd00384b1e5111000a202020202020000000fc0053796e634d61737465720a2020000000ff004831414b3530303030300a202000e9";
|
||||
"${cfg.monitors.secondary.name}" =
|
||||
"00ffffffffffff00410cca140101010134100103804728788a288e9e5548972416484badce0031594559615981800101010101010101a91a00a05000163030203700c48e21000018662150b051001b3040703600c48e21000018000000fc005068696c697073545620283529000000fd002f551f500e000a2020202020200156020323714f930414051f10121103020116150706230907078301000066030c00100080011d00bc52d01e20b8285540c48e2100001a011d007251d01e206e285500c48e2100001e011d80d0721c1620102c2580c48e2100009e011d8018711c1620582c2500c48e2100009ef33980d072382d40102c4580c48e2100001e0000f2";
|
||||
};
|
||||
config = {
|
||||
"${cfg.monitors.primary.name}" = cfg.monitors.primary.config;
|
||||
"${cfg.monitors.secondary.name}" = cfg.monitors.secondary.config;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# wayland.windowManager.hyprland.settings = {
|
||||
# monitor = [
|
||||
# "DP-2,2560x1440@144,0x480,1"
|
||||
# "HDMI-A-2,1920x1080,2560x0,1,transform,3"
|
||||
# ];
|
||||
# input.sensitivity = -0.4;
|
||||
# };
|
||||
|
||||
# Version of first install
|
||||
home.stateVersion = "23.05";
|
||||
}
|
||||
BIN
hosts/muho/wallpaper.png
Normal file
BIN
hosts/muho/wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 283 KiB |
Loading…
Add table
Add a link
Reference in a new issue