1
0
Fork 0

nixops: add experimental users

This commit is contained in:
Sebastien Bourdeauducq 2020-09-08 13:34:36 +08:00
parent d7e62e48e5
commit 0ce37aa008
3 changed files with 15 additions and 3 deletions

View File

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
jaime = {
isNormalUser = true;
extraGroups = ["wheel" "plugdev" "dialout"];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPZGCpGW8n+cbGJbIa6Xqp/RpjbRXm55FfGCgw5uQzSk3MJraYaYZVUw4Z4n3WF0XyFirlgOf9RRxYM2GQoXaiq+qwPK1u4GvLTthGtfJ7LJJMjV4ouxooK205jTxp9mb3WTxzMRkcRK44B9tTZH7e36f+snBjCQRsjDTjZaYaxIUQ10gij+I4Cpq9EKrTf7fLgv+56tI6nxz3n8zeihklPOlCauA1WCN8nEU5PxRXL7Fi67kiXBoJJyUmhPg40YhC0zLhOzm7OhhM7RyIGB3bAyF1Q5GKScpPCYiAlm8j9VmQFHtulozs4cwypAOzMr48ekS3VMD1PPwbhHOOlSB1 jaime@jaime-ThinkPad"
];
};
}

View File

@ -2,7 +2,7 @@
network.enableRollback = true;
rpi-1 = import ./rpi.nix { host = "rpi-1"; rpi4 = false; };
rpi-2 = import ./rpi.nix { host = "rpi-2"; rpi4 = false; };
rpi-2 = import ./rpi.nix { host = "rpi-2"; rpi4 = false; experimental-users = true; };
rpi-3 = import ./rpi.nix { host = "rpi-3"; rpi4 = true; };
rpi-4 = import ./rpi.nix { host = "rpi-4"; rpi4 = true; };
rpi-5 = import ./rpi.nix { host = "rpi-5"; rpi4 = true; };

View File

@ -1,4 +1,4 @@
{ host, rpi4 }:
{ host, rpi4, experimental-users ? false }:
{ config, pkgs, ... }:
let
@ -47,7 +47,8 @@ in
users.extraGroups.plugdev = { };
users.mutableUsers = false;
users.defaultUserShell = pkgs.fish;
users.extraUsers = (import ./common-users.nix { inherit pkgs; }) // {
users.extraUsers = (import ./common-users.nix { inherit pkgs; }) //
(pkgs.lib.optionalAttrs experimental-users (import ./experimental-users.nix { inherit pkgs; })) // {
nix = {
isNormalUser = true;
};