Paper : Rollback to stable.

This commit is contained in:
Dmitry Voronin 2024-06-26 11:23:36 +03:00
parent 4e7f3fcf33
commit 0eb60a668c
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
4 changed files with 8 additions and 10 deletions

View file

@ -40,7 +40,6 @@ in {
};
config = { config, ... }: container.mkContainerConfig cfg {
environment.systemPackages = [ pkgs.postgresql ];
services.nextcloud = {
enable = true;
# package = pkgs.nextcloud29;

View file

@ -1,4 +1,4 @@
{ container, pkgs, util, lib, config, ... }: with lib; let
{ container, pkgs, pkgsStable, lib, config, ... }: with lib; let
cfg = config.container.module.paper;
in {
options = {
@ -41,14 +41,13 @@ in {
};
config = { lib, ... }: container.mkContainerConfig cfg {
environment.systemPackages = with pkgs; [ postgresql inetutils ];
services.paperless = {
enable = true;
dataDir = "/var/lib/paperless";
# address = cfg.domain;
address = "0.0.0.0";
port = cfg.port;
package = pkgsStable.paperless-ngx;
passwordFile = pkgs.writeText "PaperlessPassword" "root";
settings = {
PAPERLESS_URL = "https://${cfg.domain}";

View file

@ -191,7 +191,7 @@
secret = import ./secret {}; # Secrets (public keys).
container = import ./lib/Container.nix { inherit lib pkgs config; inherit (self) const; }; # Container utils.
util = import ./lib/Util.nix { inherit pkgs lib; }; # Util functions.
util = import ./lib/Util.nix { inherit lib; }; # Util functions.
in {
flake = self;
@ -267,7 +267,7 @@
flake = self; # This Flake itself.
inputs = inputs; # Our dependencies.
secret = import ./lib/Secret.nix {}; # Secrets (public keys).
util = import ./lib/Util.nix { inherit pkgs lib; }; # Util functions.
util = import ./lib/Util.nix { inherit lib; }; # Util functions.
};
};
};

View file

@ -1,12 +1,12 @@
# Collection of common functions.
{ pkgs, lib, ... }: rec {
{ lib }: rec {
# Remove tabs indentation,
trimTabs = text: let
shouldStripTab = lines: builtins.all (line: (line == "") || (pkgs.lib.strings.hasPrefix " " line)) lines;
stripTab = lines: builtins.map (line: pkgs.lib.strings.removePrefix " " line) lines;
shouldStripTab = lines: builtins.all (line: (line == "") || (lib.strings.hasPrefix " " line)) lines;
stripTab = lines: builtins.map (line: lib.strings.removePrefix " " line) lines;
stripTabs = lines: if (shouldStripTab lines) then (stripTabs (stripTab lines)) else lines;
in
builtins.concatStringsSep "\n" (stripTabs (pkgs.lib.strings.splitString "\n" text));
builtins.concatStringsSep "\n" (stripTabs (lib.strings.splitString "\n" text));
# List all files in a dir.
ls = path: map (f: "${path}/${f}") (builtins.attrNames (builtins.readDir path));