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,25 +2,23 @@
{ {
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. xdg.configFile."MangoHud/MangoHud.conf".text = ''
".config/MangoHud/MangoHud.conf".text = '' table_columns=2
table_columns=2 frametime=0
frametime=0 legacy_layout=0
legacy_layout=0 font_scale=0.80
font_scale=0.80 background_alpha=0.25
background_alpha=0.25
fps fps
fps_color_change fps_color_change
ram ram
vram vram
cpu_stats cpu_stats
cpu_load_change cpu_load_change
gpu_stats gpu_stats
gpu_load_change gpu_load_change
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,133 +1,135 @@
{ pkgs, config, ... }: { pkgs, config, lib, ... }:
{ {
imports = [ ./scripts ]; imports = [ ./scripts ];
programs.rofi = { config = lib.mkIf config.home.desktop.enable {
enable = config.home.desktop.enable; programs.rofi = {
package = pkgs.rofi-wayland; enable = true;
terminal = "foot"; package = pkgs.rofi-wayland;
font = "${config.look.fonts.main} 14"; terminal = "foot";
theme = let font = "${config.look.fonts.main} 14";
inherit (config.lib.formats.rasi) mkLiteral; theme = let
in { inherit (config.lib.formats.rasi) mkLiteral;
"*" = { in {
lightbg = mkLiteral "#EEE8D5"; "*" = {
lightfg = mkLiteral "#586875"; lightbg = mkLiteral "#EEE8D5";
blue = mkLiteral "#268BD2"; lightfg = mkLiteral "#586875";
red = mkLiteral "#DC322F"; blue = mkLiteral "#268BD2";
background-color = mkLiteral "#00000000"; red = mkLiteral "#DC322F";
separatorcolor = mkLiteral "#00000000"; background-color = mkLiteral "#00000000";
normal-foreground = mkLiteral "#${config.look.colors.text}"; separatorcolor = mkLiteral "#00000000";
normal-background = mkLiteral "#${config.look.colors.dark}1A"; normal-foreground = mkLiteral "#${config.look.colors.text}";
urgent-foreground = mkLiteral "#${config.look.colors.urgent}"; normal-background = mkLiteral "#${config.look.colors.dark}1A";
active-foreground = mkLiteral "#${config.look.colors.split}"; urgent-foreground = mkLiteral "#${config.look.colors.urgent}";
selected-active-foreground = mkLiteral "#${config.look.colors.prime}"; active-foreground = mkLiteral "#${config.look.colors.split}";
background = mkLiteral "#${config.look.colors.dark}D9"; selected-active-foreground = mkLiteral "#${config.look.colors.prime}";
bordercolor = mkLiteral "#${config.look.colors.prime}"; background = mkLiteral "#${config.look.colors.dark}D9";
selected-normal-foreground = mkLiteral "#FFFFFF"; bordercolor = mkLiteral "#${config.look.colors.prime}";
selected-normal-background = mkLiteral "#${config.look.colors.prime}80"; selected-normal-foreground = mkLiteral "#FFFFFF";
border-color = mkLiteral "#${config.look.colors.prime}"; selected-normal-background = mkLiteral "#${config.look.colors.prime}80";
urgent-background = mkLiteral "#${config.look.colors.accent}26"; border-color = mkLiteral "#${config.look.colors.prime}";
active-background = mkLiteral "#${config.look.colors.accent}26"; urgent-background = mkLiteral "#${config.look.colors.accent}26";
selected-active-background = mkLiteral "#${config.look.colors.split}54"; active-background = mkLiteral "#${config.look.colors.accent}26";
}; selected-active-background = mkLiteral "#${config.look.colors.split}54";
"#window" = { };
background-color = mkLiteral "@background"; "#window" = {
width = 500; background-color = mkLiteral "@background";
border = mkLiteral "${config.look.border.string}"; width = 500;
padding = 5; border = mkLiteral "${config.look.border.string}";
}; padding = 5;
"#message" = { };
border = mkLiteral "1px dash 0px 0px"; "#message" = {
border-color = mkLiteral "@separatorcolor"; border = mkLiteral "1px dash 0px 0px";
padding = 1; border-color = mkLiteral "@separatorcolor";
}; padding = 1;
"#textbox" = { };
text-color = mkLiteral "@normal-foreground"; "#textbox" = {
}; text-color = mkLiteral "@normal-foreground";
"#listview" = { };
fixed-height = 0; "#listview" = {
border-color = mkLiteral "@separatorcolor"; fixed-height = 0;
scrollbar = mkLiteral "false"; border-color = mkLiteral "@separatorcolor";
columns = 2; scrollbar = mkLiteral "false";
}; columns = 2;
"#element" = { };
border = 0; "#element" = {
padding = 1; border = 0;
}; padding = 1;
"#element-text" = { };
background-color = mkLiteral "inherit"; "#element-text" = {
text-color = mkLiteral "inherit"; background-color = mkLiteral "inherit";
}; text-color = mkLiteral "inherit";
"#element.normal.normal" = { };
text-color = mkLiteral "@normal-foreground"; "#element.normal.normal" = {
}; text-color = mkLiteral "@normal-foreground";
"#element.normal.urgent" = { };
text-color = mkLiteral "@urgent-foreground"; "#element.normal.urgent" = {
}; text-color = mkLiteral "@urgent-foreground";
"#element.normal.active" = { };
background-color = mkLiteral "@active-background"; "#element.normal.active" = {
text-color = mkLiteral "@active-foreground"; background-color = mkLiteral "@active-background";
}; text-color = mkLiteral "@active-foreground";
"#element.selected.normal" = { };
background-color = mkLiteral "@selected-normal-background"; "#element.selected.normal" = {
text-color = mkLiteral "@selected-normal-foreground"; background-color = mkLiteral "@selected-normal-background";
}; text-color = mkLiteral "@selected-normal-foreground";
"#element.selected.urgent" = { };
background-color = mkLiteral "@urgent-background"; "#element.selected.urgent" = {
text-color = mkLiteral "@urgent-foreground"; background-color = mkLiteral "@urgent-background";
}; text-color = mkLiteral "@urgent-foreground";
"#element.selected.active" = { };
background-color = mkLiteral "@selected-active-background"; "#element.selected.active" = {
text-color = mkLiteral "@selected-active-foreground"; background-color = mkLiteral "@selected-active-background";
}; text-color = mkLiteral "@selected-active-foreground";
"#element.alternate.normal" = { };
text-color = mkLiteral "@normal-foreground"; "#element.alternate.normal" = {
}; text-color = mkLiteral "@normal-foreground";
"#element.alternate.urgent" = { };
text-color = mkLiteral "@urgent-foreground"; "#element.alternate.urgent" = {
}; text-color = mkLiteral "@urgent-foreground";
"#element.alternate.active" = { };
background-color = mkLiteral "@active-background"; "#element.alternate.active" = {
text-color = mkLiteral "@active-foreground"; background-color = mkLiteral "@active-background";
}; text-color = mkLiteral "@active-foreground";
"#mode-switcher" = { };
border = mkLiteral "2px dash 0px 0px"; "#mode-switcher" = {
border-color = mkLiteral "@separatorcolor"; border = mkLiteral "2px dash 0px 0px";
}; border-color = mkLiteral "@separatorcolor";
"#button.selected" = { };
background-color = mkLiteral "@selected-normal-background"; "#button.selected" = {
text-color = mkLiteral "@selected-normal-foreground"; background-color = mkLiteral "@selected-normal-background";
}; text-color = mkLiteral "@selected-normal-foreground";
"#case-indicator" = { };
spacing = mkLiteral "0"; "#case-indicator" = {
text-color = mkLiteral "@normal-foreground"; spacing = mkLiteral "0";
}; text-color = mkLiteral "@normal-foreground";
"#entry" = { };
spacing = 0; "#entry" = {
text-color = mkLiteral "@normal-foreground"; spacing = 0;
}; text-color = mkLiteral "@normal-foreground";
"#prompt" = { };
spacing = 0; "#prompt" = {
text-color = mkLiteral "@normal-foreground"; spacing = 0;
}; text-color = mkLiteral "@normal-foreground";
"#inputbar" = { };
spacing = 0; "#inputbar" = {
text-color = mkLiteral "@normal-foreground"; spacing = 0;
padding = 1; text-color = mkLiteral "@normal-foreground";
children = map mkLiteral [ "prompt" "textbox-prompt-colon" "entry"]; padding = 1;
}; children = map mkLiteral [ "prompt" "textbox-prompt-colon" "entry"];
"#textbox-prompt-colon" = { };
expand = false; "#textbox-prompt-colon" = {
str = ":"; expand = false;
margin = mkLiteral "0px 0.3em 0em 0em"; str = ":";
text-color = mkLiteral "@normal-foreground"; margin = mkLiteral "0px 0.3em 0em 0em";
text-color = mkLiteral "@normal-foreground";
};
}; };
}; };
};
home.packages = with pkgs; [ home.packages = with pkgs; [
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}

View file

@ -22,7 +22,7 @@
".config/heroic" ".config/heroic"
".config/obs-studio" ".config/obs-studio"
".local/share/mpd" ".local/share/mpd"
".local/share/nvim/undo" ".local/share/nvim/undo"
".local/share/fractal" ".local/share/fractal"
".local/share/PrismLauncher" ".local/share/PrismLauncher"