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

69 lines
1.1 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,
...
}:
2024-12-22 02:09:51 +00:00
let
# OTHER
inherit (inputs.nixpkgs.lib) nixosSystem;
inherit (inputs.home-manager.lib) homeManagerConfiguration;
pkgs = inputs.nixpkgs.legacyPackages.${plfrm};
# NEEDS
sec = import ./secrets.nix;
x =
import ./options.nix {
inherit
inputs
pkgs
lib
;
}
// {
inherit
2024-12-22 02:31:49 +00:00
# VARIABLES
2024-12-22 02:09:51 +00:00
disk
hostName
userName
flakeDir
2024-12-22 02:31:49 +00:00
theme
2024-12-22 02:09:51 +00:00
is
2024-12-22 02:31:49 +00:00
# SYSINFA
2024-12-22 02:09:51 +00:00
plfrm
ver
dev
2024-12-22 02:31:49 +00:00
sec # SECRETS
2024-12-22 02:09:51 +00:00
;
2024-11-21 09:24:15 +00:00
};
2024-12-22 02:09:51 +00:00
# ARGS
args = { inherit x inputs; };
in
{
# CONFIGURATION
nixosConfigurations.${hostName} = nixosSystem {
modules = [
../modules/nixos
../${hostName}/host
];
specialArgs = args;
};
homeConfigurations.${userName} = homeManagerConfiguration {
modules = [
../modules/home
../${hostName}/home
];
extraSpecialArgs = args;
inherit pkgs;
};
2024-11-21 09:24:15 +00:00
}