use xdg.configFile
for files in XDG config home
This commit is contained in:
parent
54a9058ee0
commit
d70715a635
|
@ -29,7 +29,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enableProfileFonts {
|
config = mkIf cfg.enableProfileFonts {
|
||||||
home.file.".config/fontconfig/conf.d/10-nix-profile-fonts.conf".text = ''
|
xdg.configFile."fontconfig/conf.d/10-nix-profile-fonts.conf".text = ''
|
||||||
<?xml version='1.0'?>
|
<?xml version='1.0'?>
|
||||||
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
|
||||||
<fontconfig>
|
<fontconfig>
|
||||||
|
|
|
@ -124,10 +124,10 @@ in
|
||||||
mapAttrsToList formatGtk2Option ini
|
mapAttrsToList formatGtk2Option ini
|
||||||
) + "\n" + cfg2.extraConfig;
|
) + "\n" + cfg2.extraConfig;
|
||||||
|
|
||||||
home.file.".config/gtk-3.0/settings.ini".text =
|
xdg.configFile."gtk-3.0/settings.ini".text =
|
||||||
toGtk3Ini { Settings = ini // cfg3.extraConfig; };
|
toGtk3Ini { Settings = ini // cfg3.extraConfig; };
|
||||||
|
|
||||||
home.file.".config/gtk-3.0/gtk.css".text = cfg3.extraCss;
|
xdg.configFile."gtk-3.0/gtk.css".text = cfg3.extraCss;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ in
|
||||||
config = mkIf (cfg.settings != {}) {
|
config = mkIf (cfg.settings != {}) {
|
||||||
home.packages = [ pkgs.beets ];
|
home.packages = [ pkgs.beets ];
|
||||||
|
|
||||||
home.file.".config/beets/config.yaml".text =
|
xdg.configFile."beets/config.yaml".text =
|
||||||
builtins.toJSON config.programs.beets.settings;
|
builtins.toJSON config.programs.beets.settings;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.feh ];
|
home.packages = [ pkgs.feh ];
|
||||||
|
|
||||||
home.file.".config/feh/keys".text = ''
|
xdg.configFile."feh/keys".text = ''
|
||||||
# Disable default keybindings
|
# Disable default keybindings
|
||||||
${concatStringsSep "\n" (mapAttrsToList disableBinding cfg.keybindings)}
|
${concatStringsSep "\n" (mapAttrsToList disableBinding cfg.keybindings)}
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,7 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.htop ];
|
home.packages = [ pkgs.htop ];
|
||||||
|
|
||||||
home.file.".config/htop/htoprc".text = let
|
xdg.configFile."htop/htoprc".text = let
|
||||||
leftMeters = map (m: m.kind) cfg.meters.left;
|
leftMeters = map (m: m.kind) cfg.meters.left;
|
||||||
leftModes = map (m: m.mode) cfg.meters.left;
|
leftModes = map (m: m.mode) cfg.meters.left;
|
||||||
rightMeters = map (m: m.kind) cfg.meters.right;
|
rightMeters = map (m: m.kind) cfg.meters.right;
|
||||||
|
|
|
@ -310,7 +310,7 @@ in
|
||||||
optionalString = name: val: lib.optionalString (val != null) "${name} = ${val}";
|
optionalString = name: val: lib.optionalString (val != null) "${name} = ${val}";
|
||||||
in mkIf cfg.enable {
|
in mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.termite ];
|
home.packages = [ pkgs.termite ];
|
||||||
home.file.".config/termite/config".text = ''
|
xdg.configFile."termite/config".text = ''
|
||||||
[options]
|
[options]
|
||||||
${optionalBoolean "allow_bold" cfg.allowBold}
|
${optionalBoolean "allow_bold" cfg.allowBold}
|
||||||
${optionalBoolean "audible_bell" cfg.audibleBell}
|
${optionalBoolean "audible_bell" cfg.audibleBell}
|
||||||
|
|
|
@ -71,7 +71,7 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
(mkIf (cfg.settings != {}) {
|
(mkIf (cfg.settings != {}) {
|
||||||
home.file.".config/dunst/dunstrc".text = toDunstIni cfg.settings;
|
xdg.configFile."dunst/dunstrc".text = toDunstIni cfg.settings;
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
|
@ -111,7 +111,7 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
home.file.".config/polybar/config".source = configFile;
|
xdg.configFile."polybar/config".source = configFile;
|
||||||
|
|
||||||
systemd.user.services.polybar = {
|
systemd.user.services.polybar = {
|
||||||
Unit = {
|
Unit = {
|
||||||
|
|
|
@ -28,12 +28,12 @@ let
|
||||||
|
|
||||||
wantedBy = target:
|
wantedBy = target:
|
||||||
{
|
{
|
||||||
name = ".config/systemd/user/${target}.wants/${name}.${style}";
|
name = "systemd/user/${target}.wants/${name}.${style}";
|
||||||
value = { inherit source; };
|
value = { inherit source; };
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
singleton {
|
singleton {
|
||||||
name = ".config/systemd/user/${name}.${style}";
|
name = "systemd/user/${name}.${style}";
|
||||||
value = { inherit source; };
|
value = { inherit source; };
|
||||||
}
|
}
|
||||||
++
|
++
|
||||||
|
@ -107,7 +107,7 @@ in
|
||||||
# If we run under a Linux system we assume that systemd is
|
# If we run under a Linux system we assume that systemd is
|
||||||
# available, in particular we assume that systemctl is in PATH.
|
# available, in particular we assume that systemctl is in PATH.
|
||||||
(mkIf pkgs.stdenv.isLinux {
|
(mkIf pkgs.stdenv.isLinux {
|
||||||
home.file =
|
xdg.configFile =
|
||||||
listToAttrs (
|
listToAttrs (
|
||||||
(buildServices "service" cfg.services)
|
(buildServices "service" cfg.services)
|
||||||
++
|
++
|
||||||
|
|
Loading…
Reference in a new issue