.
This commit is contained in:
parent
3efe1dad0c
commit
1b35e333c2
1 changed files with 9 additions and 9 deletions
18
flake.nix
18
flake.nix
|
|
@ -8,7 +8,7 @@
|
|||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }: {
|
||||
packages.x86_64-linux.default =
|
||||
packages.x86_64-linux.calDavToCsv =
|
||||
nixpkgs.python3.pkgs.buildPythonApplication rec {
|
||||
pname = "calDAVtoCSV";
|
||||
version = "0.1.0";
|
||||
|
|
@ -30,19 +30,19 @@
|
|||
maintainers = with nixpkgs.lib.maintainers; [ stuce-bot ];
|
||||
};
|
||||
};
|
||||
nixosModules.default = { config, lib, pkgs, ... }:
|
||||
nixosModules.calDavToCsv = { config, lib, pkgs, ... }:
|
||||
let cfg = config.services.deafault;
|
||||
in {
|
||||
options.default = {
|
||||
options.calDavToCsv = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
calDavToCsv = false;
|
||||
description = "Enable myService";
|
||||
};
|
||||
|
||||
config = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {
|
||||
calDavToCsv = {
|
||||
calDAV = {
|
||||
address = "localhost:5232";
|
||||
username = "username";
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
# enable = lib.mkEnableOption "Enable calDAVtoCSV service";
|
||||
# port = lib.mkOption {
|
||||
# type = lib.types.int;
|
||||
# default = 8000;
|
||||
# calDavToCsv = 8000;
|
||||
# description = "Port on which calDAVtoCSV will listen";
|
||||
# };
|
||||
# url = lib.mkOption {
|
||||
|
|
@ -80,11 +80,11 @@
|
|||
# "file where we need to look for password to connect, needs to be readeable by the service user";
|
||||
# };
|
||||
# };
|
||||
config = lib.mkIf config.default.enable {
|
||||
config = lib.mkIf config.calDavToCsv.enable {
|
||||
environment.etc."config.ini".text = ''
|
||||
${lib.toIni config.default.config}
|
||||
${lib.toIni config.calDavToCsv.config}
|
||||
'';
|
||||
systemd.services.default = {
|
||||
systemd.services.calDavToCsv = {
|
||||
description = "calDAV to CSV Service";
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue