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

72 lines
1.2 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-20 13:10:11 +00:00
is ? null,
2024-12-22 09:34:08 +00:00
theme ? "horizon-dark",
image ? "train",
# 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
is
2024-12-22 09:34:08 +00:00
# CUSTOMIZE
theme
image
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
}