2024-04-16 02:51:46 +03:00
|
|
|
|
{ config, pkgs, lib, inputs, globalData, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
nixpkgs.overlays = lib.mkAfter [
|
|
|
|
|
inputs.myneovim.overlays.default
|
|
|
|
|
inputs.nil.overlays.default
|
|
|
|
|
inputs.wired.overlays.default
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
|
|
|
|
|
|
nix.settings.trusted-users = lib.mkAfter [ "jan" ];
|
|
|
|
|
|
|
|
|
|
age.secrets.users-jan-passfile.file = ./users-jan-passfile.age;
|
|
|
|
|
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 = globalData.publicKeys.users.jan;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
users.groups.plugdev = lib.mkIf config.programs.adb.enable { };
|
|
|
|
|
|
2024-04-16 11:28:28 +03:00
|
|
|
|
networking.firewall.allowedUDPPorts =
|
|
|
|
|
let lanMouseCfg = config.home-manager.users.jan.local.services.lan-mouse;
|
2024-04-16 13:14:23 +03:00
|
|
|
|
in lib.optional lanMouseCfg.enable lanMouseCfg.settings.port;
|
2024-04-16 11:28:28 +03:00
|
|
|
|
|
2024-04-16 02:51:46 +03:00
|
|
|
|
home-manager.users.jan = {
|
|
|
|
|
imports = [
|
|
|
|
|
./accounts.secret.nix
|
|
|
|
|
./git
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
|
# Configs
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
local.keyboard = {
|
|
|
|
|
enable = true;
|
|
|
|
|
variant = "dvorak,";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
local.window-manager = {
|
2024-04-22 23:43:16 +03:00
|
|
|
|
xmonad.enable = lib.mkDefault true;
|
|
|
|
|
polybar.enable = lib.mkDefault true;
|
2024-04-16 02:51:46 +03:00
|
|
|
|
};
|
|
|
|
|
|
2024-04-22 23:43:16 +03:00
|
|
|
|
xdg.enable = lib.mkDefault true;
|
2024-04-16 02:51:46 +03:00
|
|
|
|
|
2024-04-22 23:43:16 +03:00
|
|
|
|
local.shell.enable = lib.mkDefault true;
|
2024-04-16 02:51:46 +03:00
|
|
|
|
|
2024-04-16 18:01:38 +03:00
|
|
|
|
|
2024-04-16 02:51:46 +03:00
|
|
|
|
################################################################################
|
|
|
|
|
# Programs
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2024-04-24 01:03:36 +03:00
|
|
|
|
local.programs.terminals = {
|
|
|
|
|
wezterm.enable = lib.mkDefault config.local.window-manager.xmonad.enable;
|
|
|
|
|
foot.enable = lib.mkDefault (!config.local.window-manager.xmonad.enable);
|
|
|
|
|
};
|
2024-04-16 02:51:46 +03:00
|
|
|
|
|
2024-04-16 11:28:28 +03:00
|
|
|
|
local.programs.editors.neovim = {
|
|
|
|
|
enable = lib.mkDefault true;
|
|
|
|
|
defaultEditor = lib.mkDefault true;
|
|
|
|
|
ltex.enable = lib.mkDefault true;
|
|
|
|
|
|
|
|
|
|
nix.enable = lib.mkDefault true;
|
|
|
|
|
rust.enable = lib.mkDefault true;
|
|
|
|
|
typescript.enable = lib.mkDefault true;
|
|
|
|
|
vue.enable = lib.mkDefault true;
|
|
|
|
|
deno.enable = lib.mkDefault true;
|
|
|
|
|
python.enable = lib.mkDefault true;
|
|
|
|
|
};
|
2024-04-16 02:51:46 +03:00
|
|
|
|
|
|
|
|
|
local.programs.file-managers.vifm.enable = lib.mkDefault true;
|
|
|
|
|
|
|
|
|
|
local.programs.aerc.enable = lib.mkDefault true;
|
2024-05-04 00:52:53 +03:00
|
|
|
|
local.programs.nom.enable = lib.mkDefault true;
|
2024-04-16 02:51:46 +03:00
|
|
|
|
|
|
|
|
|
local.programs.communication = {
|
|
|
|
|
telegram.enable = lib.mkDefault true;
|
|
|
|
|
matrix.enable = lib.mkDefault true;
|
|
|
|
|
simplex-chat.enable = lib.mkDefault (config.local.system.kernel != "hardened");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
local.programs.dev-tools = {
|
|
|
|
|
base.enable = lib.mkDefault true;
|
|
|
|
|
nix.enable = lib.mkDefault true;
|
|
|
|
|
web.enable = lib.mkDefault true;
|
|
|
|
|
psql = {
|
|
|
|
|
enable = lib.mkDefault true;
|
|
|
|
|
package = lib.mkDefault pkgs.postgresql_14;
|
|
|
|
|
};
|
|
|
|
|
eza.enable = lib.mkDefault true;
|
|
|
|
|
direnv.enable = lib.mkDefault true;
|
|
|
|
|
zoxide.enable = lib.mkDefault true;
|
|
|
|
|
};
|
|
|
|
|
|
2024-04-16 11:28:28 +03:00
|
|
|
|
local.programs.share-files.croc.enable = lib.mkDefault true;
|
|
|
|
|
|
2024-04-23 13:54:45 +03:00
|
|
|
|
local.programs.flameshot.enable = lib.mkDefault true;
|
|
|
|
|
|
2024-04-16 11:28:28 +03:00
|
|
|
|
################################################################################
|
|
|
|
|
# Services
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
local.services.wired.enable = lib.mkDefault true;
|
|
|
|
|
|
|
|
|
|
local.services.lan-mouse = {
|
2024-04-16 13:14:23 +03:00
|
|
|
|
# x11 input capture not available: not implemented
|
|
|
|
|
enable = lib.mkDefault false;
|
|
|
|
|
settings = {
|
|
|
|
|
# releaseBind = [ "KeyLeftCtrl" "KeyLeftShift" "KeyF1" ];
|
|
|
|
|
port = lib.mkDefault 32000;
|
|
|
|
|
frontend = "cli";
|
|
|
|
|
};
|
2024-04-16 11:28:28 +03:00
|
|
|
|
};
|
2024-04-16 02:51:46 +03:00
|
|
|
|
|
2024-04-18 16:01:30 +03:00
|
|
|
|
services.pass-secret-service = lib.mkIf config.local.programs.pass.enable {
|
|
|
|
|
enable = true;
|
|
|
|
|
storePath = config.home-manager.users.jan.home.sessionVariables.PASSWORD_STORE_DIR;
|
|
|
|
|
};
|
|
|
|
|
home.sessionVariables = lib.mkIf config.local.programs.pass.enable {
|
|
|
|
|
PASSWORD_STORE_DIR = "${config.home-manager.users.jan.xdg.dataHome}/pass/store";
|
|
|
|
|
};
|
2024-04-17 17:21:35 +03:00
|
|
|
|
|
2024-04-16 02:51:46 +03:00
|
|
|
|
################################################################################
|
|
|
|
|
# Packages
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
home.packages = with pkgs.unstable; [
|
|
|
|
|
image-roll
|
2024-05-04 00:52:53 +03:00
|
|
|
|
# vlc
|
2024-04-16 02:51:46 +03:00
|
|
|
|
|
|
|
|
|
# tools
|
|
|
|
|
procs
|
|
|
|
|
bottom
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
home.file = {
|
|
|
|
|
"pictures/wallpapers" = {
|
|
|
|
|
source = ./wallpapers;
|
|
|
|
|
recursive = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
home.stateVersion = config.system.stateVersion;
|
|
|
|
|
};
|
|
|
|
|
}
|