nixos/modules/base/users.nix

32 lines
866 B
Nix
Raw Normal View History

2024-02-24 02:11:59 +01:00
{ config, pkgs, ... }: {
2023-08-01 15:35:09 +02:00
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 = {
2024-02-24 02:11:59 +01:00
hashedPasswordFile = config.age.secrets.users-hashed-password-file.path;
2023-08-01 15:35:09 +02:00
};
caspervk = {
isNormalUser = true;
description = "Casper V. Kristensen";
2024-02-24 02:11:59 +01:00
hashedPasswordFile = config.age.secrets.users-hashed-password-file.path;
2023-08-01 15:35:09 +02:00
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
};
};
};
2024-02-24 02:11:59 +01:00
age.secrets.users-hashed-password-file = {
file = ../../secrets/users-hashed-password-file.age;
mode = "400";
owner = "root";
group = "root";
};
2023-08-01 15:35:09 +02:00
}