diff --git a/nixos-module.nix b/nixos-module.nix index 6df27e1..7bdbf7b 100644 --- a/nixos-module.nix +++ b/nixos-module.nix @@ -18,6 +18,12 @@ in default = "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 { @@ -54,8 +60,13 @@ in User = cfg.user; Group = cfg.group; WorkingDirectory = yammat; - ExecStart = "${yammat}/bin/yammat"; + ExecStart = "${yammat}/bin/yammat /etc/yammat.yml"; }; }; + + environment.etc."yammat.yml" = { + enable = true; + text = cfg.config; + }; }; }