Move from home.file to xdg.configFile where applicable

This commit is contained in:
Jimbo 2025-01-10 14:38:04 -05:00
parent dc3d5381c5
commit 98378d3078
8 changed files with 157 additions and 161 deletions

View file

@ -2,9 +2,8 @@
{ {
config = lib.mkIf config.home.desktop.enable { config = lib.mkIf config.home.desktop.enable {
programs.mangohud.enable = true; programs.mangohud.enable = true;
home.file = {
# These options exist in Nixlang, but the order is not respected. # These options exist in Nixlang, but the order is not respected.
".config/MangoHud/MangoHud.conf".text = '' xdg.configFile."MangoHud/MangoHud.conf".text = ''
table_columns=2 table_columns=2
frametime=0 frametime=0
legacy_layout=0 legacy_layout=0
@ -22,5 +21,4 @@
frame_timing frame_timing
''; '';
}; };
};
} }

View file

@ -1,12 +1,12 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }:
{ {
home = lib.mkIf config.home.desktop.enable { config = lib.mkIf config.home.desktop.enable {
packages = with pkgs; [ home.packages = with pkgs; [
pcmanfm pcmanfm
file-roller file-roller
]; ];
file = { xdg.configFile = {
".config/pcmanfm/default/pcmanfm.conf".text = '' "pcmanfm/default/pcmanfm.conf".text = ''
[config] [config]
bm_open_method=0 bm_open_method=0
@ -35,7 +35,7 @@
pathbar_mode_buttons=0 pathbar_mode_buttons=0
''; '';
".config/libfm/libfm.conf".text = '' "libfm/libfm.conf".text = ''
[config] [config]
single_click=0 single_click=0
use_trash=1 use_trash=1

View file

@ -1,9 +1,10 @@
{ pkgs, config, ... }: { pkgs, config, lib, ... }:
{ {
imports = [ ./scripts ]; imports = [ ./scripts ];
config = lib.mkIf config.home.desktop.enable {
programs.rofi = { programs.rofi = {
enable = config.home.desktop.enable; enable = true;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
terminal = "foot"; terminal = "foot";
font = "${config.look.fonts.main} 14"; font = "${config.look.fonts.main} 14";
@ -130,4 +131,5 @@
bemoji bemoji
rofi-bluetooth rofi-bluetooth
]; ];
};
} }

View file

@ -3,5 +3,5 @@
imports = [ ./small ]; imports = [ ./small ];
programs.fastfetch.enable = true; programs.fastfetch.enable = true;
home.file.".config/fastfetch/config.jsonc".source = ./config.jsonc; xdg.configFile."fastfetch/config.jsonc".source = ./config.jsonc;
} }

View file

@ -1,7 +1,5 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home = { home.packages = with pkgs; [ (pkgs.writeScriptBin "pfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc") ];
packages = with pkgs; [ (pkgs.writeScriptBin "pfetch" "fastfetch --config ~/.config/fastfetch/small.jsonc") ]; xdg.configFile."fastfetch/small.jsonc".source = ./small.jsonc;
file.".config/fastfetch/small.jsonc".source = ./small.jsonc;
};
} }

View file

@ -5,8 +5,6 @@
enable = true; enable = true;
preset = "headphones"; preset = "headphones";
}; };
home.file = { xdg.configFile."easyeffects/output/headphones.json".source = ./headphones.json;
".config/easyeffects/output/headphones.json".source = ./headphones.json;
};
}; };
} }

View file

@ -14,7 +14,7 @@
default = {}; default = {};
}; };
config.home.file.".config/niri/config.kdl".text = '' config.xdg.configFile."niri/config.kdl".text = ''
${builtins.readFile config.home.niri.settings.autostart} ${builtins.readFile config.home.niri.settings.autostart}
${builtins.readFile config.home.niri.settings.hotkeys} ${builtins.readFile config.home.niri.settings.hotkeys}
${builtins.readFile config.home.niri.settings.inputs} ${builtins.readFile config.home.niri.settings.inputs}