From b89d9f249c3212ca16c2b08e1484e74941ea7ecb Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Fri, 25 Nov 2022 21:25:40 +0800 Subject: [PATCH] users/admin: init This is the user to be used for managing installations with deploy-rs but it is also the main user for servers. --- users/nixos/admin/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 users/nixos/admin/default.nix diff --git a/users/nixos/admin/default.nix b/users/nixos/admin/default.nix new file mode 100644 index 00000000..3600649e --- /dev/null +++ b/users/nixos/admin/default.nix @@ -0,0 +1,19 @@ +# This is the main account for servers. It is also used for managing the +# installations with deploy-rs. +{ config, lib, pkgs, ... }: + +{ + users.users.admin = { + description = "The administrator account for the servers."; + hashedPassword = "$6$QEHdYhTige1mhCyT$yIfecQpV0PZJNxdxVLiRAk.0UxYXYxASlzzyBoYqEkbRx2fsaF81JKaw.Alb.ENKY.5UKkGdcV8H4bPAdJIwR1"; + isNormalUser = true; + extraGroups = [ "wheel" ]; + useDefaultShell = true; + openssh.authorizedKeys.keys = [ + (lib.readFile ../../home-manager/foo-dogsquared/user-key.pub) + (lib.readFile ../../../hosts/ni/host-key.pub) + ]; + }; + + nix.settings.trusted-users = [ "admin" ]; +}