diff --git a/machines/moderatio/configuration.nix b/machines/moderatio/configuration.nix index 13313199..40929283 100644 --- a/machines/moderatio/configuration.nix +++ b/machines/moderatio/configuration.nix @@ -11,6 +11,7 @@ ./zfs.nix ../modules/xserver.nix + ../modules/malobeo_user.nix ]; # Define on which hard drive you want to install Grub. @@ -49,14 +50,6 @@ #Define a user account. Don't forget to set a password with ‘passwd’. - users.users.malobeo = { - isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ - firefox - thunderbird - ]; - }; # List packages installed in system profile. To search, run: # $ nix search wget diff --git a/machines/modules/malobeo_user.nix b/machines/modules/malobeo_user.nix new file mode 100644 index 00000000..fd4c9691 --- /dev/null +++ b/machines/modules/malobeo_user.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: + +let + sshKeys = import ../ssh_keys.nix; +in +{ + users.users.malobeo = { + isNormalUser = true; + extraGroups = [ "wheel" ]; + packages = with pkgs; [ + firefox + thunderbird + ]; + + openssh.authorizedKeys.keys = sshKeys.admins; + + initialPassword = "test"; + }; +}