feasible config for the beginning

This commit is contained in:
MFlossmann 2024-03-27 23:45:23 +01:00
parent b4c2ba8174
commit 25d5980e6c
13 changed files with 563 additions and 203 deletions

View file

@ -0,0 +1,60 @@
{
lib,
config,
inputs,
outputs,
helperLib,
pkgs,
...
}: let
cfg = config.myNixOS;
in {
options.myNixOS.home-users = lib.mkOption {
type = lib.types.attrsOf ( lib.types.submodule {
options = {
userConfig = lib.mkOption {
example = "home.nix";
};
userSettings = lib.mkOption {
default = {};
example = "{}";
};
};
});
default = {};
};
config = {
programs.zsh.enable = true;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
inherit helperLib;
outputs = inputs.self.outputs;
};
users =
builtins.mapAttrs (name: user: {...}: {
imports = [
(import user.userConfig)
outputs.homeManagerModules.default
];
})
(config.myNixOS.home-users);
};
users.users = builtins.mapAttrs (
name: user:
{
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = ["libvirtd" "networkmanager"];
}
// user.userSettings
) (config.myNixOS.home-users);
};
}