diff --git a/home/base/default.nix b/home/base/default.nix index 248bf314..c55a20ff 100644 --- a/home/base/default.nix +++ b/home/base/default.nix @@ -1,9 +1,9 @@ -{ inputs, pkgs, ... }: { - imports = with inputs.self.homeManagerModules; [ - tmpfs-as-home +{ pkgs, ... }: { + imports = [ + ../tmpfs-as-home.nix ./zsh ./tealdeer.nix - neovim + ../neovim ]; xdg.enable = true; diff --git a/hosts/burner/default.nix b/hosts/burner/default.nix index 5d64581c..8f39fa45 100644 --- a/hosts/burner/default.nix +++ b/hosts/burner/default.nix @@ -1,18 +1,17 @@ # configuration for ctfvm -{ config, lib, pkgs, inputs, ... }: +{ config, lib, pkgs, ... }: let inherit (lib) mkForce; - inherit (inputs) self; in { networking.hostName = "burner"; - imports = with self.nixosModules; [ - base - sshd - libvirt-vm - hacking + imports = [ + ../../modules/base + ../../modules/sshd.nix + ../../modules/libvirt-vm + ../../modules/hacking.nix ]; modules.libvirt-vm = { @@ -175,8 +174,8 @@ in }; home-manager.users.user = { - imports = with self.homeManagerModules; [ - hacking + imports = [ + ../../home/hacking ]; }; diff --git a/hosts/noguchi-pc/default.nix b/hosts/noguchi-pc/default.nix index b744f823..bb6eab36 100644 --- a/hosts/noguchi-pc/default.nix +++ b/hosts/noguchi-pc/default.nix @@ -1,30 +1,29 @@ # configuration for noguchi-pc -{ config, lib, inputs, pkgs, ... }: +{ config, lib, pkgs, ... }: let - inherit (inputs) self nixos-hardware; inherit (lib) mkAfter; in { networking.hostName = "noguchi-pc"; - imports = with self.nixosModules; [ - agenix - base - grub-secureboot # workaround for buggy firmware - ssd - workstation - sway-desktop - vmm - btrfs-maintenance - nix-maintenance - zswap - bluetooth - hacking - - profiles-laptop - profiles-intel-cpu - profiles-intel-wifi + imports = [ + ../../modules/agenix.nix + ../../modules/base + ../../modules/grub-secureboot + ../../modules/ssd.nix + ../../modules/workstation + ../../modules/sway-desktop.nix + ../../modules/vmm.nix + ../../modules/btrfs-maintenance + ../../modules/nix-maintenance + ../../modules/zswap.nix + ../../modules/bluetooth.nix + ../../modules/hacking.nix + + ../../modules/profiles/laptop.nix + ../../modules/profiles/intel-cpu.nix + ../../modules/profiles/intel-wifi.nix ]; # hardware configuration @@ -111,11 +110,11 @@ in users.users.user.hashedPasswordFile = config.age.secrets.user-password-hash-noguchi-pc.path; home-manager.users.user = { - imports = with self.homeManagerModules; [ - workstation - sway-desktop - hacking - vmm + imports = [ + ../../home/workstation + ../../home/sway-desktop + ../../home/hacking + ../../home/vmm.nix ]; }; diff --git a/hosts/peregrine/default.nix b/hosts/peregrine/default.nix index d175014f..ef4862ff 100644 --- a/hosts/peregrine/default.nix +++ b/hosts/peregrine/default.nix @@ -1,33 +1,30 @@ # configuration for peregrine { config, lib, pkgs, inputs, ... }: -let - inherit (inputs) self nixos-hardware; -in { networking.hostName = "peregrine"; - imports = with self.nixosModules; with nixos-hardware.nixosModules; [ - agenix - base - grub-secureboot - ssd - sshd - workstation - sway-desktop - undervolt - nm-config-home - vmm - btrfs-maintenance - nix-maintenance - zswap - bluetooth - hacking - - profiles-laptop + imports = with inputs.nixos-hardware.nixosModules; [ + ../../modules/agenix.nix + ../../modules/base + ../../modules/grub-secureboot + ../../modules/ssd.nix + ../../modules/sshd.nix + ../../modules/workstation + ../../modules/sway-desktop.nix + ../../modules/undervolt.nix + ../../modules/nm-config-home.nix + ../../modules/vmm.nix + ../../modules/btrfs-maintenance + ../../modules/nix-maintenance + ../../modules/zswap.nix + ../../modules/bluetooth.nix + ../../modules/hacking.nix + + ../../modules/profiles/laptop.nix common-pc-laptop-acpi_call - profiles-intel-cpu - profiles-intel-wifi + ../../modules/profiles/intel-cpu.nix + ../../modules/profiles/intel-wifi.nix ]; # hardware configuration @@ -116,11 +113,11 @@ in users.users.user.hashedPasswordFile = config.age.secrets.user-password-hash-peregrine.path; home-manager.users.user = { - imports = with self.homeManagerModules; [ - workstation - sway-desktop - hacking - vmm + imports = [ + ../../home/workstation + ../../home/sway-desktop + ../../home/hacking + ../../home/vmm.nix ]; }; diff --git a/hosts/rednecked/default.nix b/hosts/rednecked/default.nix index 7be6b034..d8ac0a7a 100644 --- a/hosts/rednecked/default.nix +++ b/hosts/rednecked/default.nix @@ -2,18 +2,17 @@ { inputs, lib, ... }: let - inherit (inputs) self nixos-hardware; inherit (lib) mkDefault; in { - imports = with self.nixosModules; with nixos-hardware.nixosModules; [ - agenix - base - ssd - sshd - btrfs-maintenance - nix-maintenance - zswap + imports = with inputs.nixos-hardware.nixosModules; [ + ../../modules/agenix.nix + ../../modules/base + ../../modules/ssd.nix + ../../modules/sshd.nix + ../../modules/btrfs-maintenance + ../../modules/nix-maintenance + ../../modules/zswap.nix common-pc common-cpu-amd #common-cpu-amd-pstate zen2 onward diff --git a/hosts/rednecked/test-vm.nix b/hosts/rednecked/test-vm.nix index 6fce92ec..47bde608 100644 --- a/hosts/rednecked/test-vm.nix +++ b/hosts/rednecked/test-vm.nix @@ -1,11 +1,10 @@ -{ config, pkgs, inputs, lib, ... }: +{ config, pkgs, lib, ... }: let - inherit (inputs) self; inherit (lib) mkForce; in { - imports = with self.nixosModules; [ - libvirt-vm + imports = [ + ../../modules/libvirt-vm ]; modules.libvirt-vm = { diff --git a/hosts/rednecked/user.nix b/hosts/rednecked/user.nix index f9a2d5f9..6c336630 100644 --- a/hosts/rednecked/user.nix +++ b/hosts/rednecked/user.nix @@ -8,7 +8,7 @@ in users.users.user.hashedPasswordFile = config.age.secrets.user-password-hash-rednecked.path; # home-manager.users.user = { - # imports = with self.homeManagerModules; [ + # imports = [ # ]; # }; } diff --git a/modules/base/default.nix b/modules/base/default.nix index 462a24a0..5ce2b4ff 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -3,12 +3,12 @@ { config, lib, pkgs, utils, inputs, ... }: let inherit (lib) mapAttrs filterAttrs mapAttrsToList mkIf types mkOption; - inherit (inputs) self agenix home-manager; + inherit (inputs) self home-manager; in { - imports = with self.nixosModules; [ + imports = [ home-manager.nixosModule - tmpfs-as-root + ../tmpfs-as-root.nix ]; options.modules.base.pythonPackages = mkOption { @@ -110,9 +110,9 @@ in # install per-user packages to /etc/profiles to make nixos-rebuild build-vm work useUserPackages = true; users.user = { - imports = with self.homeManagerModules; [ - nixos - base + imports = [ + ../../home/nixos.nix + ../../home/base ]; }; extraSpecialArgs = { diff --git a/modules/sway-desktop.nix b/modules/sway-desktop.nix index 5e938a1f..9d4f8b29 100644 --- a/modules/sway-desktop.nix +++ b/modules/sway-desktop.nix @@ -1,5 +1,5 @@ # sway + greetd -{ inputs, config, pkgs, lib, ... }: +{ config, pkgs, lib, ... }: { # Sway wayland tiling compositor programs.sway = { @@ -80,9 +80,9 @@ nix.settings.allowed-users = [ "greeter" ]; home-manager.users.greeter = { - imports = with inputs.self.homeManagerModules; [ - nixos - theming + imports = [ + ../home/nixos.nix + ../home/theming ]; }; diff --git a/modules/workstation/default.nix b/modules/workstation/default.nix index c2f2426c..6d63e176 100644 --- a/modules/workstation/default.nix +++ b/modules/workstation/default.nix @@ -1,9 +1,9 @@ -{ inputs, config, pkgs, lib, ... }: +{ config, pkgs, lib, ... }: let inherit (lib.ngkz) rot13; in { - imports = with inputs.self.nixosModules; [ + imports = [ ./printing.nix ./network-manager ./gpg.nix