Partial way to unifying nixos and home-manager modules

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

No files matched your search

-1
View File
@@ -5,6 +5,5 @@
./editors
./bluetooth.nix
./tailscale.nix
./user.nix
];
}
-36
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}" ];
}
];
}