mirror of
https://github.com/nix-community/home-manager
synced 2024-12-23 18:29:47 +01:00
kanshi: dont write config in absence of nix settings (#6198)
This commit is contained in:
parent
e526fd2b1a
commit
3066cc58f5
2 changed files with 8 additions and 9 deletions
|
@ -38,9 +38,7 @@ let
|
|||
else
|
||||
throw "Unknown tags ${attrNames x}";
|
||||
|
||||
directivesStr = ''
|
||||
${concatStringsSep "\n" (map tagToStr cfg.settings)}
|
||||
'';
|
||||
directivesStr = concatStringsSep "\n" (map tagToStr cfg.settings);
|
||||
|
||||
oldDirectivesStr = ''
|
||||
${concatStringsSep "\n"
|
||||
|
@ -332,11 +330,13 @@ in {
|
|||
{
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
xdg.configFile."kanshi/config".text =
|
||||
if cfg.profiles == { } && cfg.extraConfig == "" then
|
||||
directivesStr
|
||||
else
|
||||
oldDirectivesStr;
|
||||
xdg.configFile."kanshi/config" = let
|
||||
generatedConfigStr =
|
||||
if cfg.profiles == { } && cfg.extraConfig == "" then
|
||||
directivesStr
|
||||
else
|
||||
oldDirectivesStr;
|
||||
in mkIf (generatedConfigStr != "") { text = generatedConfigStr; };
|
||||
|
||||
systemd.user.services.kanshi = {
|
||||
Unit = {
|
||||
|
|
|
@ -16,4 +16,3 @@ profile {
|
|||
output "LVDS-1" enable
|
||||
exec echo "7 eight 9"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue