thelio76: factor out mkPcSystem

This commit is contained in:
Alex 2024-07-26 19:12:46 -04:00
parent 3fe64dae6f
commit 58544d8e7a
5 changed files with 23 additions and 14 deletions

View File

@ -22,24 +22,33 @@
}; };
outputs = { self, nixpkgs, home-manager, firefox-addons, ... }@inputs: outputs = { self, nixpkgs, home-manager, firefox-addons, ... }@inputs:
let
pcUser = "alex";
pcSystem = "x86_64-linux";
mkPcSystem = { user, hostname, system, inputs }: nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./config/hosts/${hostname}
] ++ (import ./config/modules/home-manager.nix {
inherit system inputs user;
}).modules;
};
in
{ {
nixosConfigurations = { nixosConfigurations = {
## ---- personal computers (linux) ---- ## ---- personal computers (linux) ----
nixos76 = nixpkgs.lib.nixosSystem rec { nixos76 = mkPcSystem {
system = "x86_64-linux"; hostname = "nixos76";
modules = [ user = pcUser;
./config/systems/nixos76 system = pcSystem;
] ++ (import ./config/modules/home-manager.nix { inherit inputs;
inherit system inputs; user = "alex";
}).modules;
}; };
thelio76 = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; thelio76 = mkPcSystem {
modules = [ hostname = "thelio76";
./config/systems/thelio76 user = pcUser;
] ++ (import ./config/modules/home-manager.nix { system = pcSystem;
inherit system inputs; user = "alex"; inherit inputs;
}).modules;
}; };
## ---- servers ---- ## ---- servers ----