refactor: simplify hosts files

This commit is contained in:
2026-01-17 19:37:05 +01:00
parent 35fd4e61e2
commit bb6a380599
6 changed files with 61 additions and 85 deletions

View File

@@ -6,21 +6,19 @@
pkgs,
...
}:
let
username = "h";
hostName = "vm";
in
{
imports = [
../../modules/common
inputs.disko.nixosModules.disko
inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.default
./hard.nix
inputs.sops-nix.nixosModules.sops
./disk.nix
../../modules/boot/bootloader.nix
../../modules/keyboard
(import ../../modules/networking { hostName = "vm"; })
(import ../../modules/networking { hostName = hostName; })
../../modules/users
../../modules/audio
../../modules/localization
@@ -28,12 +26,17 @@ in
../../modules/fonts
../../modules/ssh/hardened-openssh.nix
(import ../../modules/secrets {
inherit lib;
inherit inputs;
inherit config;
inherit lib inputs config;
})
];
home-manager.users.${username} = import ../../home/hosts/vm {
inherit inputs config pkgs;
};
networking.hostName = hostName;
ssh.username = username;
secrets.username = username;
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nvim ];
@@ -56,19 +59,6 @@ in
};
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs outputs;
};
users.${username} = import ../../home/hosts/vm {
inherit inputs;
inherit config;
inherit pkgs;
};
};
services.qemuGuest.enable = true;
services.spice-vdagentd.enable = true;