1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2024-12-29 00:53:52 +00:00
ultima/libx/builder.nix

29 lines
911 B
Nix
Raw Normal View History

2024-12-03 14:20:37 +00:00
{ self, inputs, hostName, userName, flakeDir, dev, ... }: {
2024-11-21 09:24:15 +00:00
flake = let
2024-11-24 08:17:07 +00:00
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
2024-11-27 10:37:54 +00:00
sec = import ./secrets.nix;
2024-11-21 09:24:15 +00:00
args = rec { # IMPORTS LET_IN FROM HOSTS TO ALL SYSTEM
# DIRECTORIES
homeDir = "${flakeDir}/modules/home";
nixosDir = "${flakeDir}/modules/nixos";
# OTHER
True = { enable = true; };
False = { enable = false; };
# SYSINFO
stateVersion = "24.05"; # IDK
platform = "x86_64-linux";
2024-12-03 14:20:37 +00:00
inherit self inputs hostName userName flakeDir sec dev;
2024-11-21 09:24:15 +00:00
};
in with inputs; {
2024-11-22 11:26:29 +00:00
nixosConfigurations.${hostName} = nixpkgs.lib.nixosSystem {
2024-11-27 10:37:54 +00:00
modules = [ ../${hostName}/host ];
2024-11-22 11:26:29 +00:00
specialArgs = args;
2024-11-21 09:24:15 +00:00
};
2024-11-22 11:26:29 +00:00
homeConfigurations.${userName} = home-manager.lib.homeManagerConfiguration {
2024-11-27 10:37:54 +00:00
modules = [ ../${hostName}/home ];
2024-11-22 11:26:29 +00:00
extraSpecialArgs = args;
2024-11-24 08:17:07 +00:00
inherit pkgs;
2024-11-21 09:24:15 +00:00
};
};
}