Cfg updated
All checks were successful
Nix Build / build-nixos (push) Successful in 4m51s

This commit is contained in:
soraefir
2024-04-17 08:26:08 +02:00
parent b644c87517
commit 150d2f2e07
8 changed files with 74 additions and 104 deletions

View File

@ -1,65 +1,65 @@
{ inputs, ... }: {
generate = { syspath }:
generate = { host }:
let
syscfg = import ./systems/${syspath}/cfg.nix;
syscfg = import ./systems/${host}/cfg.nix;
nameValuePair = name: value: { inherit name value; };
in ({
"nixos" = {
nisoxConfigurations."${syscfg.hostname}" =
inputs.nixpkgs.lib.nixosSystem {
system = syscfg.system;
modules = [
./modules/shared/syscfg
./modules/shared/sops
./modules/nixos
syscfg
syspath
inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users = builtins.listToAttrs (map (userConfig:
nameValuePair userConfig.username {
imports = [
./modules/shared/syscfg
./modules/shared/colors
./modules/home
syscfg
{ usercfg = userConfig; }
inputs.nix-colors.homeManagerModule
inputs.hyprland.homeManagerModules.default
];
}) syscfg.syscfg.users);
}
];
};
"nixos" = inputs.nixpkgs.lib.nixosSystem {
system = syscfg.syscfg.system;
modules = [
./modules/shared/syscfg
./modules/shared/sops
./modules/nixos
syscfg
./systems/${host}
inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users = builtins.listToAttrs (map (userConfig:
nameValuePair userConfig.username {
imports = [
./modules/shared/syscfg
./modules/shared/colors
./modules/home
syscfg
{ usercfg = userConfig; }
inputs.nix-colors.homeManagerModule
inputs.hyprland.homeManagerModules.default
];
}) syscfg.syscfg.users);
}
];
};
"macos" = inputs.darwin.lib.darwinSystem {
system = syscfg.system;
modules = [
./modules/shared/syscfg
./modules/shared/sops
syscfg
./systems/${host}
inputs.sops-nix.nixosModules.sops
syspath
inputs.home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.sora = {
imports = [
inputs.nix-colors.homeManagerModule
inputs.hyprland.homeManagerModules
./systems/${syspath}/home.nix
];
};
home-manager.users = builtins.listToAttrs (map (userConfig:
nameValuePair userConfig.username {
imports = [
inputs.nix-colors.homeManagerModule
inputs.hyprland.homeManagerModules
];
}) syscfg.syscfg.users);
}
];
};
"home" = inputs.home-manager.lib.homeManagerConfiguration {
modules = [ ./modules/home ./systems/${syscfg.hostname}/home.nix ];
modules = [ ./modules/home ];
};
_ = throw "Unsupported system";
}.${syscfg.type});
}.${syscfg.syscfg.type});
}