2022-07-12 08:37:28 +02:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.eboskma.users.erwin;
|
|
|
|
in
|
|
|
|
{
|
2022-11-19 20:00:54 +01:00
|
|
|
options.eboskma.users.erwin = {
|
|
|
|
enable = mkEnableOption "user account for Erwin";
|
|
|
|
|
|
|
|
home = mkEnableOption "home profile";
|
|
|
|
work = mkEnableOption "work profile";
|
|
|
|
terminal = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = "foot";
|
|
|
|
description = "Terminal emulator to use. Specify the .desktop filename, e.g. 'foot' or 'Alacritty'";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2022-07-12 08:37:28 +02:00
|
|
|
|
2022-11-11 11:54:21 +01:00
|
|
|
imports = [ ./home.nix ./work.nix ];
|
2022-07-12 08:37:28 +02:00
|
|
|
|
2022-10-05 11:32:13 +02:00
|
|
|
config = mkIf cfg.enable {
|
2021-11-12 07:23:46 +01:00
|
|
|
|
2022-07-12 08:37:28 +02:00
|
|
|
users.users.erwin = {
|
|
|
|
isNormalUser = true;
|
|
|
|
home = "/home/erwin";
|
2022-08-09 17:03:48 +02:00
|
|
|
extraGroups = [ "wheel" "adm" "audio" "video" "dialout" ];
|
2022-07-12 08:37:28 +02:00
|
|
|
shell = pkgs.fish;
|
|
|
|
openssh.authorizedKeys.keyFiles = [
|
|
|
|
(pkgs.fetchurl {
|
|
|
|
url = "https://github.com/eboskma.keys";
|
2022-10-30 21:09:15 +01:00
|
|
|
sha256 = "uwK4FSLSHiwCJU9U7RBFHIoCmr7uUQLM0JM1u0bi4xo=";
|
2022-07-12 08:37:28 +02:00
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nix.settings.allowed-users = [ "erwin" ];
|
|
|
|
};
|
2021-11-12 07:23:46 +01:00
|
|
|
}
|