From 0c7d1d1cb7f46d81fb49434f1ba30efd1a575226 Mon Sep 17 00:00:00 2001 From: Stuce Date: Sun, 16 Nov 2025 12:21:16 +0100 Subject: [PATCH] . --- flake.nix | 132 +++++++++++++++++++++++++++--------------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/flake.nix b/flake.nix index 6e4f5c0..67644a3 100644 --- a/flake.nix +++ b/flake.nix @@ -33,71 +33,71 @@ maintainers = with pkgs.lib.maintainers; [ stuce-bot ]; }; }; - nixosModules.default = { config, lib, ... }: - let cfg = config.services.deafault; - in { - options.default = { - enable = lib.mkOption { - type = lib.types.bool; - default = false; - description = "Enable myService"; - }; - - config = lib.mkOption { - type = lib.types.attrs; - default = { - calDAV = { - address = "localhost:5232"; - username = "username"; - password = "password"; - passwordFile = "/path/to/password"; - }; - server = { port = 8000; }; - }; - description = "User-defined configuration for the service"; - }; - }; - # options.NixosModule = { - # enable = lib.mkEnableOption "Enable calDAVtoCSV service"; - # port = lib.mkOption { - # type = lib.types.int; - # default = 8000; - # description = "Port on which calDAVtoCSV will listen"; - # }; - # url = lib.mkOption { - # type = lib.types.str; - # description = "url of the calendar"; - # }; - # calendarUsername = lib.mkOption { - # type = lib.types.str; - # description = "username of the calendar account"; - # }; - # calendarName = lib.mkOption { - # type = lib.types.str; - # description = - # "name of the calendar we will fetch the todo items from"; - # }; - # calendarPasswordFile = lib.mkOption { - # type = lib.types.str; - # description = - # "file where we need to look for password to connect, needs to be readeable by the service user"; - # }; - # }; - config = lib.mkIf config.default.enable { - environment.etc."config.ini".text = '' - ${lib.toIni config.default.config} - ''; - systemd.services.default = { - description = "calDAV to CSV Service"; - after = [ "network.target" ]; - serviceConfig = { - ExecStart = - "${pkgs.python3.pkgs.gunicorn}/bin/gunicorn -w 1 -b 0.0.0.0:${cfg.port} main:app"; - Restart = "on-failure"; - }; - wantedBy = [ "multi-user.target" ]; - }; - }; - }; }); + nixosModules.default = { config, lib, pkgs, ... }: + let cfg = config.services.deafault; + in { + options.default = { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable myService"; + }; + + config = lib.mkOption { + type = lib.types.attrs; + default = { + calDAV = { + address = "localhost:5232"; + username = "username"; + password = "password"; + passwordFile = "/path/to/password"; + }; + server = { port = 8000; }; + }; + description = "User-defined configuration for the service"; + }; + }; + # options.NixosModule = { + # enable = lib.mkEnableOption "Enable calDAVtoCSV service"; + # port = lib.mkOption { + # type = lib.types.int; + # default = 8000; + # description = "Port on which calDAVtoCSV will listen"; + # }; + # url = lib.mkOption { + # type = lib.types.str; + # description = "url of the calendar"; + # }; + # calendarUsername = lib.mkOption { + # type = lib.types.str; + # description = "username of the calendar account"; + # }; + # calendarName = lib.mkOption { + # type = lib.types.str; + # description = + # "name of the calendar we will fetch the todo items from"; + # }; + # calendarPasswordFile = lib.mkOption { + # type = lib.types.str; + # description = + # "file where we need to look for password to connect, needs to be readeable by the service user"; + # }; + # }; + config = lib.mkIf config.default.enable { + environment.etc."config.ini".text = '' + ${lib.toIni config.default.config} + ''; + systemd.services.default = { + description = "calDAV to CSV Service"; + after = [ "network.target" ]; + serviceConfig = { + ExecStart = + "${pkgs.python3.pkgs.gunicorn}/bin/gunicorn -w 1 -b 0.0.0.0:${cfg.port} main:app"; + Restart = "on-failure"; + }; + wantedBy = [ "multi-user.target" ]; + }; + }; + }; }