flake: parameterise nixos config on hostname
This commit is contained in:
parent
b8603b26f2
commit
ef952b2e24
39
flake.nix
39
flake.nix
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "A very basic flake";
|
||||
description = "My NixOS configuration";
|
||||
|
||||
inputs = {
|
||||
nixos.url = "nixpkgs/nixos-unstable";
|
||||
|
@ -12,25 +12,24 @@
|
|||
|
||||
outputs = { self, nixos, home-manager, nur }: {
|
||||
|
||||
nixosConfigurations = {
|
||||
arianrhod = nixos.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./hosts/arianrhod
|
||||
./hosts/arianrhod/hardware.nix
|
||||
./secrets/arianrhod.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{ nixpkgs.overlays = [ nur.overlay ]; }
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = false;
|
||||
home-manager.users.jez = import ./home/jez/home.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = nixos.lib.attrsets.genAttrs [ "arianrhod" "gwydion" ]
|
||||
(hostname:
|
||||
nixos.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
(./hosts + "/${hostname}")
|
||||
(./hosts + "/${hostname}/hardware.nix")
|
||||
(./secrets + "/${hostname}.nix")
|
||||
home-manager.nixosModules.home-manager
|
||||
{ nixpkgs.overlays = [ nur.overlay ]; }
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = false;
|
||||
home-manager.users.jez = import ./home/jez/home.nix;
|
||||
}
|
||||
];
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue