1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-01 19:43:56 +00:00
ultima/libx/builder.nix

32 lines
1 KiB
Nix
Raw Normal View History

{ inputs, lib, hostName, userName, flakeDir, plfrm, stVer, dev, ... }: {
2024-11-21 09:24:15 +00:00
flake = let
# INPUTS PKGS
inherit (inputs.nixpkgsStable) nixpkgsStable;
inherit (inputs.nixpkgsMaster) nixpkgsMaster;
# OTHER
inherit (inputs.nixpkgs.lib) nixosSystem;
inherit (inputs.home-manager.lib) homeManagerConfiguration;
# PKGS
2024-11-24 08:17:07 +00:00
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
pkgsS = nixpkgsStable.legacyPackages.x86_64-linux;
pkgsM = nixpkgsMaster.legacyPackages.x86_64-linux;
# NEEDS
2024-11-27 10:37:54 +00:00
sec = import ./secrets.nix;
x = import ./options.nix { inherit lib; } // {
inherit hostName userName flakeDir plfrm stVer dev sec;
2024-11-21 09:24:15 +00:00
};
# ARGS
args = { inherit x inputs pkgsS pkgsM; };
in { # CONFIGURATION
nixosConfigurations.${hostName} = 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
};
homeConfigurations.${userName} = 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
};
};
}