From 52f1e84c430e21a29dc1484d303a69ab305c0064 Mon Sep 17 00:00:00 2001 From: tuxcoder Date: Fri, 20 Oct 2023 09:58:32 +0200 Subject: [PATCH] flake improvements --- flake.lock | 8 ++++---- flake.nix | 9 +++++++-- module.nix | 6 +++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 896297c..228a66f 100644 --- a/flake.lock +++ b/flake.lock @@ -52,16 +52,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1696374741, - "narHash": "sha256-gt8B3G0ryizT9HSB4cCO8QoxdbsHnrQH+/BdKxOwqF0=", + "lastModified": 1697059129, + "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8a4c17493e5c39769f79117937c79e1c88de6729", + "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-23.05", + "ref": "nixos-unstable", "type": "indirect" } }, diff --git a/flake.nix b/flake.nix index 40e7774..a7077fd 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "Lenticular cloud interface"; inputs = { - nixpkgs.url = "nixpkgs/nixos-23.05"; + nixpkgs.url = "nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; flake-compat = { # for shell.nix url = "github:edolstra/flake-compat"; @@ -47,7 +47,12 @@ tuxpkgs.nixosModules.ory-hydra "${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix" ({...}:{ - services.lenticular-cloud.enable = true; + security.acme.acceptTerms = true; + security.acme.defaults.email = "acme@example.com"; + services.lenticular-cloud = { + enable = true; + domain = "example.com"; + }; services.ory-hydra = { enable = true; admin_domain = "admin-hydra.local"; diff --git a/module.nix b/module.nix index a22c198..8c64fec 100644 --- a/module.nix +++ b/module.nix @@ -7,7 +7,7 @@ let in { options = with lib.options; { - services.lenticular-cloud ={ + services.lenticular-cloud = { enable = mkEnableOption "lenticluar service enable"; domain = mkOption { type = lib.types.str; @@ -83,11 +83,11 @@ in description = "lenticular account"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - requires = [ "ory-hydra.service" ]; + requires = [ "ory-hydra.service" "postgresql.service" ]; enable = cfg.enable; environment = let - python_path = with python.pkgs; makePythonPath [ pkgs.lenticular-cloud gevent ]; + python_path = with python.pkgs; makePythonPath [ pkgs.lenticular-cloud gevent setuptools ]; in { # CONFIG_FILE = "/etc/lenticular_cloud/production.conf"; CONFIG_FILE = pkgs.writeText "lenticular-cloud.json" (builtins.toJSON cfg.settings);