{ config, inputs, lib, pkgs, ... }: let inherit (lib.meta) getExe; in { nixpkgs.config = { permittedInsecurePackages = [ "python-2.7.18.6" "electron-24.8.6" "electron-25.9.0" ]; allowUnfree = true; }; boot = { # extraModulePackages = with config.boot.kernelPackages; [ ddcci-driver ]; # kernelModules = [ "ddcci" ]; }; nix.settings = { max-jobs = 3; cores = 4; }; programs = { dconf.enable = true; kdeconnect.enable = true; noisetorch.enable = true; }; security.sudo.package = pkgs.sudo.override { withInsults = true; }; security.polkit.enable = true; environment.sessionVariables = { CHROME_EXECUTABLE = getExe pkgs.ungoogled-chromium; }; services = { pcscd.enable = true; udisks2.enable = true; dbus.enable = true; fwupd = { enable = true; }; ratbagd.enable = true; smartd.enable = true; flatpak.enable = true; }; services.journald = { extraConfig = '' SystemMaxUse=100M ''; }; services.udev = { packages = with pkgs; [ yubikey-personalization ]; }; # this makes usb devices autosuspend #powerManagement.powertop.enable = true; poz = { other.home-manager = { enable = true; enableDirenv = true; }; programs = { agenix.enable = true; nh = let inherit (config.poz.other.system) username; 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 niks"; us = "NIX_SSHOPTS='-t' nixos-rebuild switch --flake \"/home/jacek/niksos#chmura\" -L --use-remote-sudo --target-host chmura"; # TODO use this when nh supports it #us = "NIX_SSHOPTS='-t' nh os switch -H chmura -- --store ssh-ng://chmura"; }; profiling = false; }; zoxide.enable = true; anyrun.enable = true; vesktop.enable = true; btop.enable = true; foot.enable = true; mpv = { enable = true; gpu = "AMD Radeon RX 6800M (RADV NAVI22)"; }; neovim.enable = true; zathura.enable = true; hypr = { land = { enable = true; startupSound = ./mathis.m4a; extraPlugins = [ inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces ]; extraSettings = { exec = let swww = getExe inputs.nixpkgs-wayland.packages.${pkgs.system}.swww; in [ # wait a bit then set the wallpapers "sleep 0.5 && ${swww} img -o eDP-1 ${./catppuccin-wall0.png}" "sleep 0.5 && ${swww} img -o HDMI-A-1 ${./catppuccin-wall1.png}" ]; }; }; lock.enable = true; idle.enable = true; }; newsboat.enable = true; }; services = { dunst.enable = true; mpd = { enable = true; musicDirectory = "/run/media/data/Music"; }; greetd = { enable = true; greeter = "gtkgreet"; launchOptions = [ "Hyprland" "sway" "zsh" "reboot" "shutdown now" ]; }; pipewire.enable = true; syncthing.enable = true; }; }; system.stateVersion = "23.11"; }