Added: Configuration for cyper-pi-2
This commit is contained in:
44
flake.nix
44
flake.nix
@@ -29,26 +29,32 @@
|
|||||||
let
|
let
|
||||||
primaryUser = "phil";
|
primaryUser = "phil";
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
|
|
||||||
|
mkNixosConfig =
|
||||||
|
hostName:
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
./nixos/default.nix
|
||||||
|
./nixos/hardware.nix
|
||||||
|
./hosts/${hostName}/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
users.${primaryUser} = import ./home/default.nix;
|
||||||
|
extraSpecialArgs = { inherit inputs primaryUser; };
|
||||||
|
backupFileExtension = "backup";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
specialArgs = { inherit inputs self primaryUser; };
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations."cyper-pi-1" = nixpkgs.lib.nixosSystem {
|
nixosConfigurations."cyper-pi-1" = mkNixosConfig "cyper-pi-1";
|
||||||
inherit system;
|
nixosConfigurations."cyper-pi-2" = mkNixosConfig "cyper-pi-2";
|
||||||
modules = [
|
|
||||||
./nixos/default.nix
|
|
||||||
./nixos/hardware.nix
|
|
||||||
./hosts/cyper-pi-1/configuration.nix
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
users.${primaryUser} = import ./home/default.nix;
|
|
||||||
extraSpecialArgs = { inherit inputs primaryUser; };
|
|
||||||
backupFileExtension = "backup";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
specialArgs = { inherit inputs self primaryUser; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
25
hosts/cyper-pi-2/configuration.nix
Normal file
25
hosts/cyper-pi-2/configuration.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./postgres.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Any RPi 4 specific customizations go here
|
||||||
|
networking = {
|
||||||
|
hostName = lib.mkForce "cyper-pi-2";
|
||||||
|
# interfaces.end0.ipv4.addresses = [
|
||||||
|
# {
|
||||||
|
# address = "192.168.2.41";
|
||||||
|
# prefixLength = 24;
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# firewall = {
|
||||||
|
# enable = false;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user