This commit is contained in:
2023-04-12 20:32:07 +02:00
committed by soraefir
parent 10fbbc2654
commit a7ef5cf996
96 changed files with 5857 additions and 4 deletions

53
generator.nix Executable file
View File

@ -0,0 +1,53 @@
{ inputs, nixpkgs, home-manager, darwin, sops-nix, hyprland, nix-colors, ... }:
{
generate = { type, system, host }:
({"nixos" = nixpkgs.lib.nixosSystem {
system = system;
modules = [
sops-nix.nixosModules.sops
./hosts/${host}
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit inputs;
};
home-manager.users.sora = {
imports = [
nix-colors.homeManagerModule
hyprland.homeManagerModules.default
./hosts/${host}/home.nix
];
};
}
];
};
"macos" = darwin.lib.darwinSystem {
system = system;
modules = [
sops-nix.nixosModules.sops
./hosts/${host}
home-manager.darwinModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit inputs;
};
home-manager.users.sora = {
imports = [
nix-colors.homeManagerModule
hyprland.homeManagerModules.default
./hosts/${host}/home.nix
];
};
}
];
};
"home" = home-manager.lib.homeManagerConfiguration {
modules = [
./hosts/${host}/home.nix
];
};
_ = throw "Unsupported system";
}.${type});
}