use better XDG_ vars`
This commit is contained in:
parent
59d440d6ba
commit
d2378b4469
2 changed files with 15 additions and 19 deletions
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"diagnostics.globals": [
|
|
||||||
"NIX"
|
|
||||||
]
|
|
||||||
}
|
|
29
flake.nix
29
flake.nix
|
@ -18,11 +18,13 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, ... } @ inputs:
|
outputs = { self, nixpkgs, flake-utils, ... } @ inputs:
|
||||||
# Takes all top level attributes and changes them to `attribute.${system} = old value`
|
# Takes all top level attributes and changes them to `attribute.${system} = old value`
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
|
# Anytime there is a huge breaking change that old state files wont
|
||||||
|
# work then we make a new version name. Helps separate any files.
|
||||||
|
version = "hydrogen";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
|
|
||||||
|
@ -135,19 +137,18 @@
|
||||||
"LAZY"
|
"LAZY"
|
||||||
"${lazyPath}"
|
"${lazyPath}"
|
||||||
# Don't use default directories to not collide with another neovim config
|
# Don't use default directories to not collide with another neovim config
|
||||||
# All things at runtime should be deletable since we are using nix to handle downloads and bins.
|
# All things at runtime should be deletable since we are using nix to handle downloads and bins
|
||||||
"--set"
|
# so I've chosen to put everything into the local state directory.
|
||||||
"XDG_CONFIG_HOME"
|
"--run"
|
||||||
"/tmp/nvim_flaked.USR_TODO/config" # TODO
|
"export XDG_CONFIG_HOME=\"$HOME/.local/state/nvim_ringofstorms_${version}/config\""
|
||||||
"--set"
|
"--run"
|
||||||
"XDG_DATA_HOME"
|
"export XDG_DATA_HOME=\"$HOME/.local/state/nvim_ringofstorms_${version}/share\""
|
||||||
"/tmp/nvim_flaked.USR_TODO/share"
|
"--run"
|
||||||
"--set"
|
"export XDG_RUNTIME_DIR=\"$HOME/.local/state/nvim_ringofstorms_${version}/run\""
|
||||||
"XDG_RUNTIME_DIR"
|
"--run"
|
||||||
"/tmp/nvim_flaked.USR_TODO/run"
|
"export XDG_STATE_HOME=\"$HOME/.local/state/nvim_ringofstorms_${version}/state\""
|
||||||
"--set"
|
"--run"
|
||||||
"XDG_STATE_HOME"
|
"export XDG_CACHE_HOME=\"$HOME/.local/state/nvim_ringofstorms_${version}/cache\""
|
||||||
"/tmp/nvim_flaked.USR_TODO/state"
|
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue