feat: xdg variable cleanup
This commit is contained in:
parent
d9749f6c60
commit
9d9e209e4b
6 changed files with 44 additions and 106 deletions
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
flake.lock -diff
|
79
flake.lock
79
flake.lock
|
@ -1,24 +1,5 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"catppuccin-toolbox": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1674285238,
|
|
||||||
"narHash": "sha256-Rpop0YFk7fpsTL8QdCMq7EB8uc5eRTdHGH8yo0sAvFU=",
|
|
||||||
"owner": "catppuccin",
|
|
||||||
"repo": "toolbox",
|
|
||||||
"rev": "bbd81b470c28defdddd958dd3860b59ae7d81739",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "catppuccin",
|
|
||||||
"repo": "toolbox",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"darwin": {
|
"darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -56,21 +37,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1667395993,
|
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils_2": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676283394,
|
"lastModified": 1676283394,
|
||||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
||||||
|
@ -85,7 +51,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_3": {
|
"flake-utils_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1667395993,
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
|
@ -145,7 +111,7 @@
|
||||||
"hyprland": {
|
"hyprland": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"hyprland-protocols": "hyprland-protocols",
|
"hyprland-protocols": "hyprland-protocols",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs",
|
||||||
"wlroots": "wlroots",
|
"wlroots": "wlroots",
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
|
@ -186,7 +152,7 @@
|
||||||
},
|
},
|
||||||
"nekowinston-nur": {
|
"nekowinston-nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676351500,
|
"lastModified": 1676351500,
|
||||||
|
@ -204,11 +170,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673631141,
|
"lastModified": 1675273418,
|
||||||
"narHash": "sha256-AprpYQ5JvLS4wQG/ghm2UriZ9QZXvAwh1HlgA/6ZEVQ=",
|
"narHash": "sha256-tpYc4TEGvDzh9uRf44QemyQ4TpVuUbxb07b2P99XDbM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "befc83905c965adfd33e5cae49acb0351f6e0404",
|
"rev": "4d7c2644dbac9cf8282c0afe68fca8f0f3e7b2db",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -267,22 +233,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1675273418,
|
|
||||||
"narHash": "sha256-tpYc4TEGvDzh9uRf44QemyQ4TpVuUbxb07b2P99XDbM=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "4d7c2644dbac9cf8282c0afe68fca8f0f3e7b2db",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675940568,
|
"lastModified": 1675940568,
|
||||||
"narHash": "sha256-epG6pOT9V0kS+FUqd7R6/CWkgnZx2DMT5Veqo+y6G3c=",
|
"narHash": "sha256-epG6pOT9V0kS+FUqd7R6/CWkgnZx2DMT5Veqo+y6G3c=",
|
||||||
|
@ -298,7 +248,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676375384,
|
"lastModified": 1676375384,
|
||||||
"narHash": "sha256-6HI3jZiuJX+KLz05cocYy2mBAWlISEKHU84ftYfxHZ8=",
|
"narHash": "sha256-6HI3jZiuJX+KLz05cocYy2mBAWlISEKHU84ftYfxHZ8=",
|
||||||
|
@ -314,7 +264,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1671271357,
|
"lastModified": 1671271357,
|
||||||
"narHash": "sha256-xRJdLbWK4v2SewmSStYrcLa0YGJpleufl44A19XSW8k=",
|
"narHash": "sha256-xRJdLbWK4v2SewmSStYrcLa0YGJpleufl44A19XSW8k=",
|
||||||
|
@ -330,7 +280,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_6": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675940568,
|
"lastModified": 1675940568,
|
||||||
"narHash": "sha256-epG6pOT9V0kS+FUqd7R6/CWkgnZx2DMT5Veqo+y6G3c=",
|
"narHash": "sha256-epG6pOT9V0kS+FUqd7R6/CWkgnZx2DMT5Veqo+y6G3c=",
|
||||||
|
@ -364,9 +314,9 @@
|
||||||
"pre-commit-hooks": {
|
"pre-commit-hooks": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_2",
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -385,13 +335,12 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"catppuccin-toolbox": "catppuccin-toolbox",
|
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
"nekowinston-nur": "nekowinston-nur",
|
"nekowinston-nur": "nekowinston-nur",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"pre-commit-hooks": "pre-commit-hooks",
|
"pre-commit-hooks": "pre-commit-hooks",
|
||||||
|
@ -400,7 +349,7 @@
|
||||||
},
|
},
|
||||||
"sops": {
|
"sops": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_6",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
41
flake.nix
41
flake.nix
|
@ -16,7 +16,6 @@
|
||||||
};
|
};
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
nekowinston-nur.url = "github:nekowinston/nur";
|
nekowinston-nur.url = "github:nekowinston/nur";
|
||||||
catppuccin-toolbox.url = "github:catppuccin/toolbox";
|
|
||||||
sops.url = "github:Mic92/sops-nix";
|
sops.url = "github:Mic92/sops-nix";
|
||||||
|
|
||||||
# dev
|
# dev
|
||||||
|
@ -28,7 +27,6 @@
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
catppuccin-toolbox,
|
|
||||||
darwin,
|
darwin,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
home-manager,
|
home-manager,
|
||||||
|
@ -41,7 +39,7 @@
|
||||||
sops,
|
sops,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
overlay-unstable = final: prev: {
|
overlays = final: prev: {
|
||||||
unstable = import nixpkgs-unstable {
|
unstable = import nixpkgs-unstable {
|
||||||
system = prev.system;
|
system = prev.system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
@ -64,23 +62,16 @@
|
||||||
|
|
||||||
({config, ...}: {
|
({config, ...}: {
|
||||||
config = {
|
config = {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [overlays];
|
||||||
overlay-unstable
|
|
||||||
];
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
users.winston.imports = [
|
sharedModules = [
|
||||||
./home.nix
|
sops.homeManagerModules.sops
|
||||||
{
|
hyprland.homeManagerModules.default
|
||||||
home.packages = [
|
|
||||||
catppuccin-toolbox.packages.${system}.catwalk
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
users.winston.imports = [./home.nix];
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
sops = sops.homeManagerModules.sops;
|
|
||||||
hyprland = hyprland.homeManagerModules.default;
|
|
||||||
flakePath = "/home/winston/.config/nixpkgs";
|
flakePath = "/home/winston/.config/nixpkgs";
|
||||||
machine.personal = true;
|
machine.personal = true;
|
||||||
};
|
};
|
||||||
|
@ -101,28 +92,20 @@
|
||||||
|
|
||||||
({config, ...}: {
|
({config, ...}: {
|
||||||
config = {
|
config = {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [overlays];
|
||||||
overlay-unstable
|
|
||||||
];
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
backupFileExtension = "backup";
|
backupFileExtension = "backup";
|
||||||
users.winston.imports = [
|
sharedModules = [
|
||||||
./home.nix
|
sops.homeManagerModules.sops
|
||||||
{
|
# TODO: remove hyprland from darwin, I just need this to work right now
|
||||||
home.packages = [
|
hyprland.homeManagerModules.default
|
||||||
catppuccin-toolbox.packages.${system}.catwalk
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
users.winston.imports = [./home.nix];
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
sops = sops.homeManagerModules.sops;
|
|
||||||
flakePath = "/Users/winston/.config/nixpkgs";
|
flakePath = "/Users/winston/.config/nixpkgs";
|
||||||
machine.personal = true;
|
machine.personal = true;
|
||||||
|
|
||||||
# TODO: remove hyprland from darwin, I just need this to work right now
|
|
||||||
hyprland = hyprland.homeManagerModules.default;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
22
home.nix
22
home.nix
|
@ -2,17 +2,13 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
sops,
|
|
||||||
machine,
|
machine,
|
||||||
hyprland,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
||||||
in {
|
in {
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
hyprland
|
|
||||||
sops
|
|
||||||
./modules/firefox.nix
|
./modules/firefox.nix
|
||||||
./modules/git.nix
|
./modules/git.nix
|
||||||
./modules/gpg.nix
|
./modules/gpg.nix
|
||||||
|
@ -31,8 +27,6 @@ in {
|
||||||
]
|
]
|
||||||
++ lib.optionals (builtins.pathExists ./modules/secrets.nix) [./modules/secrets.nix];
|
++ lib.optionals (builtins.pathExists ./modules/secrets.nix) [./modules/secrets.nix];
|
||||||
|
|
||||||
manual.manpages.enable = false;
|
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; ([
|
packages = with pkgs; ([
|
||||||
zsh
|
zsh
|
||||||
|
@ -70,15 +64,21 @@ in {
|
||||||
sessionVariables =
|
sessionVariables =
|
||||||
{
|
{
|
||||||
CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
CARGO_HOME = "${config.xdg.dataHome}/cargo";
|
||||||
|
CUDA_CACHE_PATH = "${config.xdg.dataHome}/nv";
|
||||||
|
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
|
||||||
NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc";
|
NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc";
|
||||||
RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
|
|
||||||
PATH = "$PATH:${config.xdg.dataHome}/krew/bin:$GOPATH/bin";
|
PATH = "$PATH:${config.xdg.dataHome}/krew/bin:$GOPATH/bin";
|
||||||
|
RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
|
||||||
|
# XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
|
||||||
|
XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompose";
|
||||||
}
|
}
|
||||||
// lib.mkIf isDarwin {
|
// (
|
||||||
# https://github.com/NixOS/nix/issues/2033
|
if isDarwin
|
||||||
NIX_PATH = "$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels\${NIX_PATH:+:$NIX_PATH}";
|
then {
|
||||||
SSH_AUTH_SOCK = "${config.xdg.configHome}/gnupg/S.gpg-agent.ssh";
|
SSH_AUTH_SOCK = "${config.xdg.configHome}/gnupg/S.gpg-agent.ssh";
|
||||||
};
|
}
|
||||||
|
else {}
|
||||||
|
);
|
||||||
|
|
||||||
stateVersion = "22.11";
|
stateVersion = "22.11";
|
||||||
};
|
};
|
||||||
|
|
|
@ -141,6 +141,9 @@ in {
|
||||||
|
|
||||||
xsession = lib.mkIf isLinux {
|
xsession = lib.mkIf isLinux {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
initExtra = ''
|
||||||
|
export USERXSESSION="$XDG_CACHE_HOME/X11/xsession"
|
||||||
|
'';
|
||||||
windowManager.i3 = {
|
windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
|
@ -27,6 +28,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||||
gtk2.extraConfig = ''
|
gtk2.extraConfig = ''
|
||||||
gtk-xft-antialias=1
|
gtk-xft-antialias=1
|
||||||
gtk-xft-hinting=1
|
gtk-xft-hinting=1
|
||||||
|
|
Loading…
Reference in a new issue