diff --git a/modules/nixos/base/users/default.nix b/modules/nixos/base/users/default.nix index 645115d..b4598a5 100644 --- a/modules/nixos/base/users/default.nix +++ b/modules/nixos/base/users/default.nix @@ -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; }; };