mirror of
https://github.com/tuxdotrs/tawm.git
synced 2025-07-06 13:06:35 +05:30
refactor: modularize nixosConfigurations
This commit is contained in:
58
flake.nix
58
flake.nix
@ -16,6 +16,11 @@
|
|||||||
];
|
];
|
||||||
username = "tux";
|
username = "tux";
|
||||||
email = "t@tux.rs";
|
email = "t@tux.rs";
|
||||||
|
|
||||||
|
mkNixOSConfig = host: {
|
||||||
|
specialArgs = {inherit inputs outputs username email;};
|
||||||
|
modules = [./hosts/${host}];
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||||
@ -26,50 +31,15 @@
|
|||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# 'nixos-rebuild switch --flake .#your-hostname'
|
# 'nixos-rebuild switch --flake .#your-hostname'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
arcturus = nixosSystem {
|
arcturus = nixosSystem (mkNixOSConfig "arcturus");
|
||||||
specialArgs = {inherit inputs outputs username email;};
|
canopus = nixosSystem (mkNixOSConfig "canopus");
|
||||||
modules = [./hosts/arcturus];
|
alpha = nixosSystem (mkNixOSConfig "alpha");
|
||||||
};
|
sirius = nixosSystem (mkNixOSConfig "sirius");
|
||||||
|
vega = nixosSystem (mkNixOSConfig "vega");
|
||||||
canopus = nixosSystem {
|
capella = nixosSystem (mkNixOSConfig "capella");
|
||||||
specialArgs = {inherit inputs outputs username email;};
|
vps = nixosSystem (mkNixOSConfig "vps");
|
||||||
modules = [./hosts/canopus];
|
isoImage = nixosSystem (mkNixOSConfig "isoImage");
|
||||||
};
|
homelab = nixosSystem (mkNixOSConfig "homelab");
|
||||||
|
|
||||||
alpha = nixosSystem {
|
|
||||||
specialArgs = {inherit inputs outputs username email;};
|
|
||||||
modules = [./hosts/alpha];
|
|
||||||
};
|
|
||||||
|
|
||||||
sirius = nixosSystem {
|
|
||||||
specialArgs = {inherit inputs outputs username email;};
|
|
||||||
modules = [./hosts/sirius];
|
|
||||||
};
|
|
||||||
|
|
||||||
vega = nixosSystem {
|
|
||||||
specialArgs = {inherit inputs outputs username email;};
|
|
||||||
modules = [./hosts/vega];
|
|
||||||
};
|
|
||||||
|
|
||||||
capella = nixosSystem {
|
|
||||||
specialArgs = {inherit inputs outputs username email;};
|
|
||||||
modules = [./hosts/capella];
|
|
||||||
};
|
|
||||||
|
|
||||||
vps = nixosSystem {
|
|
||||||
specialArgs = {inherit inputs outputs username email;};
|
|
||||||
modules = [./hosts/vps];
|
|
||||||
};
|
|
||||||
|
|
||||||
isoImage = nixosSystem {
|
|
||||||
specialArgs = {inherit inputs outputs username email;};
|
|
||||||
modules = [./hosts/isoImage];
|
|
||||||
};
|
|
||||||
|
|
||||||
homelab = nixosSystem {
|
|
||||||
specialArgs = {inherit inputs outputs username email;};
|
|
||||||
modules = [./hosts/homelab];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Standalone home-manager configuration entrypoint
|
# Standalone home-manager configuration entrypoint
|
||||||
|
Reference in New Issue
Block a user