flake: clean up :)

This commit is contained in:
Felix Albrigtsen 2024-10-06 00:04:18 +02:00
parent 97b481de0a
commit dab63bfbeb
2 changed files with 35 additions and 84 deletions

117
flake.nix
View File

@ -54,107 +54,58 @@
}; };
in in
{ {
nixosConfigurations = { nixosConfigurations = let
normalSys = name: config: nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
({ config, pkgs, ... }: {
# Make "pkgs.unstable" etc. available
nixpkgs.overlays = [ pkgs-overlay ] ++ config.overlays or [ ];
})
./hosts/${name}/configuration.nix
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/${name}/home.nix;
}
] ++ config.modules or [ ];
};
in {
# Networking / VPN Gateway # Networking / VPN Gateway
burnham = nixpkgs.lib.nixosSystem { burnham = normalSys "burnham" {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [ modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/burnham/configuration.nix
./common/domeneshop-dyndns.nix ./common/domeneshop-dyndns.nix
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/burnham/home.nix;
}
]; ];
}; };
# Media / storage server # Media / storage server
challenger = nixpkgs.lib.nixosSystem { challenger = normalSys "challenger" {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [ modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/challenger/configuration.nix
extra-config.nixosModules.default extra-config.nixosModules.default
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/challenger/home.nix;
}
]; ];
}; };
# General application server # General application server
defiant = nixpkgs.lib.nixosSystem { defiant = normalSys "defiant" {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [ modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/defiant/configuration.nix
./common/domeneshop-dyndns.nix ./common/domeneshop-dyndns.nix
sops-nix.nixosModules.sops
matrix-synapse-next.nixosModules.default matrix-synapse-next.nixosModules.default
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/defiant/home.nix;
}
]; ];
}; };
# Work desktop # Work desktop
felixalbpc = nixpkgs.lib.nixosSystem { felixalbpc = normalSys "felixalbpc" { };
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/felixalbpc/configuration.nix
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/felixalbpc/home.nix;
}
];
};
# Web host # Web host
malcolm = nixpkgs.lib.nixosSystem { malcolm = normalSys "malcolm" { };
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/malcolm/configuration.nix
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/malcolm/home.nix;
}
];
};
}; };
# Daily driver macbook # Daily driver macbook
darwinConfigurations.worf = nix-darwin.lib.darwinSystem { darwinConfigurations.worf = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin"; system = "aarch64-darwin";
@ -162,14 +113,14 @@
inherit inputs; inherit inputs;
}; };
modules = [ modules = [
./hosts/worf/configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; }) ({ config, pkgs, ... }: { nixpkgs.overlays = [ pkgs-overlay ]; })
./hosts/worf/configuration.nix
home-manager.darwinModules.home-manager { home-manager.darwinModules.home-manager {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users."felixalb" = import ./hosts/worf/home.nix; home-manager.users."felixalb" = import ./hosts/worf/home.nix;
} }
# sops-nix.nixosModules.sops
]; ];
}; };

View File

@ -11,13 +11,13 @@
# Infrastructure # Infrastructure
./backup.nix ./backup.nix
./libvirt.nix ./libvirt.nix
./services/dyndns.nix
./services/nginx.nix ./services/nginx.nix
./services/pihole.nix ./services/pihole.nix
./services/postgresql.nix ./services/postgresql.nix
./services/wireguard.nix ./services/wireguard.nix
# Services # Services
./services/dyndns.nix
./services/flame.nix ./services/flame.nix
./services/gitea.nix ./services/gitea.nix
./services/hedgedoc.nix ./services/hedgedoc.nix