Partial way to unifying nixos and home-manager modules
This commit is contained in:
@@ -5,6 +5,5 @@
|
||||
./editors
|
||||
./bluetooth.nix
|
||||
./tailscale.nix
|
||||
./user.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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}" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user