chore: implemented xdg-ninja recommendations

chore: update
This commit is contained in:
Patrick Großmann 2023-03-23 20:33:42 +09:00
parent 8c817968c1
commit 913a2077c0
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
5 changed files with 40 additions and 28 deletions

View file

@ -157,4 +157,16 @@ in {
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
umask 077 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";
};
} }

View file

@ -65,7 +65,7 @@ MOD: TAGS: pkgs:
bind=${MOD},t,exec,kitty bind=${MOD},t,exec,kitty
bind=${MOD} + SHIFT,Escape,exit bind=${MOD} + SHIFT,Escape,exit
exec-once="${pkgs.waybar}/bin/waybar main" exec-once=${pkgs.waybar}/bin/waybar
'' ''
+ builtins.concatStringsSep "\n" (map ( + builtins.concatStringsSep "\n" (map (
x: '' x: ''

View file

@ -61,11 +61,11 @@
}, },
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1676283394, "lastModified": 1678901627,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -103,11 +103,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1678571066, "lastModified": 1679480702,
"narHash": "sha256-MrlMr2A3tK1MY/JUGWMVzMwois8+mHWXm/1yYdwQSIc=", "narHash": "sha256-npuRD61YmxUPitI1TqKwlxLrU6iGl5E+BPT196LgUDo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "bf5712c5865e543fb3f4796511d4cf51efd841b1", "rev": "363c46b2480f1b73ec37cf68caac61f5daa82a2e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -124,11 +124,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1678557514, "lastModified": 1679540877,
"narHash": "sha256-yNrik47cr8qPgl6zTMNJSfoC2zKZJaNUQAMWFYTajcE=", "narHash": "sha256-IXlqiwRXymvVcnkggboCWaB09GhHh+F78xqssmt6IAM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "71ef1bde7e45f94ceaab925ae065f32f91510890", "rev": "471ac474a1f6d32c07bf36cdf3840dab03f93f39",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -160,11 +160,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1677676435, "lastModified": 1679172431,
"narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=", "narHash": "sha256-XEh5gIt5otaUbEAPUY5DILUTyWe1goAyeqQtmwaFPyI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169", "rev": "1603d11595a232205f03d46e635d919d1e1ec5b9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -176,11 +176,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1673800717, "lastModified": 1678872516,
"narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=", "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f", "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -192,11 +192,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1678470307, "lastModified": 1679437018,
"narHash": "sha256-OEeMUr3ueLIXyW/OaFUX5jUdimyQwMg/7e+/Q0gC/QE=", "narHash": "sha256-vOuiDPLHSEo/7NkiWtxpHpHgoXoNmrm+wkXZ6a072Fc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0c4800d579af4ed98ecc47d464a5e7b0870c4b1f", "rev": "19cf008bb18e47b6e3b4e16e32a9a4bdd4b45f7e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -219,11 +219,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1678376203, "lastModified": 1678976941,
"narHash": "sha256-3tyYGyC8h7fBwncLZy5nCUjTJPrHbmNwp47LlNLOHSM=", "narHash": "sha256-skNr08frCwN9NO+7I77MjOHHAw+L410/37JknNld+W4=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "1a20b9708962096ec2481eeb2ddca29ed747770a", "rev": "32b1dbedfd77892a6e375737ef04d8efba634e9e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -277,11 +277,11 @@
"flake": false, "flake": false,
"locked": { "locked": {
"host": "gitlab.freedesktop.org", "host": "gitlab.freedesktop.org",
"lastModified": 1677789111, "lastModified": 1679340088,
"narHash": "sha256-dWrk+Q3bLdtFe5rkyaAKWCQJCeE/KFNllcu1DvBC38c=", "narHash": "sha256-/1KiYoBivDj8HC/eVK2Tr2WYkVdKJxq2Lb0tQs0qqJo=",
"owner": "wlroots", "owner": "wlroots",
"repo": "wlroots", "repo": "wlroots",
"rev": "5ae17de23f5fd9bb252a698f3771c840280e2c05", "rev": "1d64e12391a638201c679e71d4e22bb45e5faa8e",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {

View file

@ -38,5 +38,5 @@
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# high-resolution display # high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true; fonts.optimizeForVeryHighDPI = lib.mkDefault true;
} }

View file

@ -6,9 +6,9 @@
imports = [ imports = [
common/programs/kitty.nix common/programs/kitty.nix
common/graphical/hyprland.nix common/graphical/hyprland.nix
common/programs/polybar.nix #common/programs/polybar.nix
common/programs/rofi.nix common/programs/rofi.nix
common/programs/spotify.nix #common/programs/spotify.nix
#common/graphical/herbstluftwm.nix #common/graphical/herbstluftwm.nix
#common/graphical/autorandr.nix #common/graphical/autorandr.nix
#common/touchegg-module.nix #common/touchegg-module.nix