nixos/modules/base/users.nix

31 lines
1.1 KiB
Nix
Raw Normal View History

2023-08-01 15:35:09 +02:00
{ pkgs, ... }: {
users = {
# Don't allow imperative modifications to users (incompatible with impermanence)
mutableUsers = false;
2023-08-25 00:57:42 +02:00
2023-08-01 15:35:09 +02:00
users = {
root = {
2023-08-25 00:57:42 +02:00
# TODO: The passwordfile is manually generated during the initial setup
# to avoid (hashed) secrets in the public git repo. It should replaced
# with a proper secret management scheme, such as agenix.
2023-08-01 15:35:09 +02:00
passwordFile = "/nix/persist/passwordfile";
};
caspervk = {
isNormalUser = true;
description = "Casper V. Kristensen";
2023-08-25 00:57:42 +02:00
# TODO: The passwordfile is manually generated during the initial setup
# to avoid (hashed) secrets in the public git repo. It should replaced
# with a proper secret management scheme, such as agenix.
2023-08-01 15:35:09 +02:00
passwordFile = "/nix/persist/passwordfile";
extraGroups = [
2023-08-01 16:55:53 +02:00
"wheel" # allows sudo
"video" # allows controlling brightness
2023-08-25 00:52:14 +02:00
# todo: systemd-journal, audio, input, power, nix ?
2023-08-01 15:35:09 +02:00
];
uid = 1000;
2023-08-01 16:55:53 +02:00
packages = with pkgs; [ ];
2023-08-01 15:35:09 +02:00
};
};
};
}