reduce some more lines with custom mkSpecialArgs function

This commit is contained in:
TheWanderingCrow 2025-01-30 17:31:06 -05:00
parent 26b17af1f7
commit 0bf1f113f1

134
flake.nix
View file

@ -15,116 +15,100 @@
home-manager,
sops-nix,
...
} @ inputs: let
} @ inputs: let
baseModules = [
home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops
];
mkSpecialArgs = system: {
inherit inputs;
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
};
in {
nixosConfigurations = {
###################
# Primary Desktop #
###################
Parzival = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
modules = [
./hosts/Parzival
] ++ baseModules;
specialArgs = mkSpecialArgs "x86_64-linux";
modules =
[
./hosts/Parzival
]
++ baseModules;
};
###################
# Personal Laptop #
###################
Parzival-Mobile = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
modules = [
./hosts/Parzival-Mobile
] ++ baseModules;
specialArgs = mkSpecialArgs "x86_64-linux";
modules =
[
./hosts/Parzival-Mobile
]
++ baseModules;
};
######################
# Work Issued Laptop #
######################
Parzival-Framework = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
modules = [
./hosts/Parzival-Framework
] ++ baseModules;
specialArgs = mkSpecialArgs "x86_64-linux";
modules =
[
./hosts/Parzival-Framework
]
++ baseModules;
};
###############
# Home Server #
###############
WCE-Overseer = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
modules = [
./hosts/WCE-Overseer
] ++ baseModules;
specialArgs = mkSpecialArgs "x86_64-linux";
modules =
[
./hosts/WCE-Overseer
]
++ baseModules;
};
###################################
# ISO Installer w/ recovery tools #
###################################
Parzival-Live = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
modules = [
./hosts/Parzival-Live
] ++ baseModules;
specialArgs = mkSpecialArgs "x86_64-linux";
modules =
[
./hosts/Parzival-Live
]
++ baseModules;
};
#########################
# DO Nebula Lighthouse1 #
#########################
WCE-Lighthouse1 = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
modules = [
./hosts/WCE-Lighthouse
{
networking.hostName = "WCE-Lighthouse1";
networking.useDHCP = nixpkgs.lib.mkForce false;
specialArgs = mkSpecialArgs "x86_64-linux";
modules =
[
./hosts/WCE-Lighthouse
{
networking.hostName = "WCE-Lighthouse1";
networking.useDHCP = nixpkgs.lib.mkForce false;
services.cloud-init = {
enable = true;
network.enable = true;
services.cloud-init = {
enable = true;
network.enable = true;
# not strictly needed, just for good measure
datasource_list = ["DigitalOcean"];
datasource.DigitalOcean = {};
sops.defaultSopsFile = inputs.nix-secrets.secrets.lighthouse1;
};
}
] ++ baseModules;
# not strictly needed, just for good measure
datasource_list = ["DigitalOcean"];
datasource.DigitalOcean = {};
sops.defaultSopsFile = inputs.nix-secrets.secrets.lighthouse1;
};
}
]
++ baseModules;
};
};
};