Partial way to unifying nixos and home-manager modules

This commit is contained in:
marc
2022-11-16 20:28:32 +01:00
parent 5c609ddd42
commit 882c04a6bf
8 changed files with 121 additions and 66 deletions

View File

@@ -5,6 +5,5 @@
./editors
./bluetooth.nix
./tailscale.nix
./user.nix
];
}

View File

@@ -1,36 +0,0 @@
{ config, lib, pkgs, self, ... }:
let
cfg = config.samfelag.modules.user;
in
{
options.samfelag.modules.user = {
name = lib.mkOption {
type = lib.types.str;
default = "marc";
description = ''
Specifies the user name
'';
};
};
config = lib.mkMerge [
{
programs.zsh.enable = true;
users = {
defaultUserShell = pkgs.zsh;
users."${cfg.name}" = with cfg; {
description = "Marc Sastre Rienitz";
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" ];
};
# Do not allow users to be added or modified except through Nix configuration.
# mutableUsers = false;
};
nix.settings.trusted-users = [ "${cfg.name}" ];
}
];
}