40 lines
959 B
Nix
40 lines
959 B
Nix
{ pkgs, config, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.eboskma.users.erwin;
|
|
in
|
|
{
|
|
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'";
|
|
};
|
|
};
|
|
|
|
|
|
|
|
imports = [ ./home.nix ./work.nix ];
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
users.users.erwin = {
|
|
isNormalUser = true;
|
|
home = "/home/erwin";
|
|
extraGroups = [ "wheel" "adm" "audio" "video" "dialout" ];
|
|
shell = pkgs.fish;
|
|
openssh.authorizedKeys.keyFiles = [
|
|
(pkgs.fetchurl {
|
|
url = "https://github.com/eboskma.keys";
|
|
sha256 = "uwK4FSLSHiwCJU9U7RBFHIoCmr7uUQLM0JM1u0bi4xo=";
|
|
})
|
|
];
|
|
};
|
|
|
|
nix.settings.allowed-users = [ "erwin" ];
|
|
};
|
|
}
|