diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2023-02-11 17:18:54 +0100 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2023-02-12 13:16:43 +0100 |
| commit | 6ea803da80558e269564c99070e92e285cf977ff (patch) | |
| tree | 151458881e22471888ac301ba6cb8b060f3723d8 /modules/nixos/user.nix | |
| parent | 84d6a76d15345cdbd11fac5a079e04c81e484238 (diff) | |
add personal nixos modules
Diffstat (limited to 'modules/nixos/user.nix')
| -rw-r--r-- | modules/nixos/user.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/nixos/user.nix b/modules/nixos/user.nix new file mode 100644 index 0000000..0d1585e --- /dev/null +++ b/modules/nixos/user.nix @@ -0,0 +1,22 @@ +{ config, lib, ... }: + +let cfg = config.personal.user; +in { + options.personal.user = { + enable = lib.mkEnableOption "main user"; + name = lib.mkOption { + type = lib.types.str; + default = "qaristote"; + }; + }; + + config.users.users."${cfg.name}" = lib.mkIf cfg.enable { + isNormalUser = true; + extraGroups = [ "wheel" ] ++ lib.optional config.sound.enable "sound" + ++ lib.optional config.networking.networkmanager.enable "networkmanager"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK4wGbl3++lqCjLUhoRyABBrVEeNhIXYO4371srkRoyq qaristote@latitude-7490" + ]; + + }; +} |
