modules/nixos: rename config to shared
Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
35
modules/nixos/shared/users.nix
Normal file
35
modules/nixos/shared/users.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.networking) hostName;
|
||||
inherit (config.sops) secrets;
|
||||
inherit (inputs) mysecrets;
|
||||
sshKeys = f: "${mysecrets}/ssh/user/id_${f}_ed25519.pub";
|
||||
in {
|
||||
nix.settings.trusted-users = ["user"];
|
||||
users.mutableUsers = false;
|
||||
users.users = {
|
||||
user = {
|
||||
hashedPasswordFile = secrets."user-password-hashed".path;
|
||||
extraGroups =
|
||||
["wheel" "video" "libvirtd" "dialout"]
|
||||
/*
|
||||
for lisgd
|
||||
*/
|
||||
++ lib.optional (hostName == "morphius" && config.desktop.niri.enable) "input";
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
openssh.authorizedKeys.keyFiles = map sshKeys [
|
||||
"dunamis"
|
||||
"eldrid"
|
||||
"legion"
|
||||
"morphius"
|
||||
"sarien"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user