nix-configs

Personal NixOS and home-manager configuration files
Log | Files | Refs

commit f3bdfcd1eb0e28ce4a13a1746e4b3093bd2b9bde
parent 00a68c3e9eb27993c6d7c1d9f1b294bcc3f6c8cf
Author: breadcat <breadcat@users.noreply.github.com>
Date:   Sun, 24 Aug 2025 12:55:48 +0100

Merge hardware and machine files

Diffstat:
Dmachines/arcadia-hardware.nix | 24------------------------
Mmachines/arcadia.nix | 53+++++++++++++++++++++++++++++++----------------------
Dmachines/artemis-hardware.nix | 23-----------------------
Mmachines/artemis.nix | 98++++++++++++++++++++++++++++++++++++++++---------------------------------------
Dmachines/ilias-hardware.nix | 28----------------------------
Mmachines/ilias.nix | 85++++++++++++++++++++++++++++++++++++++++++++-----------------------------------
Dmachines/minerva-hardware.nix | 25-------------------------
Mmachines/minerva.nix | 95++++++++++++++++++++++++++++++++++++++++++-------------------------------------
8 files changed, 178 insertions(+), 253 deletions(-)

diff --git a/machines/arcadia-hardware.nix b/machines/arcadia-hardware.nix @@ -1,24 +0,0 @@ -{ config, lib, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - # Bootloader - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # Networking, use DHCP - networking.networkmanager.enable = true; - networking.useDHCP = lib.mkDefault true; - -} diff --git a/machines/arcadia.nix b/machines/arcadia.nix @@ -1,17 +1,14 @@ # HTPC -{ config, pkgs, domain, machine, username, fullname, sshkey, sshport, timezone, privatekey, ... }: +{ config, pkgs, lib, domain, machine, username, fullname, sshkey, sshport, timezone, privatekey, ... }: let home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz; # stable - # home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/master.tar.gz; # unstable in { - # Common OS imports imports = [ - ./${machine}-hardware.nix # Include the results of the hardware scan. (import "${home-manager}/nixos") # Home-Manager ../common/audio.nix (import ../common/autologin.nix {inherit username;}) @@ -28,10 +25,9 @@ in (import ../common/user.nix {inherit config pkgs username fullname;}) ../scripts/htpc-launcher.nix ]; - - # Home-Manager - home-manager.backupFileExtension = "hm-bak"; - home-manager.users.${username} = { pkgs, ... }: { + home-manager = { + backupFileExtension = "hm-bak"; + users.${username} = { pkgs, ... }: { imports = [ (import ../home/fish.nix {inherit pkgs domain;}) ../home/ghostty.nix @@ -39,25 +35,38 @@ in (import ../home/kodi.nix {inherit username;}) (import ../home/ssh.nix {inherit domain username sshport privatekey;}) ]; - - # The state version is required and should stay at the version you - # originally installed. home.stateVersion = "24.11"; + }; }; - # Hostname - networking.hostName = "arcadia"; # Define your hostname. - - # Hardware acceleration - hardware.graphics = { - enable = true; - extraPackages = with pkgs; [ - intel-media-driver - libvdpau-va-gl - vaapiIntel - ]; + # Hardware and system + boot = { + initrd = { + availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + kernelModules = [ ]; + }; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + }; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware = { + cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + graphics = { + enable = true; + extraPackages = with pkgs; [ intel-media-driver libvdpau-va-gl vaapiIntel ]; + }; }; + # Networking + networking = { + hostName = "arcadia"; + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + }; system.stateVersion = "24.11"; diff --git a/machines/artemis-hardware.nix b/machines/artemis-hardware.nix @@ -1,23 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; - - # Bootloader - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # Networking, use DHCP - networking.useDHCP = lib.mkDefault true; - # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - -} diff --git a/machines/artemis.nix b/machines/artemis.nix @@ -1,65 +1,65 @@ # Server + +{ config, pkgs, lib, machine, username, email, fullname, domain, sshkey, sshport, timezone, htpasswd, todosecret, vpnusername, vpnpassword, privatekey, ... }: + +let + home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz; +in + { - config, - pkgs, - machine, - username, - email, - fullname, - domain, - sshkey, - sshport, - timezone, - htpasswd, - todosecret, - vpnusername, - vpnpassword, - privatekey, - ... -}: let - home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz; # Stable - # home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/master.tar.gz; # Unstable -in { - # Core OS imports - imports = - [ - ./${machine}-hardware.nix # Include the results of the hardware scan. - (import "${home-manager}/nixos") # Home-Manager - (import ../common/blog-duolingo.nix {inherit pkgs domain username;}) - (import ../common/blog-status.nix {inherit pkgs domain username;}) + imports = [ + (import "${home-manager}/nixos") + (import ../scripts/blog-duolingo.nix {inherit pkgs domain username;}) + (import ../scripts/blog-status.nix {inherit pkgs domain;}) (import ../common/docker.nix {inherit config pkgs username domain timezone htpasswd todosecret vpnusername vpnpassword;}) ../common/flakes.nix ../common/garbage.nix (import ../common/locale.nix {inherit pkgs timezone;}) - (import ../common/magnets.nix {inherit pkgs username;}) + (import ../scripts/magnets.nix {inherit pkgs;}) ../common/mount-drives.nix ../common/packages.nix - (import ../common/restic.nix {inherit pkgs username;}) + (import ../scripts/restic.nix {inherit pkgs;}) (import ../common/ssh.nix {inherit username sshkey sshport;}) (import ../common/syncthing.nix {inherit config pkgs username;}) (import ../common/user.nix {inherit config pkgs username fullname;}) ../common/vnstat.nix - (import ../common/stagit-generate.nix {inherit pkgs username;}) - ]; - - # Home-Manager - home-manager.backupFileExtension = "hm-bak"; - home-manager.users.${username} = {pkgs, ...}: { - imports = [ - (import ../home/fish.nix {inherit pkgs domain;}) - (import ../home/git.nix {inherit fullname email;}) - ../home/htop.nix - ../home/neovim.nix - (import ../home/rbw.nix {inherit pkgs domain email;}) - (import ../home/rclone.nix {inherit domain username sshport privatekey;}) - (import ../home/ssh.nix {inherit domain username sshport privatekey;}) - ]; - home.stateVersion = "25.05"; + (import ../scripts/stagit-generate.nix {inherit pkgs;}) + ]; + home-manager = { + backupFileExtension = "hm-bak"; + users.${username} = {pkgs, ...}: { + imports = [ + (import ../home/fish.nix {inherit pkgs domain;}) + (import ../home/git.nix {inherit fullname email;}) + ../home/htop.nix + ../home/neovim.nix + (import ../home/rbw.nix {inherit pkgs domain email;}) + (import ../home/rclone.nix {inherit domain username sshport privatekey;}) + (import ../home/ssh.nix {inherit domain username sshport privatekey;}) + ]; + home.stateVersion = "25.05"; + }; }; - networking.hostName = "artemis"; # Define your hostname. + # Hardware and system + boot = { + initrd = { + availableKernelModules = [ "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" ]; + kernelModules = [ ]; + }; + kernelModules = [ ]; + extraModulePackages = [ ]; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + }; + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; + networking = { + hostName = "artemis"; + useDHCP = lib.mkDefault true; + }; - system.stateVersion = "25.05"; # Did you read the comment? # Cron jobs services.cron = { enable = true; @@ -72,5 +72,6 @@ in { ]; }; + system.stateVersion = "25.05"; # Did you read the comment? -} +} +\ No newline at end of file diff --git a/machines/ilias-hardware.nix b/machines/ilias-hardware.nix @@ -1,28 +0,0 @@ -{ config, lib, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - swapDevices = - [ { device = "/dev/disk/by-uuid/3397e636-91db-44ae-9572-923e4b3acbbe"; } - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - # Bootloader - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # Networking, use DHCP - networking.networkmanager.enable = true; - networking.useDHCP = lib.mkDefault true; - -} diff --git a/machines/ilias.nix b/machines/ilias.nix @@ -1,37 +1,24 @@ # NAS -{ - config, - pkgs, - machine, - username, - email, - fullname, - domain, - sshkey, - sshport, - timezone, - privatekey, - ... -}: let - # home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz; # Stable + +{ config, pkgs, lib, machine, username, email, fullname, domain, sshkey, sshport, timezone, privatekey, ... }: + +let home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/master.tar.gz; # Unstable in { - # Core OS imports imports = [ - ./${machine}-hardware.nix # Include the results of the hardware scan. - (import "${home-manager}/nixos") # Home-Manager + (import "${home-manager}/nixos") ../common/flakes.nix ../common/garbage.nix (import ../common/locale.nix {inherit pkgs timezone;}) ../common/mount-drives.nix ../common/nfs-server.nix ../common/packages.nix - (import ../common/restic.nix {inherit pkgs username;}) + (import ../scripts/restic.nix {inherit pkgs;}) (import ../common/ssh-tunnel.nix {inherit config pkgs username domain sshport privatekey;}) (import ../common/ssh.nix {inherit username sshkey sshport;}) (import ../common/syncthing.nix {inherit config pkgs username;}) - (import ../common/tank-log.nix {inherit pkgs username;}) - (import ../common/tank-sort.nix {inherit pkgs username;}) + (import ../scripts/tank-log.nix {inherit pkgs username;}) + (import ../scripts/tank-sort.nix {inherit pkgs username;}) (import ../common/user.nix {inherit config pkgs username fullname;}) (import ../scripts/audiobook-cleaner.nix {inherit pkgs domain;}) ../scripts/backup-local.nix @@ -50,26 +37,48 @@ in { ../scripts/watchedlist.nix ../scripts/youtube-id-rss.nix ]; + home-manager = { + backupFileExtension = "hm-bak"; + users.${username} = {pkgs, ...}: { + imports = [ + (import ../home/fish.nix {inherit pkgs domain;}) + (import ../home/git.nix {inherit fullname email;}) + ../home/htop.nix + ../home/iamb.nix + ../home/neovim.nix + (import ../home/rbw.nix {inherit pkgs domain email;}) + (import ../home/rclone.nix {inherit domain username sshport privatekey;}) + (import ../home/ssh.nix {inherit domain username sshport privatekey;}) + ]; + home.stateVersion = "24.11"; + }; + }; - # Home-Manager - home-manager.backupFileExtension = "hm-bak"; - home-manager.users.${username} = {pkgs, ...}: { - imports = [ - (import ../home/fish.nix {inherit pkgs domain;}) - (import ../home/git.nix {inherit fullname email;}) - ../home/htop.nix - ../home/neovim.nix - (import ../home/rbw.nix {inherit pkgs domain email;}) - (import ../home/rclone.nix {inherit domain username sshport privatekey;}) - (import ../home/ssh.nix {inherit domain username sshport privatekey;}) - ]; - # The state version is required and should stay at the version you - # originally installed. - home.stateVersion = "24.11"; + # Hardware and system + boot = { + initrd = { + availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; + kernelModules = [ ]; + }; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; }; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + swapDevices = [ + { device = "/dev/disk/by-uuid/3397e636-91db-44ae-9572-923e4b3acbbe"; } + ]; - # Hostname - networking.hostName = "ilias"; # Define your hostname. + # Networking + networking = { + hostName = "ilias"; + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + }; # Cron jobs services = { diff --git a/machines/minerva-hardware.nix b/machines/minerva-hardware.nix @@ -1,25 +0,0 @@ -{ config, lib, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - # Bootloader - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; - boot.loader.grub.useOSProber = true; - - # Networking, use DHCP - networking.networkmanager.enable = true; - networking.useDHCP = lib.mkDefault true; - -} diff --git a/machines/minerva.nix b/machines/minerva.nix @@ -1,25 +1,12 @@ # Laptop -{ - config, - pkgs, - machine, - username, - fullname, - domain, - email, - sshkey, - timezone, - sshport, - privatekey, - ... -}: let - # home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz; + +{ config, pkgs, lib, machine, username, fullname, domain, email, sshkey, timezone, sshport, privatekey, ... }: + +let home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/master.tar.gz; in { - # Core OS imports imports = [ - ./${machine}-hardware.nix # Include the results of the hardware scan. - (import "${home-manager}/nixos") # Home-Manager + (import "${home-manager}/nixos") ../common/audio.nix (import ../common/autologin.nix {inherit username;}) ../common/flakes.nix @@ -30,42 +17,61 @@ in { ../common/mount-drives.nix ../common/nfs.nix ../common/packages.nix - (import ../common/restic.nix {inherit pkgs username;}) (import ../common/ssh.nix {inherit username sshkey sshport;}) (import ../common/syncthing.nix {inherit config pkgs username;}) (import ../common/user.nix {inherit config pkgs username fullname;}) (import ../common/ydotool.nix {inherit pkgs username;}) ../scripts/ctimerename.nix ../scripts/duupmove.nix + (import ../scripts/restic.nix {inherit pkgs;}) ]; + home-manager = { + backupFileExtension = "hm-bak"; + users.${username} = {pkgs, ...}: { + imports = [ + ../home/cursor.nix + ../home/firefox.nix + (import ../home/fish.nix {inherit pkgs domain;}) + ../home/ghostty.nix + (import ../home/git.nix {inherit fullname email;}) + ../home/htop.nix + ../home/hyprland.nix + ../home/iamb.nix + ../home/lf.nix + ../home/mpv.nix + ../home/neovim.nix + (import ../home/newsboat.nix {inherit pkgs domain username;}) + (import ../home/rbw.nix {inherit pkgs domain email;}) + (import ../home/ssh.nix {inherit domain username sshport privatekey;}) + ../home/tofi.nix + ]; + home.stateVersion = "24.11"; + }; + }; - # Home-Manager - home-manager.backupFileExtension = "hm-bak"; - home-manager.users.${username} = {pkgs, ...}: { - imports = [ - ../home/cursor.nix - ../home/firefox.nix - (import ../home/fish.nix {inherit pkgs domain;}) - ../home/ghostty.nix - (import ../home/git.nix {inherit fullname email;}) - ../home/htop.nix - # ../home/iamb.nix - ../home/hyprland.nix - ../home/lf.nix - ../home/mpv.nix - ../home/neovim.nix - (import ../home/newsboat.nix {inherit pkgs domain username;}) - (import ../home/rbw.nix {inherit pkgs domain email;}) - (import ../home/ssh.nix {inherit domain username sshport privatekey;}) - ../home/tofi.nix - ]; - # The state version is required and should stay at the version you - # originally installed. - home.stateVersion = "24.11"; + # Hardware and system + boot = { + initrd = { + availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; + kernelModules = [ ]; + }; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + loader.grub = { + enable = true; + device = "/dev/sda"; + useOSProber = true; + }; }; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - # Hostname - networking.hostName = "minerva"; # Define your hostname. + # Networking + networking = { + hostName = "minerva"; + networkmanager.enable = true; + useDHCP = lib.mkDefault true; + }; # Packages environment.systemPackages = with pkgs; [ @@ -93,6 +99,5 @@ in { yt-dlp ]; - system.stateVersion = "24.11"; # Did you read the comment? }