Merge pull request #25 from bcorner/master

Add ben to realUsers, users.nix
This commit is contained in:
Ivan Malison 2024-05-29 00:11:41 -06:00 committed by GitHub
commit 97c2779d1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 43 additions and 1 deletions

18
nixos/ben.nix Normal file
View File

@ -0,0 +1,18 @@
{ pkgs, inputs, config, makeEnable, ... }:
makeEnable config "modules.ben" true {
home-manager.backupFileExtension = "backup"; # Add this line
home-manager.users.ben = {
programs.zsh = {
enable = true;
shellAliases = {
l = "ls -CF";
la = "ls -A";
ll = "ls -lh";
lla = "ls -alh";
ls = "ls --color=auto";
gts = "git status";
gtl = "git log";
};
};
};
}

View File

@ -98,7 +98,7 @@
inherit inputs machineNames;
makeEnable = (import ../make-enable.nix) nixpkgs.lib;
mapValueToKeys = keys: value: builtins.listToAttrs (map (name: { inherit name value; }) keys);
realUsers = [ "root" "imalison" "kat" "dean" "alex" ];
realUsers = [ "root" "imalison" "kat" "dean" "alex" "ben"];
forEachUser = mapValueToKeys realUsers;
} // specialArgs // (import ../keys.nix);
});

View File

@ -3,6 +3,7 @@
imports = [
./android.nix
./base.nix
./ben.nix
./cache-server.nix
./cache.nix
./code.nix

View File

@ -52,4 +52,7 @@ rec {
"AAAAB3NzaC1yc2EAAAADAQABAAACAQC4ayU9sly58EHQ2YdrnoJ5o0mFD8I8UiDvN3kVh6oSMMQ9wkVzLUY6wUzlc0uq3P/OYco9mURMt83C+lY4UC+jvN09nIEHV7yVJWsKV3ntmnEqM63e9cOWnpC9XA1MSha7xrf9DaO/doxST4fY6ixZA+nbE0bFgNTqyjzdya7pCamAdnPqKqwUEha+0KfpA8TJlrfgrDLd65f2/+jLU8fhTkU6yhrJ9Piq7C+RwVTu/dlrp50PNirfQRSa7vUPNS8Y973XtK6jzB/xS2Qc6iGJ+4QcCy6lgu2xksO/MNIimZYGOCP2yx6/GDp/gnOlAktrJ3flMycJdEHkZVH61HfQV76O/mY3tck/SiCwhuNxXw0uh9wf4UO8JHlnJcsIsBkSBemJsxQul+G7kV4EV/gqW/iO5U2nKmDqbwNWigO9mN44LqBOwsnAnu78kiSE8sNCEdSy/qVWloBw4VyT/emvmTwP1okh/CKNnu0/HmfSNL6Vib1XuvKSPvrUIOLMrSeRdtu85LrWaS0CvKEoMrIgpvc+3jHtdbxwINE3JBGrbXvfe20CuHl6Fx0ONkhirRmrjG7iUjV/4c6nS2aguPVsGi7q3GYvtz7cNEe3XbfpZaHzrCncnoQPbnSDLjHdeZf4O5Aew6iOwwkpgBBDA3lJO55ujq2vNbgkpH3hmQjltQ=="
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBEBce6E/XCdo8+dC4PPyyTsO/Z0BZxuz0IrTLaGehrT weitzman.micah@gmail.com"
];
benKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAJ6lD0c+frh2vzQjvsrsmJpwM1ovaY59m5NNPml5G+E benjamin.j.corner@gmail.com"
];
}

View File

@ -21,4 +21,19 @@
home-manager.users = forEachUser {
home.stateVersion = "22.05";
};
users.users.ben = {
extraGroups = [
"audio"
"adbusers"
"disk"
"docker"
"networkmanager"
"openrazer"
"plugdev"
"syncthing"
"systemd-journal"
"video"
] ++ ["wheel"];
};
}

View File

@ -84,6 +84,11 @@ in
name = "unprivileged";
openssh.authorizedKeys.keys = [giteaSecret] ++ kanivanKeys;
};
ben = userDefaults // {
inherit extraGroups;
name = "ben";
openssh.authorizedKeys.keys = benKeys ++ kanivanKeys;
};
};
nix.sshServe = {