feat: Add machine configurations
This commit is contained in:
parent
80587b5f82
commit
2d11a56619
7 changed files with 278 additions and 2 deletions
13
flake.nix
13
flake.nix
|
@ -21,8 +21,10 @@
|
|||
|
||||
inputs.flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz";
|
||||
|
||||
inputs.nixos-hardware.url = "https://flakehub.com/f/NixOS/nixos-hardware/0.1.*.tar.gz";
|
||||
|
||||
# Flake outputs that other flakes can use
|
||||
outputs = { flake-schemas, nixpkgs, stylix, home-manager, home-config, ... }:
|
||||
outputs = { flake-schemas, nixpkgs, stylix, home-manager, home-config, nixos-hardware, ... }:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
# Helpers for producing system-specific outputs
|
||||
|
@ -55,10 +57,17 @@
|
|||
# Pin nixpkgs
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
};
|
||||
|
||||
machines = [ "capricorn" "gemini" "vm" ];
|
||||
mkMachine = hostname: {
|
||||
imports = [ nixosModule (import ./machine + "${hostname}" nixos-hardware) ];
|
||||
home-manager.sharedModules = [{ jhome.hostName = hostname; }];
|
||||
};
|
||||
machineModules = lib.genAttrs machines mkMachine;
|
||||
in
|
||||
{
|
||||
default = nixosModule;
|
||||
inherit nixosModule;
|
||||
};
|
||||
} // machineModules;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue