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:
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 = {
## ---- personal computers (linux) ----
nixos76 = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
./config/systems/nixos76
] ++ (import ./config/modules/home-manager.nix {
inherit system inputs; user = "alex";
}).modules;
nixos76 = mkPcSystem {
hostname = "nixos76";
user = pcUser;
system = pcSystem;
inherit inputs;
};
thelio76 = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
./config/systems/thelio76
] ++ (import ./config/modules/home-manager.nix {
inherit system inputs; user = "alex";
}).modules;
thelio76 = mkPcSystem {
hostname = "thelio76";
user = pcUser;
system = pcSystem;
inherit inputs;
};
## ---- servers ----