flake: cleanup and add hostname definition
This commit is contained in:
parent
2e6cf2c456
commit
0ccba9602d
5 changed files with 20 additions and 26 deletions
19
flake.nix
19
flake.nix
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "all this does now is pass inputs to other modules and set the system variable";
|
||||
description = "My configuration(s) for the NixOS Linux Distribution";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
|
|
@ -39,18 +39,21 @@
|
|||
outputs = inputs@{ ... }:
|
||||
let
|
||||
system = inputs.nixpkgs.lib.mkDefault "x86_64-linux";
|
||||
nixosSystem =
|
||||
mkHost =
|
||||
hostName:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit hostName inputs system; };
|
||||
modules = [ ./hosts/${hostName} ];
|
||||
specialArgs = { inherit inputs system; };
|
||||
modules = [
|
||||
{ networking.hostName = hostName; }
|
||||
./hosts/${hostName}
|
||||
];
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
Swordsmachine = nixosSystem "Swordsmachine";
|
||||
Earthmover = nixosSystem "Earthmover";
|
||||
Drone = nixosSystem "Drone";
|
||||
Mindflayer = nixosSystem "Mindflayer";
|
||||
Swordsmachine = mkHost "Swordsmachine";
|
||||
Earthmover = mkHost "Earthmover";
|
||||
Drone = mkHost "Drone";
|
||||
Mindflayer = mkHost "Mindflayer";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue