summaryrefslogtreecommitdiff
path: root/machines/xnet/users.nix
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2024-12-29 23:15:56 -0500
committerKleidi Bujari <mail@4kb.net>2024-12-29 23:15:56 -0500
commit833b5e89afa2073919508cc73534a92dd26fc97e (patch)
treec458397db62e5405db1b947cf8cedcd5b0a3eaee /machines/xnet/users.nix
parentb847b87823dfd7e1b7870c67ea32199bc607f852 (diff)
downloaddepot-833b5e89afa2073919508cc73534a92dd26fc97e.tar.gz
depot-833b5e89afa2073919508cc73534a92dd26fc97e.tar.bz2
depot-833b5e89afa2073919508cc73534a92dd26fc97e.zip
Extend browser config and setup automatic snapshots
Diffstat (limited to 'machines/xnet/users.nix')
-rw-r--r--machines/xnet/users.nix26
1 files changed, 22 insertions, 4 deletions
diff --git a/machines/xnet/users.nix b/machines/xnet/users.nix
index 53aa15b..384cb8c 100644
--- a/machines/xnet/users.nix
+++ b/machines/xnet/users.nix
@@ -2,6 +2,11 @@
let
cfg = config.xnet.users;
inherit (lib) mkOption mkIf types;
+
+ gitKeys = builtins.fetchurl {
+ url = "https://github.com/kbujari.keys";
+ sha256 = "0fpa679zkrpx77vangzf3gnidwvmky8ifivn8411xx6albrikaqx";
+ };
in
{
@@ -16,9 +21,15 @@ in
config = {
users = {
mutableUsers = false;
+ users.root = {
+ initialHashedPassword = "$y$j9T$eGwGb5tZwhk/.K0Lezsx4/$dJ4AODPBo0RBkVoCh1MVZTtkkDRn/C6A/XQIKt2YBNA";
+ openssh.authorizedKeys.keys = lib.splitString "\n" (builtins.readFile gitKeys);
+ };
users.kle = mkIf (builtins.elem "kle" cfg.enable) {
- hashedPassword = "$6$R4dDhaftX.vapGMd$.An36hlp3DXfkIC7bPZ0MDPo6Zvpk8JRrhy2LES.lZZj6JDa74oJkcMW3DCsIySvLJxOPXSShos0TpgJ/w0fH/";
+ initialHashedPassword = "$6$R4dDhaftX.vapGMd$.An36hlp3DXfkIC7bPZ0MDPo6Zvpk8JRrhy2LES.lZZj6JDa74oJkcMW3DCsIySvLJxOPXSShos0TpgJ/w0fH/";
isNormalUser = true;
+ shell = pkgs.fish;
+ home = "/persist/usr/kle";
createHome = true;
extraGroups = [ "wheel" "users" "networkmanager" "video" ];
packages = with pkgs; [
@@ -29,14 +40,13 @@ in
lynx
neovim
ranger
+ ripgrep
rsync
sshfs
tree
zip
];
- openssh.authorizedKeys.keys = [
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP7T2uWJFUu8aFZZgQusGKyEMocb2pKbHLDad2eIJus9"
- ];
+ openssh.authorizedKeys.keys = lib.splitString "\n" (builtins.readFile gitKeys);
};
};
@@ -48,16 +58,24 @@ in
programs.ssh = {
knownHosts = {
"github.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl";
+ "gitlab.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf";
+ "git.sr.ht".publicKey = " ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMZvRd4EtM7R+IHVMWmDkVU3VLQTSwQDSAvW0t2Tkj60";
+ "pascal.ee.ryerson.ca".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFmWInQNT6EoU1NtUYzTs5jtpfbO/m6yvCckOiEGjvDc";
};
extraConfig = ''
Host github
HostName github.com
User git
PreferredAuthentications publickey
+
+ Host ee
+ HostName pascal.ee.ryerson.ca
+ User kbujari
'';
};
programs.git = {
+ enable = true;
config = {
init.defaultBranch = "master";
fetch.prune = true;