2019-02-26 13:44:40 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2019-03-23 02:50:48 +01:00
|
|
|
with lib;
|
|
|
|
|
2019-03-17 11:43:14 +01:00
|
|
|
{
|
2019-02-26 13:44:40 +01:00
|
|
|
users = {
|
|
|
|
mutableUsers = false;
|
|
|
|
users.derped = {
|
|
|
|
isNormalUser = true;
|
|
|
|
home = "/home/derped";
|
|
|
|
createHome = true;
|
|
|
|
description = "";
|
|
|
|
group = "derped";
|
2019-03-23 02:50:48 +01:00
|
|
|
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";
|
2019-03-23 02:50:48 +01:00
|
|
|
openssh.authorizedKeys.keyFiles = if config.services.openssh.enable then [ "/secret/derped.pub" ] else [];
|
2019-02-26 13:44:40 +01:00
|
|
|
};
|
2019-03-23 02:50:48 +01:00
|
|
|
|
2019-02-26 13:44:40 +01:00
|
|
|
groups.derped = {
|
|
|
|
name = "derped";
|
|
|
|
gid = 1337;
|
|
|
|
members = [ "derped" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|