2022-11-25 13:25:40 +00:00
|
|
|
# This is the main account for servers. It is also used for managing the
|
|
|
|
# installations with deploy-rs.
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2022-12-04 23:17:57 +00:00
|
|
|
let
|
|
|
|
name = "admin";
|
|
|
|
in
|
2022-11-25 13:25:40 +00:00
|
|
|
{
|
2022-12-04 23:17:57 +00:00
|
|
|
users.users.${name} = {
|
2022-11-25 13:25:40 +00:00
|
|
|
description = "The administrator account for the servers.";
|
2022-11-30 00:31:56 +00:00
|
|
|
hashedPassword = "$6$KXZD6NvjtSkle/id$ECs7zIwDBOlQiFACsyot1gyjKG9UWMlUdRknVujE9efpHMQGx7.YZWyJ0VkV0ja0BPzeF/EzTu6n4EEF5ZHPD0";
|
2022-11-25 13:25:40 +00:00
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
useDefaultShell = true;
|
2022-11-27 16:41:27 +00:00
|
|
|
openssh.authorizedKeys.keyFiles = [
|
2022-12-03 05:44:40 +00:00
|
|
|
../../home-manager/foo-dogsquared/files/ssh-key.pub
|
|
|
|
../../../hosts/ni/files/ssh-key.pub
|
2022-11-25 13:25:40 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-12-04 23:17:57 +00:00
|
|
|
# This is also a trusted user for the Nix daemon.
|
|
|
|
nix.settings.trusted-users = [ name ];
|
|
|
|
|
|
|
|
# Allow the user to easily enter into several services such as the database
|
|
|
|
# services to allowing some debugging.
|
|
|
|
services.postgresql.ensureUsers = [ { inherit name; } ];
|
|
|
|
services.mysql.ensureUsers = [ { inherit name; } ];
|
2022-11-25 13:25:40 +00:00
|
|
|
}
|