1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 05:29:46 +01:00

programs.foot: Always create config file (#2091)

foot complains if there is no config file.
This commit is contained in:
Rosario Pulella 2021-06-10 12:40:36 -04:00 committed by GitHub
parent 42847469b3
commit 666eee4f72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View file

@ -51,7 +51,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [ cfg.package ]; home.packages = [ cfg.package ];
xdg.configFile."foot/foot.ini" = mkIf (cfg.settings != { }) { xdg.configFile."foot/foot.ini" = {
source = iniFormat.generate "foot.ini" cfg.settings; source = iniFormat.generate "foot.ini" cfg.settings;
}; };

View file

@ -10,7 +10,10 @@ with lib;
[ (self: super: { foot = pkgs.writeScriptBin "dummy-foot" ""; }) ]; [ (self: super: { foot = pkgs.writeScriptBin "dummy-foot" ""; }) ];
nmt.script = '' nmt.script = ''
assertPathNotExists home-files/.config/foot assertFileExists home-files/.config/foot/foot.ini
assertFileContent \
home-files/.config/foot/foot.ini \
${builtins.toFile "test" ""}
''; '';
}; };
} }

View file

@ -11,7 +11,10 @@ in {
}; };
nmt.script = '' nmt.script = ''
assertPathNotExists home-files/.config/foot/foot.ini assertFileExists home-files/.config/foot/foot.ini
assertFileContent \
home-files/.config/foot/foot.ini \
${builtins.toFile "test" ""}
assertFileContent \ assertFileContent \
home-files/.config/systemd/user/foot.service \ home-files/.config/systemd/user/foot.service \