flake improvements

This commit is contained in:
tuxcoder 2023-10-20 09:58:32 +02:00
parent eee18c1785
commit 52f1e84c43
3 changed files with 14 additions and 9 deletions

View file

@ -52,16 +52,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1696374741, "lastModified": 1697059129,
"narHash": "sha256-gt8B3G0ryizT9HSB4cCO8QoxdbsHnrQH+/BdKxOwqF0=", "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8a4c17493e5c39769f79117937c79e1c88de6729", "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "nixos-23.05", "ref": "nixos-unstable",
"type": "indirect" "type": "indirect"
} }
}, },

View file

@ -1,7 +1,7 @@
{ {
description = "Lenticular cloud interface"; description = "Lenticular cloud interface";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05"; nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
flake-compat = { # for shell.nix flake-compat = { # for shell.nix
url = "github:edolstra/flake-compat"; url = "github:edolstra/flake-compat";
@ -47,7 +47,12 @@
tuxpkgs.nixosModules.ory-hydra tuxpkgs.nixosModules.ory-hydra
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix" "${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 = { services.ory-hydra = {
enable = true; enable = true;
admin_domain = "admin-hydra.local"; admin_domain = "admin-hydra.local";

View file

@ -83,11 +83,11 @@ in
description = "lenticular account"; description = "lenticular account";
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
requires = [ "ory-hydra.service" ]; requires = [ "ory-hydra.service" "postgresql.service" ];
enable = cfg.enable; enable = cfg.enable;
environment = let environment = let
python_path = with python.pkgs; makePythonPath [ pkgs.lenticular-cloud gevent ]; python_path = with python.pkgs; makePythonPath [ pkgs.lenticular-cloud gevent setuptools ];
in { in {
# CONFIG_FILE = "/etc/lenticular_cloud/production.conf"; # CONFIG_FILE = "/etc/lenticular_cloud/production.conf";
CONFIG_FILE = pkgs.writeText "lenticular-cloud.json" (builtins.toJSON cfg.settings); CONFIG_FILE = pkgs.writeText "lenticular-cloud.json" (builtins.toJSON cfg.settings);