40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
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";
|
|
server = mkEnableOption "server 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 ./server.nix ./work.nix ];
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
users.users.erwin = {
|
|
isNormalUser = true;
|
|
home = "/home/erwin";
|
|
extraGroups = [ "wheel" "adm" "audio" "video" "dialout" "input" ]
|
|
++ (optional config.hardware.i2c.enable config.hardware.i2c.group);
|
|
shell = config.home-manager.users.erwin.programs.nushell.package;
|
|
openssh.authorizedKeys.keyFiles = [
|
|
(pkgs.fetchurl {
|
|
url = "https://github.com/eboskma.keys";
|
|
sha256 = "5pkayHiDL5JfXqAmTGtaYpbrjIjHFHyJWOLnM4yqgK0=";
|
|
})
|
|
];
|
|
};
|
|
|
|
nix.settings.allowed-users = [ "erwin" ];
|
|
};
|
|
}
|