mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 18:59: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
|
else
|
||||||
throw "Unknown tags ${attrNames x}";
|
throw "Unknown tags ${attrNames x}";
|
||||||
|
|
||||||
directivesStr = ''
|
directivesStr = concatStringsSep "\n" (map tagToStr cfg.settings);
|
||||||
${concatStringsSep "\n" (map tagToStr cfg.settings)}
|
|
||||||
'';
|
|
||||||
|
|
||||||
oldDirectivesStr = ''
|
oldDirectivesStr = ''
|
||||||
${concatStringsSep "\n"
|
${concatStringsSep "\n"
|
||||||
|
@ -332,11 +330,13 @@ in {
|
||||||
{
|
{
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."kanshi/config".text =
|
xdg.configFile."kanshi/config" = let
|
||||||
|
generatedConfigStr =
|
||||||
if cfg.profiles == { } && cfg.extraConfig == "" then
|
if cfg.profiles == { } && cfg.extraConfig == "" then
|
||||||
directivesStr
|
directivesStr
|
||||||
else
|
else
|
||||||
oldDirectivesStr;
|
oldDirectivesStr;
|
||||||
|
in mkIf (generatedConfigStr != "") { text = generatedConfigStr; };
|
||||||
|
|
||||||
systemd.user.services.kanshi = {
|
systemd.user.services.kanshi = {
|
||||||
Unit = {
|
Unit = {
|
||||||
|
|
|
@ -16,4 +16,3 @@ profile {
|
||||||
output "LVDS-1" enable
|
output "LVDS-1" enable
|
||||||
exec echo "7 eight 9"
|
exec echo "7 eight 9"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue