feat(nixos): Setup users for servers
This commit is contained in:
parent
bf7204f5b8
commit
38975ba714
1 changed files with 16 additions and 3 deletions
|
@ -1,10 +1,17 @@
|
|||
_: let
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
my = {
|
||||
name = "marley";
|
||||
username = "punkfairie";
|
||||
fullName = "Marley Rae";
|
||||
email = "marley@punkfairie.net";
|
||||
};
|
||||
|
||||
desktopPass = "$y$j9T$ztWf9WeUCENC2T12qS4mi1$51ihV/5cQ8mdJJrNe7MMguk4hPB61S5xHawsfi.1hL3";
|
||||
serverPass = "$y$j9T$8hA7OWZsdQMHqYIy8LkYQ1$hFeP2ak3QA4FtoIYIwqPg10//ZOSZrAw1PzJj0PuGSA";
|
||||
in {
|
||||
marleyos.my = {
|
||||
inherit (my) name username fullName email;
|
||||
|
@ -16,8 +23,14 @@ in {
|
|||
users."${my.name}" = {
|
||||
isNormalUser = true;
|
||||
description = my.fullName;
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
hashedPassword = "$y$j9T$ztWf9WeUCENC2T12qS4mi1$51ihV/5cQ8mdJJrNe7MMguk4hPB61S5xHawsfi.1hL3";
|
||||
extraGroups =
|
||||
["wheel"]
|
||||
++ (lib.optional config.networking.networkmanager.enable "networkmanager")
|
||||
++ (lib.optional config.virtualisation.docker.enable "docker");
|
||||
hashedPassword =
|
||||
if config.marleyos.isServer
|
||||
then serverPass
|
||||
else desktopPass;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue