{ config, inputs, lib, pkgs, ... }: let inherit (lib.meta) getExe; inherit (config.poz.other.system) username; in { nixpkgs.config = { permittedInsecurePackages = [ "olm-3.2.16" ]; allowUnfree = true; }; nix.settings = { max-jobs = 2; cores = 3; }; # swapDevices = [ # { # device = "/var/lib/swapfile"; # size = 48 * 1024; # } # ]; programs = { dconf.enable = true; kdeconnect.enable = true; noisetorch.enable = true; }; security.sudo.package = pkgs.sudo.override { withInsults = true; }; security.polkit.enable = true; users.users.${username} = { extraGroups = [ "video" "docker" ]; }; environment.sessionVariables = { CHROME_EXECUTABLE = getExe pkgs.ungoogled-chromium; }; hardware = { sensor.iio.enable = true; # ipu6 = { # enable = true; # platform = "ipu6"; # }; graphics = { enable = true; enable32Bit = true; extraPackages = with pkgs; [ mesa libdrm libva vaapiVdpau libvdpau-va-gl ]; extraPackages32 = with pkgs; [ driversi686Linux.mesa driversi686Linux.libvdpau-va-gl ]; }; }; services = { pcscd.enable = true; udisks2.enable = true; dbus.enable = true; fwupd = { enable = true; }; ratbagd.enable = true; # TODO build failure # fprintd = { # enable = true; # tod = { # enable = true; # driver = pkgs.libfprint-2-tod1-goodix; # }; # }; smartd.enable = true; flatpak.enable = true; }; services.journald = { extraConfig = '' SystemMaxUse=100M ''; }; services.udev = { packages = with pkgs; [ yubikey-personalization ]; }; networking.proxy = { inherit (inputs.work-secrets.proxy) default noProxy; }; services.xserver.videoDrivers = [ "displaylink" "modesetting" ]; boot = { extraModulePackages = with config.boot.kernelPackages; [ evdi ]; kernelModules = [ "evdi" ]; }; # for vpn-slice environment.etc.hosts.mode = "0644"; poz = { other = { home-manager = { enable = true; enableDirenv = true; }; networking = { enable = true; plugins = [ pkgs.networkmanager-openconnect ]; }; }; programs = { agenix.enable = true; nh = let home = config.home-manager.users.${username}.home.homeDirectory; in { enable = true; flake = "${home}/niksos"; }; starship.enable = true; zsh = { enable = true; extraAliases = { u = "nh os switch -H ${inputs.work-secrets.hostname}"; }; profiling = false; }; zoxide.enable = true; anyrun.enable = true; btop.enable = true; foot.enable = true; mpv.enable = true; neovim = { enable = true; enableLsp = true; }; zathura.enable = true; hypr = { land = { enable = true; extraPlugins = [ inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces ]; }; lock.enable = true; idle.enable = true; }; quickshell = { enable = true; enabledConfigs = [ "powermenu" "poz" ]; }; }; services = { dunst.enable = true; greetd = { enable = true; greeter = "gtkgreet"; launchOptions = [ "Hyprland" "sway" "zsh" "reboot" "shutdown now" ]; }; pipewire.enable = true; }; }; system.stateVersion = "23.11"; }