feat: enable use-xdg-base-directories for nix #85
3 changed files with 15 additions and 3 deletions
|
@ -407,11 +407,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726487258,
|
"lastModified": 1726816132,
|
||||||
"narHash": "sha256-Xc6ZorKUI+XxYHuV6QkFoem//yVNReD9feviXztN90A=",
|
"narHash": "sha256-AbB0lgc0IbzLIxj1O3cosiMNAVQak4KJtvq9q8MjHhs=",
|
||||||
"owner": "NuschtOS",
|
"owner": "NuschtOS",
|
||||||
"repo": "search",
|
"repo": "search",
|
||||||
"rev": "6ada92d0d1f0b671464920d817a228810a181971",
|
"rev": "7733a39a1321057172d87e6251ded7cdeb67171e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -6,11 +6,15 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
osConfig ? null,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.jhome;
|
cfg = config.jhome;
|
||||||
devcfg = cfg.dev;
|
devcfg = cfg.dev;
|
||||||
|
# Query the osConfig for a setting. Return the default value if missing or in standalone mode
|
||||||
|
fromOs =
|
||||||
|
path: default: if osConfig == null then default else lib.attrsets.attrByPath path default osConfig;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
@ -26,6 +30,13 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
nix.settings.use-xdg-base-directories = fromOs [
|
||||||
|
"nix"
|
||||||
|
"settings"
|
||||||
|
"use-xdg-base-directories"
|
||||||
|
] true;
|
||||||
|
}
|
||||||
(lib.mkIf (cfg.enable && cfg.styling.enable) { stylix.enable = true; })
|
(lib.mkIf (cfg.enable && cfg.styling.enable) { stylix.enable = true; })
|
||||||
(lib.mkIf cfg.enable {
|
(lib.mkIf cfg.enable {
|
||||||
programs = {
|
programs = {
|
||||||
|
|
|
@ -100,6 +100,7 @@ in
|
||||||
randomizedDelaySec = "45min";
|
randomizedDelaySec = "45min";
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
use-xdg-base-directories = true;
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
experimental-features = [
|
experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
|
|
Loading…
Reference in a new issue