Merge branch 'config+' of nek0/yammat into nix

This commit is contained in:
astro 2021-03-10 01:52:36 +01:00 committed by Gitea
commit dcf2bf0984
1 changed files with 12 additions and 1 deletions

View File

@ -18,6 +18,12 @@ in
default = "yammat"; default = "yammat";
description = "System group to run Yammat"; description = "System group to run Yammat";
}; };
config = mkOption {
type = types.lines
default = builtins.readFile ./config/settings.yml;
description = "Configuration for Yammat";
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -54,8 +60,13 @@ in
User = cfg.user; User = cfg.user;
Group = cfg.group; Group = cfg.group;
WorkingDirectory = yammat; WorkingDirectory = yammat;
ExecStart = "${yammat}/bin/yammat"; ExecStart = "${yammat}/bin/yammat /etc/yammat.yml";
}; };
}; };
environment.etc."yammat.yml" = {
enable = true;
text = cfg.config;
};
}; };
} }