diff --git a/flake.lock b/flake.lock index bb69012..f45f19d 100644 --- a/flake.lock +++ b/flake.lock @@ -104,11 +104,11 @@ "blocklist-hosts": { "flake": false, "locked": { - "lastModified": 1760670453, - "narHash": "sha256-KQx4CWPfKBJwuBONYSE7AIKa7UBXBvtNVcrOmkPrjkY=", + "lastModified": 1762541446, + "narHash": "sha256-9L4jyN+ByqdjpsymZW+W56IV3D1mi63D9hm4bcltlfI=", "owner": "StevenBlack", "repo": "hosts", - "rev": "5da10a61afc297307c489903bfc35b1eb8dac674", + "rev": "99bdb28ee250dd2ad83eeefda0bf64e6262a46ca", "type": "github" }, "original": { @@ -126,11 +126,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1761326352, - "narHash": "sha256-DoR4mHaStX6Dg2Gilc2Dqr/XaxXmQTOQS5cZ5xKPQJY=", + "lastModified": 1762542222, + "narHash": "sha256-d46HIbWOP7NXcKPYnO+E1ihn2O5cscsvGr8oQSrVQKg=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "6492dc810f2f250ef95096910a44f03eea6a594f", + "rev": "38976b6f30bf13c208066a2f9271b4f5367e4b78", "type": "github" }, "original": { @@ -147,11 +147,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1761325938, - "narHash": "sha256-E2dm2bIlu1zBVBAVYM2bZVdr9vkzXGj70aLTfXuXUKA=", + "lastModified": 1762593927, + "narHash": "sha256-5MYTB/RUF197w6KwTqnZB0sgOiPp+tqaDdEOJrZ6cuA=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "99807d1b33588b9d113fc5e9cca87e4f1ae3e0a1", + "rev": "4aaea6591714bb81186d13dcdbf9cecbcb20de72", "type": "github" }, "original": { @@ -322,11 +322,11 @@ ] }, "locked": { - "lastModified": 1761266473, - "narHash": "sha256-QxCyKWBmuzI+eMhYV1JmbZsiUnBNATRP1EW34OBt5Vg=", + "lastModified": 1762463325, + "narHash": "sha256-33YUsWpPyeBZEWrKQ2a1gkRZ7i0XCC/2MYpU6BVeQSU=", "owner": "nix-community", "repo": "home-manager", - "rev": "5c71d4a730bd3c972befff343bb074421e345937", + "rev": "0562fef070a1027325dd4ea10813d64d2c967b39", "type": "github" }, "original": { @@ -342,11 +342,11 @@ ] }, "locked": { - "lastModified": 1761316995, - "narHash": "sha256-BAAjCpjTnfaxtc9NCkbUl9MUv5JmAG5qU7/G8TTHmb4=", + "lastModified": 1762463325, + "narHash": "sha256-33YUsWpPyeBZEWrKQ2a1gkRZ7i0XCC/2MYpU6BVeQSU=", "owner": "nix-community", "repo": "home-manager", - "rev": "82b58f38202540bce4e5e00759d115c5a43cab85", + "rev": "0562fef070a1027325dd4ea10813d64d2c967b39", "type": "github" }, "original": { @@ -806,11 +806,11 @@ ] }, "locked": { - "lastModified": 1761202163, - "narHash": "sha256-6RySf5VQElrm7RYGWxlIkNttemDp4FF0aH+LX435G2Y=", + "lastModified": 1762452596, + "narHash": "sha256-Iaga+mkwWnWa6FxsAYknpHzeP344VCKGkdudX420LgA=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "47976126007d9658ca4ac4dd933bea8846170fd9", + "rev": "99919fd35e70c1b18ce948d5329928d751031312", "type": "github" }, "original": { @@ -859,11 +859,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1761114652, - "narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=", + "lastModified": 1762363567, + "narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c", + "rev": "ae814fd3904b621d8ab97418f1d0f2eb0d3716f4", "type": "github" }, "original": { @@ -875,11 +875,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1761173472, - "narHash": "sha256-m9W0dYXflzeGgKNravKJvTMR4Qqa2MVD11AwlGMufeE=", + "lastModified": 1762498405, + "narHash": "sha256-Zg/SCgCaAioc0/SVZQJxuECGPJy+OAeBcGeA5okdYDc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c8aa8cc00a5cb57fada0851a038d35c08a36a2bb", + "rev": "6faeb062ee4cf4f105989d490831713cc5a43ee1", "type": "github" }, "original": { @@ -891,11 +891,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1761173472, - "narHash": "sha256-m9W0dYXflzeGgKNravKJvTMR4Qqa2MVD11AwlGMufeE=", + "lastModified": 1762498405, + "narHash": "sha256-Zg/SCgCaAioc0/SVZQJxuECGPJy+OAeBcGeA5okdYDc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c8aa8cc00a5cb57fada0851a038d35c08a36a2bb", + "rev": "6faeb062ee4cf4f105989d490831713cc5a43ee1", "type": "github" }, "original": { @@ -906,11 +906,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1761114652, - "narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=", + "lastModified": 1762363567, + "narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c", + "rev": "ae814fd3904b621d8ab97418f1d0f2eb0d3716f4", "type": "github" }, "original": { @@ -986,11 +986,11 @@ ] }, "locked": { - "lastModified": 1761078382, - "narHash": "sha256-JNJesbe9MMN1Brq41BHEpuH+Z+Zg74y/nI5AFZX84Vw=", + "lastModified": 1762274591, + "narHash": "sha256-Vbhluvk15qwiyNDyPd9tjJh9gxIfUjbKVT79c05Pd3I=", "owner": "nix-community", "repo": "plasma-manager", - "rev": "27dfa61b64d0cdb8e4ba6f3aaa4d4e067d64cb5c", + "rev": "6296d7100cc84b2ff732b7c103a50c2856974cf6", "type": "github" }, "original": { @@ -1048,11 +1048,11 @@ ] }, "locked": { - "lastModified": 1761273263, - "narHash": "sha256-6d6ojnu6A6sVxIjig8OL6E1T8Ge9st3YGgVwg5MOY+Q=", + "lastModified": 1762483116, + "narHash": "sha256-Z8EVsTH10BjCdFyPxbUu5jBV+HGL39rh9+beQcnNRm0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "28405834d4fdd458d28e123fae4db148daecec6f", + "rev": "9de55b59b6aaadbd9dbf223765a835239b767ee5", "type": "github" }, "original": { @@ -1066,11 +1066,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1761273263, - "narHash": "sha256-6d6ojnu6A6sVxIjig8OL6E1T8Ge9st3YGgVwg5MOY+Q=", + "lastModified": 1762569282, + "narHash": "sha256-vINZAJpXQTZd5cfh06Rcw7hesH7sGSvi+Tn+HUieJn8=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "28405834d4fdd458d28e123fae4db148daecec6f", + "rev": "a35a6144b976f70827c2fe2f5c89d16d8f9179d8", "type": "github" }, "original": { @@ -1118,11 +1118,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1761028816, - "narHash": "sha256-s1XiIeJHpODVWfzsPaK9e21iz1dQSCU3H4/1OxOsyps=", + "lastModified": 1762264356, + "narHash": "sha256-QVfC53Ri+8n3e7Ujx9kq6all3+TLBRRPRnc6No5qY5w=", "owner": "nix-community", "repo": "stylix", - "rev": "b81dc0a385443099e7d231fe6275189e32c3b760", + "rev": "647bb8dd96a206a1b79c4fd714affc88b409e10b", "type": "github" }, "original": { @@ -1297,11 +1297,11 @@ ] }, "locked": { - "lastModified": 1761221437, - "narHash": "sha256-6V+PkcUvinA/Ryl+tZO0pLvEmJWzfieMKj8UyAFvduo=", + "lastModified": 1762415361, + "narHash": "sha256-po1Ao4hmrC4+o0fvLLT4LN2z1hJ7XPRxpEpzF3cSarQ=", "owner": "winapps-org", "repo": "winapps", - "rev": "daa052d42d338a50bb3e093a0c86daa3d32f08c5", + "rev": "c088928440fdf80946de9131e81e081528a5e47a", "type": "github" }, "original": { diff --git a/hosts/duskfall/hardware-configuration.nix b/hosts/duskfall/hardware-configuration.nix index fb0ddf8..a5f0646 100644 --- a/hosts/duskfall/hardware-configuration.nix +++ b/hosts/duskfall/hardware-configuration.nix @@ -27,8 +27,7 @@ vpl-gpu-rt intel-media-driver intel-vaapi-driver - vaapiIntel - vaapiVdpau + libva-vdpau-driver libvdpau-va-gl ]; extraPackages32 = with pkgs.driversi686Linux; [ diff --git a/hosts/ori/home.nix b/hosts/ori/home.nix index d5d547d..5e300f3 100644 --- a/hosts/ori/home.nix +++ b/hosts/ori/home.nix @@ -12,7 +12,6 @@ xdg.enable = false; # programs - ranger.enable = true; yazi.enable = true; git.enable = true; }; diff --git a/hosts/zenith/home.nix b/hosts/zenith/home.nix index 60e6c63..4a907b7 100644 --- a/hosts/zenith/home.nix +++ b/hosts/zenith/home.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, pkgs-stable, ... }: +{ + config, + lib, + pkgs, + pkgs-stable, + ... +}: { config = { @@ -43,7 +49,16 @@ }; home.packages = with pkgs; [ - openldap ldapvi rclone teams-for-linux pkgs-stable.rpi-imager freerdp pkgs-stable.tigervnc unixtools.xxd nodejs electron + openldap + ldapvi + rclone + teams-for-linux + #rpi-imager # FIXME + freerdp + pkgs-stable.tigervnc + unixtools.xxd + nodejs + electron ]; home.sessionVariables = lib.mkIf config.userSettings.hyprland.enable { diff --git a/modules/system/overlays/ranger.nix b/modules/system/overlays/ranger.nix deleted file mode 100644 index 3c338f8..0000000 --- a/modules/system/overlays/ranger.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ lib, pkgs, ... }: - -{ - config = { - nixpkgs.overlays = [ - (self: super: - { - ranger = super.ranger.overrideAttrs (oldAttrs: { - preConfigure = '' - substituteInPlace ranger/__init__.py \ - --replace "DEFAULT_PAGER = 'less'" "DEFAULT_PAGER = '${lib.getBin pkgs.bat}/bin/bat'" - - # give image previews out of the box when building with w3m - substituteInPlace ranger/config/rc.conf \ - --replace "set preview_images false" "set preview_images true" - - # adds this patch: https://github.com/ranger/ranger/pull/1758 - # fixes a bug for kitty users that use image previews - substituteInPlace ranger/ext/img_display.py \ - --replace "self.image_id -= 1" "self.image_id = max(0, self.image_id - 1)" - - # fixes the .desktop file - substituteInPlace doc/ranger.desktop \ - --replace "Icon=utilities-terminal" "Icon=user-desktop" - substituteInPlace doc/ranger.desktop \ - --replace "Terminal=true" "Terminal=false" - substituteInPlace doc/ranger.desktop \ - --replace "Exec=ranger" "Exec=kitty -e ranger %U" - ''; - }); - } - ) - ]; - }; -} diff --git a/modules/system/phoenix/default.nix b/modules/system/phoenix/default.nix index 798d1d6..55da3a0 100644 --- a/modules/system/phoenix/default.nix +++ b/modules/system/phoenix/default.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, pkgs-stable, ... }: +{ + config, + lib, + pkgs, + pkgs-stable, + ... +}: { options = { @@ -24,7 +30,8 @@ config = { environment.systemPackages = with pkgs; [ attic-client - git git-lfs + git + git-lfs nix-output-monitor (pkgs.writeScriptBin "phoenix" '' if [[ $EUID -ne 0 ]]; then @@ -70,30 +77,28 @@ chown -R 0:0 ${config.systemSettings.dotfilesDir}; chown -R 0:0 ${config.systemSettings.secretsFlakeDir}; exit 0; - # TODO allow specifying host with $2 in build subcommand elif [ "$1" = "build" ]; then - if [ "$#" -gt 1 ]; then - echo "Warning: The 'build' command has no subcommands (no $2 subcommand)"; - fi chown -R 0:0 ${config.systemSettings.dotfilesDir}; chown -R 0:0 ${config.systemSettings.secretsFlakeDir}; pushd ${config.systemSettings.dotfilesDir} &> /dev/null; - systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#snowfire; - systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#duskfall; - systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#zenith; - systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#stardust; - systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#ori; - systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; + if [ "$#" -gt 1 ]; then + hoststobuild=("''${@:2}") + for i in "''${hoststobuild[@]}" + do + systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#$i; + systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; + systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; + done + else + hoststobuild=($(find ${config.systemSettings.dotfilesDir}/hosts -maxdepth 1 -type d \! \( -name TEMPLATE \) \! \( -name hosts \) -exec basename {} \; | xargs -d " ")) + for i in "''${hoststobuild[@]}" + do + systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#$i; + systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; + systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; + done exit 0; + fi elif [ "$1" = "lock" ]; then if [ "$#" -gt 1 ]; then echo "Warning: The 'lock' command has no subcommands (no $2 subcommand)"; @@ -127,40 +132,43 @@ # FIXME this thing doesn't work at all systemd.services."phoenix-system-builder" = lib.mkIf config.systemSettings.systemBuilder.enable { path = with pkgs; [ - pkgs-stable.openssh git nix nixos-rebuild + pkgs-stable.openssh + git + nix + nixos-rebuild ]; script = '' - set -euo pipefail - export NIX_PATH="nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix" - echo "navigating to /etc/nixos"; - cd ${config.systemSettings.dotfilesDir}; - echo "running git pull"; - ${pkgs.git}/bin/git pull; - echo "running nix flake update"; - nix flake update; - ${pkgs.git}/bin/git stage *; - ${pkgs.git}/bin/git commit -m "Updated system" || true; - ${pkgs.git}/bin/git push || true; - cd ${config.systemSettings.secretsFlakeDir}; - ${pkgs.git}/bin/git pull; - chown -R 0:0 ${config.systemSettings.dotfilesDir}; - chown -R 0:0 ${config.systemSettings.secretsFlakeDir}; - cd ${config.systemSettings.dotfilesDir}; - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#snowfire; - ${pkgs.attic-client}/bin/attic push emmet ./result; - rm ./result; - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#duskfall; - ${pkgs.attic-client}/bin/attic push emmet ./result; - rm ./result; - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#zenith; - ${pkgs.attic-client}/bin/attic push emmet ./result; - rm ./result; - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#stardust; - ${pkgs.attic-client}/bin/attic push emmet ./result; - rm ./result; - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#ori; - ${pkgs.attic-client}/bin/attic push emmet ./result; - rm ./result; + set -euo pipefail + export NIX_PATH="nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix" + echo "navigating to /etc/nixos"; + cd ${config.systemSettings.dotfilesDir}; + echo "running git pull"; + ${pkgs.git}/bin/git pull; + echo "running nix flake update"; + nix flake update; + ${pkgs.git}/bin/git stage *; + ${pkgs.git}/bin/git commit -m "Updated system" || true; + ${pkgs.git}/bin/git push || true; + cd ${config.systemSettings.secretsFlakeDir}; + ${pkgs.git}/bin/git pull; + chown -R 0:0 ${config.systemSettings.dotfilesDir}; + chown -R 0:0 ${config.systemSettings.secretsFlakeDir}; + cd ${config.systemSettings.dotfilesDir}; + ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#snowfire; + ${pkgs.attic-client}/bin/attic push emmet ./result; + rm ./result; + ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#duskfall; + ${pkgs.attic-client}/bin/attic push emmet ./result; + rm ./result; + ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#zenith; + ${pkgs.attic-client}/bin/attic push emmet ./result; + rm ./result; + ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#stardust; + ${pkgs.attic-client}/bin/attic push emmet ./result; + rm ./result; + ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#ori; + ${pkgs.attic-client}/bin/attic push emmet ./result; + rm ./result; ''; serviceConfig = { Type = "simple"; diff --git a/modules/system/security/firejail/default.nix b/modules/system/security/firejail/default.nix index 35e3fb0..3daafbc 100644 --- a/modules/system/security/firejail/default.nix +++ b/modules/system/security/firejail/default.nix @@ -13,18 +13,26 @@ in { environment.systemPackages = with pkgs; [ firejail ]; programs.firejail.enable = true; programs.firejail.wrappedBinaries = { - #prismlauncher = { - # executable = "${pkgs.prismlauncher}/bin/prismlauncher"; - # profile = ./firejail-profiles/prismlauncher.profile; - #}; - #steam = { - # executable = "${pkgs.steam}/bin/steam"; - # profile = "${pkgs.firejail}/etc/firejail/steam.profile"; - #}; - #steam-run = { - # executable = "${pkgs.steam}/bin/steam-run"; - # profile = "${pkgs.firejail}/etc/firejail/steam.profile"; - #}; + brave = { + executable = "${pkgs.brave}/bin/brave"; + profile = "${pkgs.firejail}/etc/firejail/brave.profile"; + }; + discord = { + executable = "${pkgs.discord}/bin/discord"; + profile = "${pkgs.firejail}/etc/firejail/discord.profile"; + }; + prismlauncher = { + executable = "${pkgs.prismlauncher}/bin/prismlauncher"; + profile = ./firejail-profiles/prismlauncher.profile; + }; + steam = { + executable = "${pkgs.steam}/bin/steam"; + profile = "${pkgs.firejail}/etc/firejail/steam.profile"; + }; + steam-run = { + executable = "${pkgs.steam}/bin/steam-run"; + profile = "${pkgs.firejail}/etc/firejail/steam.profile"; + }; }; }; } diff --git a/modules/user/emacs/default.nix b/modules/user/emacs/default.nix index edab5b9..e29fb94 100644 --- a/modules/user/emacs/default.nix +++ b/modules/user/emacs/default.nix @@ -14,11 +14,13 @@ in { }; }; - config = lib.mkIf cfg.enable { - home.packages = with pkgs-stable; [ + ## THIS IS BROKEN BECAUSE THEY CHANGED EMACS IN NIXPKGS I THINK + config = lib.mkIf false { + #config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ (pkgs.emacsWithPackagesFromUsePackage { config = ./init.el; - package = pkgs-stable.emacs-pgtk; + package = pkgs.emacs-pgtk; alwaysEnsure = false; extraEmacsPackages = epkgs: with epkgs; [ org-modern olivetti @@ -142,7 +144,6 @@ in { }) fira-code nerd-fonts.fira-code - nil ]; home.file.".config/emacs/init.el".source = ./init.el; home.file.".config/emacs/lib".source = ./lib; diff --git a/modules/user/hyprland/default.nix b/modules/user/hyprland/default.nix index 3d565ed..35fc567 100644 --- a/modules/user/hyprland/default.nix +++ b/modules/user/hyprland/default.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, inputs, ... }: +{ + config, + lib, + pkgs, + inputs, + ... +}: let cfg = config.userSettings.hyprland; font = config.stylix.fonts.monospace.name; @@ -23,7 +29,9 @@ in userSettings.alacritty.enable = true; programs.alacritty.settings.window.opacity = lib.mkOverride 40 (if performance then 1.0 else 0.85); userSettings.kitty.enable = true; - programs.kitty.settings.background_opacity = lib.mkOverride 40 (if performance then "1.0" else "0.85"); + programs.kitty.settings.background_opacity = lib.mkOverride 40 ( + if performance then "1.0" else "0.85" + ); userSettings.emacs.opacity = lib.mkOverride 40 (if performance then 100 else 85); userSettings.dmenuScripts = { enable = true; @@ -52,11 +60,9 @@ in GRIM_DEFAULT_DIR = config.xdg.userDirs.extraConfig.XDG_SCREENSHOT_DIR; }; - xdg.portal = - { + xdg.portal = { enable = true; - extraPortals = with pkgs; - [ + extraPortals = with pkgs; [ xdg-desktop-portal-wlr xdg-desktop-portal-termfilechooser ]; @@ -73,11 +79,9 @@ in home.sessionVariables.TERMCMD = "kitty --class=filechoose_yazi"; - xdg.configFile."xdg-desktop-portal-termfilechooser/config" = - { + xdg.configFile."xdg-desktop-portal-termfilechooser/config" = { force = true; - text = - '' + text = '' [filechooser] cmd=${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh ''; @@ -115,13 +119,18 @@ in "alacritty --class scratch_numbat -e numbat" "alacritty --class scratch_btm -e btm" "element-desktop" + "zulip" "sleep 5 && hyprctl keyword bind SUPER,S,exec,${spawnBrowser}" ]; general = { layout = "master"; border_size = 0; - "col.active_border" = if performance then "0xff${config.lib.stylix.colors.base0B}" else "0xff${config.lib.stylix.colors.base08} 0xff${config.lib.stylix.colors.base09} 0xff${config.lib.stylix.colors.base0A} 0xff${config.lib.stylix.colors.base0B} 0xff${config.lib.stylix.colors.base0C} 0xff${config.lib.stylix.colors.base0D} 0xff${config.lib.stylix.colors.base0E} 0xff${config.lib.stylix.colors.base0F} 270deg"; + "col.active_border" = + if performance then + "0xff${config.lib.stylix.colors.base0B}" + else + "0xff${config.lib.stylix.colors.base08} 0xff${config.lib.stylix.colors.base09} 0xff${config.lib.stylix.colors.base0A} 0xff${config.lib.stylix.colors.base0B} 0xff${config.lib.stylix.colors.base0C} 0xff${config.lib.stylix.colors.base0D} 0xff${config.lib.stylix.colors.base0E} 0xff${config.lib.stylix.colors.base0F} 270deg"; "col.inactive_border" = "0xff${config.lib.stylix.colors.base02}"; resize_on_border = true; gaps_in = 14; @@ -130,7 +139,8 @@ in group = { "col.border_active" = config.wayland.windowManager.hyprland.settings.general."col.active_border"; - "col.border_inactive" = config.wayland.windowManager.hyprland.settings.general."col.inactive_border"; + "col.border_inactive" = + config.wayland.windowManager.hyprland.settings.general."col.inactive_border"; groupbar = { gradients = false; "col.active" = "0xff${config.lib.stylix.colors.base0B}"; @@ -286,8 +296,9 @@ in "SUPER,N,togglespecialworkspace,scratch_numbat" ''SUPER,B,exec,if hyprctl clients | grep scratch_btm; then echo "scratch_yazi respawn not needed"; else alacritty --class scratch_btm -e btm; fi'' "SUPER,B,togglespecialworkspace,scratch_btm" - ''SUPER,D,exec,if hyprctl clients | grep Element; then echo "scratch_yazi respawn not needed"; else element-desktop; fi'' - "SUPER,D,togglespecialworkspace,scratch_element" + ''SUPER,D,exec,if hyprctl clients | grep Element; then echo "scratch_chat respawn not needed"; else element-desktop; fi'' + ''SUPER,D,exec,if hyprctl clients | grep Zulip; then echo "scratch_chat respawn not needed"; else zulip; fi'' + "SUPER,D,togglespecialworkspace,scratch_chat" ''SUPER,equal, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | grep float | awk '{print $2 + 0.5}')"'' ''SUPER,minus, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | grep float | awk '{print $2 - 0.5}')"'' "SUPER,I,exec,networkmanager_dmenu" @@ -347,8 +358,16 @@ in "center,class:^(scratch_btm)$" "float,class:^(Element)$" "size 85% 90%,class:^(Element)$" - "workspace special:scratch_element silent,class:^(Element)$" + "workspace special:scratch_chat silent,class:^(Element)$" "center,class:^(Element)$" + "float,class:^(Zulip)$" + "size 85% 90%,class:^(Zulip)$" + "workspace special:scratch_chat silent,class:^(Zulip)$" + "center,class:^(Zulip)$" + "float,class:^(discord)$" + "size 85% 90%,class:^(discord)$" + "workspace special:scratch_chat silent,class:^(discord)$" + "center,class:^(discord)$" "float,title:^(Save to Disk)$" "size 70% 75%,title:^(Save to Disk)$" "center,title:^(Save to Disk)$" @@ -376,11 +395,14 @@ in "float,title:^(Unlock Database - KeePassXC)$" "size 80% 85%,title:^(Unlock Database - KeePassXC)$" "center,title:^(Unlock Database - KeepassXC)$" - ] ++ lib.optionals (!performance) [ + ] + ++ lib.optionals (!performance) [ "opacity 0.80,class:^(dev.zed.Zed)$" "opacity 0.80,class:^(org.pulseaudio.pavucontrol)$" "opacity 1.0,class:^(org.qutebrowser.qutebrowser),fullscreen:1" "opacity 0.85,class:^(Element)$" + "opacity 0.85,class:^(Zulip)$" + "opacity 0.85,class:^(discord)$" "opacity 0.85,class:^(Logseq)$" "opacity 1.0,class:^(Brave-browser),fullscreen:1" "opacity 1.0,class:^(librewolf),fullscreen:1" @@ -426,160 +448,150 @@ in }; }; - systemd.variables = ["--all"]; - xwayland = { enable = true; }; + systemd.variables = [ "--all" ]; + xwayland = { + enable = true; + }; systemd.enable = true; }; - home.packages = (with pkgs; [ - networkmanagerapplet - hyprland-monitor-attached - alacritty - kitty - killall - polkit_gnome - (ashell.overrideAttrs (o: { + home.packages = ( + with pkgs; + [ + networkmanagerapplet + hyprland-monitor-attached + alacritty + kitty + killall + polkit_gnome + (ashell.overrideAttrs (o: { patches = (o.patches or [ ]) ++ [ - ./ashell.patch + ./ashell.patch ]; })) - nwg-launchers - (lib.hiPrio papirus-icon-theme) - (pkgs.writeScriptBin "nwggrid-wrapper" '' - #!/bin/sh - if pgrep -x "nwggrid-server" > /dev/null - then - nwggrid -client - else - GDK_PIXBUF_MODULE_FILE=${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache nwggrid-server -layer-shell-exclusive-zone -1 -g adw-gtk3 -o 0.55 -b ${config.lib.stylix.colors.base00} & - sleep 0.6 && nwggrid -client - fi - '') - (pkgs.writeScriptBin "hyprgamemode" '' - #!/bin/sh - HYPRGAMEMODE=$(hyprctl getoption decoration:blur:enabled | awk 'NR==1{print $2}') - if [ "$HYPRGAMEMODE" = 1 ] ; then - sync; - hyprctl --batch "\ - keyword animations:enabled 0;\ - keyword decoration:shadow:enabled 0;\ - keyword decoration:blur:enabled 0;\ - keyword general:gaps_in 0;\ - keyword general:gaps_out 0;\ - keyword general:border_size 0;\ - keyword decoration:rounding 0"; - #pkill -STOP electron; - #pkill -STOP syncthing; - #pkill -STOP emacs; - #pkill -STOP emacsclient; - #systemctl --user stop nextcloud-client; - pkill ashell; - pkill hypridle; - exit; - else - hyprctl --batch "\ - keyword animations:enabled ${builtins.toString config.wayland.windowManager.hyprland.settings.animations.enabled};\ - keyword decoration:shadow:enabled ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.shadow.enabled};\ - keyword decoration:blur:enabled ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.blur.enabled};\ - keyword general:gaps_in ${builtins.toString config.wayland.windowManager.hyprland.settings.general.gaps_in};\ - keyword general:gaps_out ${builtins.toString config.wayland.windowManager.hyprland.settings.general.gaps_out};\ - keyword general:border_size ${builtins.toString config.wayland.windowManager.hyprland.settings.general.border_size};\ - keyword decoration:rounding ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.rounding}"; - #pkill -CONT electron; - #pkill -CONT syncthing; - #pkill -CONT emacs; - #pkill -CONT emacsclient; - #systemctl --user start nextcloud-client; - WGPU_BACKEND=gl ashell & disown; - hypridle & disown; - exit; - fi - '') - libva-utils - libinput-gestures - gsettings-desktop-schemas - (pkgs.makeDesktopItem { - name = "nwggrid"; - desktopName = "Application Launcher"; - exec = "nwggrid-wrapper"; - terminal = false; - type = "Application"; - noDisplay = true; - icon = "${config.home.homeDirectory}/.local/share/pixmaps/hyprland-logo-stylix.svg"; - }) - hyprnome - wlr-randr - wtype - ydotool - wl-clipboard - hyprland-protocols - hyprpicker - inputs.hyprlock.packages.${pkgs.system}.default - hypridle - hyprpaper - fnott - keepmenu - pinentry-gnome3 - wev - grim - slurp - kdePackages.qtwayland - xdg-utils - wlsunset - hyprshade - pavucontrol - (pkgs.writeScriptBin "workspace-on-monitor" '' - #!/bin/sh - hyprctl monitors -j | jq ".[$1] | .activeWorkspace.id" - '') - (pkgs.writeScriptBin "open-under-ranger" '' - #!/bin/sh - command="$1" - echo $command - file="''${*:2}" - file=''${file// /\\ } - echo $file - workspace=$(hyprctl monitors -j | jq ".[] | select(.specialWorkspace.name == \"special:scratch_yazi\") | .activeWorkspace.id") - if [ -z "''${workspace}" ]; then - hyprctl dispatch exec -- "$command"; - else - hyprctl dispatch exec "[workspace $workspace]" -- "$command" "$file"; - fi - hyprctl dispatch togglespecialworkspace scratch_yazi - '') - (pkgs.writeScriptBin "sct" '' - #!/bin/sh - killall wlsunset &> /dev/null; - if [ $# -eq 1 ]; then - temphigh=$(( $1 + 1 )) - templow=$1 - wlsunset -t $templow -T $temphigh &> /dev/null & - else - killall wlsunset &> /dev/null; - fi - '') - (pkgs.writeScriptBin "scg" '' - #!/bin/sh - hyprshade toggle grayscale; - '') - (pkgs.writeScriptBin "obs-notification-mute-daemon" '' - #!/bin/sh - while true; do - if pgrep -x .obs-wrapped > /dev/null; - then - pkill -STOP fnott; - else - pkill -CONT fnott; + nwg-launchers + (lib.hiPrio papirus-icon-theme) + (pkgs.writeScriptBin "nwggrid-wrapper" '' + #!/bin/sh + if pgrep -x "nwggrid-server" > /dev/null + then + nwggrid -client + else + GDK_PIXBUF_MODULE_FILE=${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache nwggrid-server -layer-shell-exclusive-zone -1 -g adw-gtk3 -o 0.55 -b ${config.lib.stylix.colors.base00} & + sleep 0.6 && nwggrid -client fi - sleep 10; - done - '') - (pkgs.writeScriptBin "suspend-unless-render" '' - #!/bin/sh - if pgrep -x nixos-rebuild > /dev/null || pgrep -x home-manager > /dev/null || pgrep -x kdenlive > /dev/null || pgrep -x FL64.exe > /dev/null || pgrep -x blender > /dev/null || pgrep -x flatpak > /dev/null; - then echo "Shouldn't suspend"; sleep 10; else echo "Should suspend"; systemctl suspend; fi - '') - ]); + '') + (pkgs.writeScriptBin "hyprgamemode" '' + #!/bin/sh + HYPRGAMEMODE=$(hyprctl getoption decoration:blur:enabled | awk 'NR==1{print $2}') + if [ "$HYPRGAMEMODE" = 1 ] ; then + sync; + hyprctl --batch "\ + keyword animations:enabled 0;\ + keyword decoration:shadow:enabled 0;\ + keyword decoration:blur:enabled 0;\ + keyword general:gaps_in 0;\ + keyword general:gaps_out 0;\ + keyword general:border_size 0;\ + keyword decoration:rounding 0"; + #pkill -STOP electron; + #pkill -STOP syncthing; + #pkill -STOP emacs; + #pkill -STOP emacsclient; + #systemctl --user stop nextcloud-client; + pkill ashell; + pkill hypridle; + exit; + else + hyprctl --batch "\ + keyword animations:enabled ${builtins.toString config.wayland.windowManager.hyprland.settings.animations.enabled};\ + keyword decoration:shadow:enabled ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.shadow.enabled};\ + keyword decoration:blur:enabled ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.blur.enabled};\ + keyword general:gaps_in ${builtins.toString config.wayland.windowManager.hyprland.settings.general.gaps_in};\ + keyword general:gaps_out ${builtins.toString config.wayland.windowManager.hyprland.settings.general.gaps_out};\ + keyword general:border_size ${builtins.toString config.wayland.windowManager.hyprland.settings.general.border_size};\ + keyword decoration:rounding ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.rounding}"; + #pkill -CONT electron; + #pkill -CONT syncthing; + #pkill -CONT emacs; + #pkill -CONT emacsclient; + #systemctl --user start nextcloud-client; + WGPU_BACKEND=gl ashell & disown; + hypridle & disown; + exit; + fi + '') + libva-utils + libinput-gestures + gsettings-desktop-schemas + (pkgs.makeDesktopItem { + name = "nwggrid"; + desktopName = "Application Launcher"; + exec = "nwggrid-wrapper"; + terminal = false; + type = "Application"; + noDisplay = true; + icon = "${config.home.homeDirectory}/.local/share/pixmaps/hyprland-logo-stylix.svg"; + }) + hyprnome + wlr-randr + wtype + ydotool + wl-clipboard + hyprland-protocols + hyprpicker + inputs.hyprlock.packages.${pkgs.system}.default + hypridle + hyprpaper + fnott + keepmenu + pinentry-gnome3 + wev + grim + slurp + kdePackages.qtwayland + xdg-utils + wlsunset + hyprshade + pavucontrol + (pkgs.writeScriptBin "workspace-on-monitor" '' + #!/bin/sh + hyprctl monitors -j | jq ".[$1] | .activeWorkspace.id" + '') + (pkgs.writeScriptBin "sct" '' + #!/bin/sh + killall wlsunset &> /dev/null; + if [ $# -eq 1 ]; then + temphigh=$(( $1 + 1 )) + templow=$1 + wlsunset -t $templow -T $temphigh &> /dev/null & + else + killall wlsunset &> /dev/null; + fi + '') + (pkgs.writeScriptBin "scg" '' + #!/bin/sh + hyprshade toggle grayscale; + '') + (pkgs.writeScriptBin "obs-notification-mute-daemon" '' + #!/bin/sh + while true; do + if pgrep -x .obs-wrapped > /dev/null; + then + pkill -STOP fnott; + else + pkill -CONT fnott; + fi + sleep 10; + done + '') + (pkgs.writeScriptBin "suspend-unless-render" '' + #!/bin/sh + if pgrep -x nixos-rebuild > /dev/null || pgrep -x home-manager > /dev/null || pgrep -x kdenlive > /dev/null || pgrep -x FL64.exe > /dev/null || pgrep -x blender > /dev/null || pgrep -x flatpak > /dev/null; + then echo "Shouldn't suspend"; sleep 10; else echo "Should suspend"; systemctl suspend; fi + '') + ] + ); home.file.".config/hypr/shaders/grayscale.glsl".text = '' /* * Grayscale @@ -638,52 +650,52 @@ in } ''; home.file.".config/ashell/config.toml".text = '' -outputs = "All" -position = "Top" -app_launcher_cmd = "nwggrid-wrapper" -truncate_title_after_length = 150 -[modules] -left = [ "AppLauncher", "SystemInfo" ] -center = [ "Workspaces" ] -right = [ "Clock", "Settings", "Tray" ] -[workspaces] -visibility_mode = "MonitorSpecific" -enable_workspace_filling = true -[system.cpu] -warn_threshold = 80 -alert_threshold = 95 -[system.mem] -warn_threshold = 50 -alert_threshold = 75 -[system.temp] -warn_threshold = 85 -alert_threshold = 95 -[clock] -format = "%a %d %b %H:%M:%S" -[mediaPlayer] -max_title_length = 100 -[settings] -lockCmd = "hyprlock &" -audio_sinks_more_cmd = "pavucontrol -t 3" -audio_sources_more_cmd = "pavucontrol -t 4" -wifi_more_cmd = "nm-connection-editor" -vpn_more_cmd = "nm-connection-editor" -bluetooth_more_cmd = "blueman-manager" -[appearance] -scale_factor = 1.25 -style = "Solid" -opacity = ${if performance then "1.0" else "0.7"} -background_color = "#${config.lib.stylix.colors.base00}88" -primary_color = "#${config.lib.stylix.colors.base0A}" -secondary_color = "#${config.lib.stylix.colors.base01}" -success_color = "#${config.lib.stylix.colors.base0A}" -danger_color = "#${config.lib.stylix.colors.base08}" -text_color = "#${config.lib.stylix.colors.base07}" -workspace_colors = [ "#${config.lib.stylix.colors.base0B}", "#${config.lib.stylix.colors.base0B}" ] -specialWorkspaceColors = [ "#${config.lib.stylix.colors.base0B}", "#${config.lib.stylix.colors.base0B}" ] -[appearance.menu] -opacity = ${if performance then "1.0" else "0.7"} -backdrop = 0.0 + outputs = "All" + position = "Top" + app_launcher_cmd = "nwggrid-wrapper" + truncate_title_after_length = 150 + [modules] + left = [ "AppLauncher", "SystemInfo" ] + center = [ "Workspaces" ] + right = [ "Clock", "Settings", "Tray" ] + [workspaces] + visibility_mode = "MonitorSpecific" + enable_workspace_filling = true + [system.cpu] + warn_threshold = 80 + alert_threshold = 95 + [system.mem] + warn_threshold = 50 + alert_threshold = 75 + [system.temp] + warn_threshold = 85 + alert_threshold = 95 + [clock] + format = "%a %d %b %H:%M:%S" + [mediaPlayer] + max_title_length = 100 + [settings] + lockCmd = "hyprlock &" + audio_sinks_more_cmd = "pavucontrol -t 3" + audio_sources_more_cmd = "pavucontrol -t 4" + wifi_more_cmd = "nm-connection-editor" + vpn_more_cmd = "nm-connection-editor" + bluetooth_more_cmd = "blueman-manager" + [appearance] + scale_factor = 1.25 + style = "Solid" + opacity = ${if performance then "1.0" else "0.7"} + background_color = "#${config.lib.stylix.colors.base00}88" + primary_color = "#${config.lib.stylix.colors.base0A}" + secondary_color = "#${config.lib.stylix.colors.base01}" + success_color = "#${config.lib.stylix.colors.base0A}" + danger_color = "#${config.lib.stylix.colors.base08}" + text_color = "#${config.lib.stylix.colors.base07}" + workspace_colors = [ "#${config.lib.stylix.colors.base0B}", "#${config.lib.stylix.colors.base0B}" ] + specialWorkspaceColors = [ "#${config.lib.stylix.colors.base0B}", "#${config.lib.stylix.colors.base0B}" ] + [appearance.menu] + opacity = ${if performance then "1.0" else "0.7"} + backdrop = 0.0 ''; home.file.".config/hypr/hypridle.conf".text = '' general { diff --git a/modules/user/nix/default.nix b/modules/user/nix/default.nix index ae0e7a0..d0871f2 100644 --- a/modules/user/nix/default.nix +++ b/modules/user/nix/default.nix @@ -1,7 +1,11 @@ -{ ... }: +{ pkgs, ... }: { config = { home.stateVersion = "22.11"; + home.packages = with pkgs; [ + nil nixd + nixdoc + ]; }; } diff --git a/modules/user/office/default.nix b/modules/user/office/default.nix index a9922d0..68658e1 100644 --- a/modules/user/office/default.nix +++ b/modules/user/office/default.nix @@ -21,6 +21,8 @@ in { gnome-maps seahorse element-desktop + zulip + discord openvpn pomodoro-gtk ]; diff --git a/modules/user/shell/default.nix b/modules/user/shell/default.nix index 438889e..8010f8e 100644 --- a/modules/user/shell/default.nix +++ b/modules/user/shell/default.nix @@ -69,6 +69,6 @@ in { programs.direnv.enable = true; programs.direnv.enableZshIntegration = true; programs.direnv.nix-direnv.enable = true; - programs.direnv.nix-direnv.package = pkgs.nix-direnv-flakes; + programs.direnv.nix-direnv.package = pkgs.nix-direnv; }; } diff --git a/modules/user/zed/default.nix b/modules/user/zed/default.nix index a3cccab..d185dd4 100644 --- a/modules/user/zed/default.nix +++ b/modules/user/zed/default.nix @@ -11,7 +11,7 @@ in { config = lib.mkIf cfg.enable { home.packages = with pkgs; [ - gitu nixd + gitu ]; stylix.targets.zed.enable = true; programs.zed-editor.enable = true;