{ config, inputs, lib, pkgs, this, ... }: with lib; let cfg = config.nixfiles.modules.profiles.headful; in { options.nixfiles.modules.profiles.headful.enable = mkEnableOption "headful profile" // { default = this.isHeadful; }; config = mkIf cfg.enable { nixfiles.modules = { profiles.dev.enable = true; alacritty.enable = mkDefault true; aria2.enable = true; chromium.enable = true; dwm.enable = mkDefault false; emacs.enable = true; firefox.enable = true; foot.enable = mkDefault true; kde.enable = mkDefault true; mpv.enable = true; nullmailer.enable = true; openssh.client.enable = true; password-store.enable = true; sound.enable = true; thunderbird.enable = true; vscode.enable = true; wayland.enable = mkDefault true; x11.enable = mkDefault true; zathura.enable = true; }; hm = { imports = [ inputs.nix-index-database.hmModules.nix-index ]; home = { file.".digrc".text = '' +answer +multiline +recurse ''; packages = with pkgs; [ anki audacity byedpi eaglemode element-desktop fd gimp imv kdenlive libreoffice-fresh mumble obs-studio qbittorrent ripgrep sd telegram-desktop tldr tor-browser-bundle-bin vesktop ]; }; programs = { bash.shellAliases.open = "xdg-open"; nix-index-database.comma.enable = true; }; }; boot = { kernelPackages = mkDefault pkgs.linuxPackages_latest; kernelParams = [ # https://wiki.archlinux.org/title/improving_performance#Watchdogs "nowatchdog" "kernel.nmi_watchdog=0" # A security risk I'm willing to take for a reason[1]. # # [1]: https://www.phoronix.com/scan.php?page=article&item=spectre-meltdown-2&num=11 "mitigations=off" ]; loader = { efi.canTouchEfiVariables = true; systemd-boot = { enable = true; editor = false; configurationLimit = 10; }; }; }; hardware.graphics.enable = true; nix = { daemonCPUSchedPolicy = "idle"; daemonIOSchedClass = "idle"; daemonIOSchedPriority = 7; gc.automatic = false; optimise.automatic = false; }; programs = { dconf.enable = true; iftop.enable = true; mtr.enable = true; }; services = { fwupd.enable = true; libinput.enable = true; psd.enable = true; upower.enable = true; }; time.timeZone = "Europe/Moscow"; environment.systemPackages = with pkgs; [ brightnessctl lm_sensors usbutils wirelesstools ]; my.extraGroups = [ "audio" "input" "render" "video" ]; # https://github.com/NixOS/nix/issues/3995#issuecomment-2081164515 system.extraDependencies = let collectFlakeInputs = input: [ input ] ++ concatMap collectFlakeInputs (attrValues (input.inputs or { })); in concatMap collectFlakeInputs (attrValues inputs); }; }