2024-03-14 02:23:28 +01:00
|
|
|
{ config, desktop, lib, pkgs, ... }:
|
2023-08-23 10:04:54 +02:00
|
|
|
let
|
|
|
|
ifExists = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
|
|
|
in {
|
2023-08-23 07:30:15 +02:00
|
|
|
# Define a user account.
|
2023-12-17 01:06:31 +01:00
|
|
|
imports = [ ] ++ lib.optional (builtins.isString desktop) ./desktop.nix;
|
2023-12-13 00:44:16 +01:00
|
|
|
|
2024-01-18 06:45:54 +01:00
|
|
|
users = {
|
|
|
|
mutableUsers = false;
|
|
|
|
users.albert = {
|
|
|
|
isNormalUser = true;
|
|
|
|
description = "Albert J. Copeland";
|
|
|
|
# video is required for the "light" command to work
|
|
|
|
extraGroups = [ "networkmanager" "wheel" ]
|
2024-04-08 04:23:23 +02:00
|
|
|
++ ifExists [ "audio" ]
|
2024-02-13 14:20:05 +01:00
|
|
|
++ ifExists [ "video" ]
|
|
|
|
++ ifExists [ "docker" ]
|
2024-03-14 02:23:28 +01:00
|
|
|
++ ifExists [ "podman" ]
|
2024-02-13 14:20:05 +01:00
|
|
|
++ ifExists [ "syncthing" ];
|
2024-04-29 05:28:40 +02:00
|
|
|
shell = pkgs.fish;
|
2024-01-18 06:45:54 +01:00
|
|
|
# mkpasswd -m sha-512
|
|
|
|
hashedPassword = "$y$j9T$wKLsIWaA4Gf63RvjedwLJ0$EHKL6BBJV0CAxEKcHHjaBqW085KJ/MGvmbyWzmcWOy6";
|
|
|
|
packages = [ pkgs.home-manager ];
|
|
|
|
openssh.authorizedKeys.keyFiles = [ ../../../keys/ssh/keys.txt ];
|
|
|
|
};
|
|
|
|
groups.albert = {
|
|
|
|
gid = 1000;
|
|
|
|
name = "albert";
|
|
|
|
members = [ "albert" ];
|
|
|
|
};
|
2024-01-13 03:15:04 +01:00
|
|
|
};
|
|
|
|
|
2023-12-13 00:44:16 +01:00
|
|
|
# Make this user trusted
|
|
|
|
nix.settings.trusted-users = [ "albert" ];
|
2024-01-13 03:15:04 +01:00
|
|
|
}
|