2022-03-23 13:10:18 +01:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
2023-04-19 01:01:07 +02:00
|
|
|
inputs,
|
2022-03-23 13:10:18 +01:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
cfg = config.users.custom.malte;
|
|
|
|
in {
|
|
|
|
options.users.custom.malte = with lib; {
|
2022-12-01 22:54:40 +01:00
|
|
|
enable = mkEnableOption "user 'malte' on this machine";
|
2022-03-23 13:10:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
users.users.malte = {
|
|
|
|
description = "Malte Tammena";
|
|
|
|
hashedPassword = "$6$zqEC2iJJ98Ne$lRERO30msyjJm7oJCqRD/xj3NIm4De37gD.VUzfg7aceosE/6S6eNAaruIakgUtSC970MHRPoNlCEy1RoFuyh.";
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [
|
|
|
|
"wheel"
|
|
|
|
"networkmanager"
|
|
|
|
"video"
|
2022-12-24 00:20:51 +01:00
|
|
|
"render"
|
2022-03-23 13:10:18 +01:00
|
|
|
"lp"
|
|
|
|
"kvm"
|
|
|
|
"libvirtd"
|
|
|
|
"podman"
|
|
|
|
"corectrl"
|
|
|
|
"scanner"
|
2022-03-28 22:36:40 +02:00
|
|
|
"input"
|
2023-11-15 16:44:36 +01:00
|
|
|
config.users.groups.adbusers.name
|
2022-03-23 13:10:18 +01:00
|
|
|
config.users.groups.keys.name
|
|
|
|
];
|
|
|
|
# Yes, use the best, please
|
|
|
|
shell = pkgs.fish;
|
2022-12-01 22:54:40 +01:00
|
|
|
# Allow my yubikey everywhere
|
|
|
|
openssh.authorizedKeys.keyFiles = [../users/malte/yubikey.pub];
|
2022-03-23 13:10:18 +01:00
|
|
|
};
|
2023-11-15 16:44:36 +01:00
|
|
|
users.groups.adbusers = {};
|
2022-03-23 13:10:18 +01:00
|
|
|
|
2023-04-19 01:01:07 +02:00
|
|
|
home-manager.users.malte.imports = [../users/malte/home.nix inputs.nix-colors.homeManagerModule inputs.hyprland.homeManagerModules.default];
|
2022-03-23 13:10:18 +01:00
|
|
|
programs.fish.enable = true;
|
|
|
|
|
2023-08-16 23:11:56 +02:00
|
|
|
services.udev.packages = [
|
2022-05-30 18:31:39 +02:00
|
|
|
pkgs.android-udev-rules
|
|
|
|
];
|
|
|
|
|
2022-06-16 11:12:06 +02:00
|
|
|
# TODO: Remove after switching occupation
|
2023-08-16 23:11:56 +02:00
|
|
|
services.clamav.daemon.enable = true;
|
|
|
|
services.clamav.updater.enable = true;
|
2022-06-16 11:12:06 +02:00
|
|
|
|
2022-09-12 12:56:20 +02:00
|
|
|
services.flatpak.enable = true;
|
|
|
|
|
2023-07-03 11:20:50 +02:00
|
|
|
programs.hyprland = {
|
|
|
|
enable = true;
|
2023-12-01 21:33:01 +01:00
|
|
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
2023-07-03 11:20:50 +02:00
|
|
|
xwayland = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2023-08-27 13:52:13 +02:00
|
|
|
enableNvidiaPatches = config.settings.nvidiaUsed;
|
2023-07-03 11:20:50 +02:00
|
|
|
};
|
|
|
|
|
2023-11-30 18:22:38 +01:00
|
|
|
# TODO: Remove/Move
|
|
|
|
services.mysql = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.mariadb;
|
|
|
|
ensureDatabases = ["notenbuch"];
|
|
|
|
ensureUsers = [
|
|
|
|
{
|
|
|
|
name = "malte";
|
|
|
|
ensurePermissions = {
|
|
|
|
"notenbuch.*" = "ALL PRIVILEGES";
|
|
|
|
"*.*" = "CREATE USER, GRANT OPTION, RELOAD, SELECT, DROP";
|
|
|
|
};
|
|
|
|
}
|
2023-11-28 14:34:54 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-03-29 17:00:31 +02:00
|
|
|
sops.secrets = let
|
|
|
|
sopsFile = ../secrets/users/malte/secrets.yaml;
|
|
|
|
owner = "malte";
|
|
|
|
mode = "0400";
|
|
|
|
in {
|
|
|
|
restic-backup-malte = {
|
|
|
|
inherit sopsFile owner mode;
|
2022-03-23 13:10:18 +01:00
|
|
|
key = "restic-backup";
|
|
|
|
};
|
2022-03-29 17:00:31 +02:00
|
|
|
radicale-password = {
|
|
|
|
inherit sopsFile owner mode;
|
|
|
|
};
|
2022-04-04 13:45:48 +02:00
|
|
|
pw-mail-pm = {
|
|
|
|
inherit sopsFile owner mode;
|
|
|
|
};
|
|
|
|
pw-mail-uni = {
|
|
|
|
inherit sopsFile owner mode;
|
|
|
|
};
|
|
|
|
pw-mail-gmx = {
|
|
|
|
inherit sopsFile owner mode;
|
|
|
|
};
|
|
|
|
pw-mail-schulverwalter = {
|
|
|
|
inherit sopsFile owner mode;
|
|
|
|
};
|
2022-03-23 13:10:18 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|