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

70 lines
1.3 KiB
Nix
Raw Normal View History

{
inputs,
lib,
# VARIABLES
2024-12-20 13:10:11 +00:00
disk ? null,
hostName ? "sus",
userName ? "amogus",
flakeDir ? null,
2024-12-21 09:11:03 +00:00
theme ? "horizon-dark",
2024-12-20 13:10:11 +00:00
is ? null,
# SYSINFO
2024-12-20 13:10:11 +00:00
plfrm ? "x86_64-linux",
ver ? "24.05",
dev,
...
}:
{
flake =
let
# OTHER
inherit (inputs.nixpkgs.lib) nixosSystem;
inherit (inputs.home-manager.lib) homeManagerConfiguration;
2024-12-20 13:10:11 +00:00
pkgs = inputs.nixpkgs.legacyPackages.${plfrm};
# NEEDS
sec = import ./secrets.nix;
2024-12-21 09:11:03 +00:00
x =
import ./options.nix {
inherit
theme
inputs
pkgs
lib
;
}
// {
inherit
disk
hostName
userName
flakeDir
is
plfrm
ver
dev
sec
;
};
# ARGS
args = { inherit x inputs; };
in
{
# CONFIGURATION
nixosConfigurations.${hostName} = nixosSystem {
2024-12-20 13:10:11 +00:00
modules = [
../modules/nixos
../${hostName}/host
];
specialArgs = args;
};
homeConfigurations.${userName} = homeManagerConfiguration {
2024-12-20 13:10:11 +00:00
modules = [
../modules/home
../${hostName}/home
];
extraSpecialArgs = args;
inherit pkgs;
};
2024-11-21 09:24:15 +00:00
};
}