Initial commit

This commit is contained in:
marc
2022-10-02 20:33:40 +02:00
commit a1d321316c
30 changed files with 2492 additions and 0 deletions

36
system/modules/user.nix Normal file
View File

@@ -0,0 +1,36 @@
{ 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}" ];
}
];
}