system/home/users/jan/default.nix

63 lines
1.6 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config
, pkgs
, lib
, inputs
, extraHomeModule ? null
, extraJanHomeModule ? null
, ...
}:
let
data = import ../../../data.nix;
in
{
nixpkgs.overlays = lib.mkAfter [
inputs.myneovim.overlays.default
inputs.nil.overlays.default
inputs.vnetod.overlays.default
inputs.wired.overlays.default
];
programs.zsh.enable = true;
users.users.jan = {
isNormalUser = true;
extraGroups = [
"wheel" # Enable sudo for the user.
(lib.mkIf config.networking.networkmanager.enable "networkmanager")
(lib.mkIf config.virtualisation.docker.enable "docker")
(lib.mkIf config.services.transmission.enable "transmission")
(lib.mkIf config.services.kubo.enable config.services.kubo.group)
(lib.mkIf config.programs.adb.enable "adbusers")
(lib.mkIf config.programs.adb.enable "plugdev")
(lib.mkIf config.hardware.pulseaudio.systemWide "pulse-access")
];
shell = pkgs.zsh;
hashedPasswordFile = config.age.secrets.users-jan-passfile.path;
openssh.authorizedKeys.keys = data.publicKeys.users.jan;
};
users.groups.plugdev = lib.mkIf config.programs.adb.enable { };
home-manager.users.jan = { lib, ... }: {
imports = [
inputs.wired.homeManagerModules.default
./home.nix
extraHomeModule
extraJanHomeModule
];
home.stateVersion = config.system.stateVersion;
home.packages = [
(pkgs.callPackage ../../../packages/git-crypt-rm-gpg-user { })
];
};
nix.settings.trusted-users = lib.mkAfter [ "jan" ];
age.secrets.users-jan-passfile.file = ../../../secrets/users-jan-passfile.age;
}