Reorganize configs
This commit is contained in:
32
flake.nix
32
flake.nix
@@ -3,19 +3,37 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs } @inputs: {
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable } @inputs:
|
||||
let
|
||||
mkHost = { hostname, system, stateVersion }: nixpkgs.lib.nixosSystem {
|
||||
system = system;
|
||||
modules = [
|
||||
{
|
||||
networking = {
|
||||
hostName = hostname;
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
system.stateVersion = stateVersion;
|
||||
}
|
||||
./modules/nixos
|
||||
./hosts/${hostname}
|
||||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
marauder = nixpkgs.lib.nixosSystem {
|
||||
marauder = mkHost {
|
||||
hostname = "marauder";
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/marauder ];
|
||||
specialArgs = { inherit inputs; };
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
monolith = nixpkgs.lib.nixosSystem {
|
||||
monolith = mkHost {
|
||||
hostname = "monolith";
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/monolith ];
|
||||
specialArgs = { inherit inputs; };
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user