nixos/config/users.nix

30 lines
834 B
Nix

{ config, lib, ... }:
with lib;
{
users = {
mutableUsers = false;
users.derped = {
isNormalUser = true;
home = "/home/derped";
createHome = true;
description = "";
group = "derped";
extraGroups = [ "audio" "wheel" "network" ]
++ (if config.services.xserver.enable then [ "input" ] else [])
++ (if config.services.printing.enable then [ "cups" "lp" ] else [])
++ (if config.virtualisation.docker.enable then [ "docker"] else []);
uid = 1337;
shell = "/run/current-system/sw/bin/zsh";
passwordFile = "/secret/derped";
openssh.authorizedKeys.keyFiles = if config.services.openssh.enable then [ "/secret/derped.pub" ] else [];
};
groups.derped = {
name = "derped";
gid = 1337;
members = [ "derped" ];
};
};
}