diff --git a/porthos/default.nix b/porthos/default.nix index 596a0f1..d8726f2 100644 --- a/porthos/default.nix +++ b/porthos/default.nix @@ -7,5 +7,6 @@ ./hardware.nix ./networking.nix ./services.nix + ./users.nix ]; } diff --git a/porthos/users.nix b/porthos/users.nix new file mode 100644 index 0000000..d980173 --- /dev/null +++ b/porthos/users.nix @@ -0,0 +1,15 @@ +# User setup +{ config, ... }: +let + my = config.my; +in +{ + users.users.blog = { + description = "Blog Publisher"; + isNormalUser = true; + group = "nginx"; + createHome = true; # Ensures correct permissions + home = "/var/www/"; + openssh.authorizedKeys.keys = [ my.secrets.drone.ssh.publicKey ]; + }; +}