From 913a2077c058e5883f7dd73a46bc3ea929f9755b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Gro=C3=9Fmann?= Date: Thu, 23 Mar 2023 20:33:42 +0900 Subject: [PATCH] chore: implemented xdg-ninja recommendations chore: update --- configuration.nix | 12 ++++++++++ data/hyprland/config.nix | 2 +- flake.lock | 48 +++++++++++++++++++------------------- hardware-configuration.nix | 2 +- users/patrick.nix | 4 ++-- 5 files changed, 40 insertions(+), 28 deletions(-) diff --git a/configuration.nix b/configuration.nix index 9871120..d2f6de8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -157,4 +157,16 @@ in { export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) umask 077 ''; + # XDG base spec + environment.sessionVariables = rec { + XDG_CACHE_HOME = "\${HOME}/.cache"; + XDG_CONFIG_HOME = "\${HOME}/.config"; + XDG_STATE_HOME = "\${HOME}/.local/state"; + XDG_DATA_HOME = "\${HOME}/.local/share"; + # xdg ninja recommendations + CARGO_HOME = "\${XDG_DATA_HOME}/cargo"; + CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv"; + RUSTUP_HOME = "\${XDG_DATA_HOME}/rustup"; + WINEPREFIX = "\${XDG_DATA_HOME}/wine"; + }; } diff --git a/data/hyprland/config.nix b/data/hyprland/config.nix index 9450cea..95c2a84 100644 --- a/data/hyprland/config.nix +++ b/data/hyprland/config.nix @@ -65,7 +65,7 @@ MOD: TAGS: pkgs: bind=${MOD},t,exec,kitty bind=${MOD} + SHIFT,Escape,exit - exec-once="${pkgs.waybar}/bin/waybar main" + exec-once=${pkgs.waybar}/bin/waybar '' + builtins.concatStringsSep "\n" (map ( x: '' diff --git a/flake.lock b/flake.lock index 74389bb..0b5f8dc 100644 --- a/flake.lock +++ b/flake.lock @@ -61,11 +61,11 @@ }, "flake-utils": { "locked": { - "lastModified": 1676283394, - "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", "owner": "numtide", "repo": "flake-utils", - "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", "type": "github" }, "original": { @@ -103,11 +103,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1678571066, - "narHash": "sha256-MrlMr2A3tK1MY/JUGWMVzMwois8+mHWXm/1yYdwQSIc=", + "lastModified": 1679480702, + "narHash": "sha256-npuRD61YmxUPitI1TqKwlxLrU6iGl5E+BPT196LgUDo=", "owner": "nix-community", "repo": "home-manager", - "rev": "bf5712c5865e543fb3f4796511d4cf51efd841b1", + "rev": "363c46b2480f1b73ec37cf68caac61f5daa82a2e", "type": "github" }, "original": { @@ -124,11 +124,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1678557514, - "narHash": "sha256-yNrik47cr8qPgl6zTMNJSfoC2zKZJaNUQAMWFYTajcE=", + "lastModified": 1679540877, + "narHash": "sha256-IXlqiwRXymvVcnkggboCWaB09GhHh+F78xqssmt6IAM=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "71ef1bde7e45f94ceaab925ae065f32f91510890", + "rev": "471ac474a1f6d32c07bf36cdf3840dab03f93f39", "type": "github" }, "original": { @@ -160,11 +160,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1677676435, - "narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=", + "lastModified": 1679172431, + "narHash": "sha256-XEh5gIt5otaUbEAPUY5DILUTyWe1goAyeqQtmwaFPyI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169", + "rev": "1603d11595a232205f03d46e635d919d1e1ec5b9", "type": "github" }, "original": { @@ -176,11 +176,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1673800717, - "narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=", + "lastModified": 1678872516, + "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f", + "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", "type": "github" }, "original": { @@ -192,11 +192,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1678470307, - "narHash": "sha256-OEeMUr3ueLIXyW/OaFUX5jUdimyQwMg/7e+/Q0gC/QE=", + "lastModified": 1679437018, + "narHash": "sha256-vOuiDPLHSEo/7NkiWtxpHpHgoXoNmrm+wkXZ6a072Fc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0c4800d579af4ed98ecc47d464a5e7b0870c4b1f", + "rev": "19cf008bb18e47b6e3b4e16e32a9a4bdd4b45f7e", "type": "github" }, "original": { @@ -219,11 +219,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1678376203, - "narHash": "sha256-3tyYGyC8h7fBwncLZy5nCUjTJPrHbmNwp47LlNLOHSM=", + "lastModified": 1678976941, + "narHash": "sha256-skNr08frCwN9NO+7I77MjOHHAw+L410/37JknNld+W4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "1a20b9708962096ec2481eeb2ddca29ed747770a", + "rev": "32b1dbedfd77892a6e375737ef04d8efba634e9e", "type": "github" }, "original": { @@ -277,11 +277,11 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1677789111, - "narHash": "sha256-dWrk+Q3bLdtFe5rkyaAKWCQJCeE/KFNllcu1DvBC38c=", + "lastModified": 1679340088, + "narHash": "sha256-/1KiYoBivDj8HC/eVK2Tr2WYkVdKJxq2Lb0tQs0qqJo=", "owner": "wlroots", "repo": "wlroots", - "rev": "5ae17de23f5fd9bb252a698f3771c840280e2c05", + "rev": "1d64e12391a638201c679e71d4e22bb45e5faa8e", "type": "gitlab" }, "original": { diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 9178eb0..4582055 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -38,5 +38,5 @@ powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; # high-resolution display - hardware.video.hidpi.enable = lib.mkDefault true; + fonts.optimizeForVeryHighDPI = lib.mkDefault true; } diff --git a/users/patrick.nix b/users/patrick.nix index bd4affa..2b4932d 100644 --- a/users/patrick.nix +++ b/users/patrick.nix @@ -6,9 +6,9 @@ imports = [ common/programs/kitty.nix common/graphical/hyprland.nix - common/programs/polybar.nix + #common/programs/polybar.nix common/programs/rofi.nix - common/programs/spotify.nix + #common/programs/spotify.nix #common/graphical/herbstluftwm.nix #common/graphical/autorandr.nix #common/touchegg-module.nix