I tried going all in on dendritic, but I think I'm gonna go for a lighter approach
This commit is contained in:
parent
a4698d2a62
commit
1a586c2d90
97 changed files with 240 additions and 3899 deletions
34
modules/nix/lib.nix
Normal file
34
modules/nix/lib.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Helper functions for creating system & home-manager configurations
|
||||
|
||||
options.flake.lib = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.unspecified;
|
||||
default = { };
|
||||
};
|
||||
|
||||
config.flake.lib = {
|
||||
mkNixos = system: name: {
|
||||
${name} = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
inputs.self.modules.nixos.${name}
|
||||
{ nixpkgs.hostPlatform = lib.mkDefault system; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
mkHomeManager = system: name: {
|
||||
${name} = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
modules = [
|
||||
inputs.self.modules.homeManager.${name}
|
||||
{ nixpkgs.config.allowUnfree = true; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue