nix-config/machines/porthos/users.nix

25 lines
559 B
Nix
Raw Normal View History

2021-02-07 23:07:20 +01:00
# User setup
{ config, lib, ... }:
2021-02-07 23:07:20 +01:00
let
my = config.my;
groupIfExists = grp:
lib.lists.optional
(builtins.hasAttr grp config.users.groups)
grp;
groupsIfExist = grps: builtins.concatMap groupIfExists grps;
2021-02-07 23:07:20 +01:00
in
{
users.users.blog = {
description = "Blog Publisher";
isNormalUser = true;
group = "nginx";
createHome = false; # Messes with permissions
2021-02-07 23:07:20 +01:00
home = "/var/www/";
openssh.authorizedKeys.keys = [ my.secrets.drone.ssh.publicKey ];
};
users.users.ambroisie.extraGroups = groupsIfExist [
"media"
];
2021-02-07 23:07:20 +01:00
}