refactor: simplify hosts files
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user