Code cleanup.

This commit is contained in:
Kevin Baensch 2019-09-06 11:38:02 +02:00
parent 9b6cea1696
commit 94e969abd9
4 changed files with 10 additions and 13 deletions

View file

@ -1,8 +1,6 @@
{ config, ... }:
let
firewallcfg = config.machine.firewall;
in {
{
networking = {
hostName = config.machine.hostName;
};

View file

@ -14,12 +14,12 @@ let
description = "Administrative user ${user.name}.";
group = user.name;
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 []);
++ (optional config.services.xserver.enable "input")
++ (optionals config.services.printing.enable [ "cups" "lp" ])
++ (optional config.virtualisation.docker.enable "docker");
shell = "${pkgs.zsh}/bin/zsh";
passwordFile = "${config.machine.secretPath}/${user.name}";
openssh.authorizedKeys.keyFiles = if config.services.openssh.enable then [ "${config.machine.secretPath}/${user.name}.pub" ] else [];
openssh.authorizedKeys.keyFiles = optional config.services.openssh.enable "${config.machine.secretPath}/${user.name}.pub";
};
};