nixos/config/users.nix

31 lines
840 B
Nix
Raw Normal View History

2019-02-26 13:44:40 +01:00
{ config, lib, pkgs, ... }:
with lib;
{
2019-02-26 13:44:40 +01:00
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 []);
2019-02-26 13:44:40 +01:00
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 [];
2019-02-26 13:44:40 +01:00
};
2019-02-26 13:44:40 +01:00
groups.derped = {
name = "derped";
gid = 1337;
members = [ "derped" ];
};
};
}