Paper : Rollback to stable.
This commit is contained in:
parent
4e7f3fcf33
commit
0eb60a668c
|
@ -40,7 +40,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = { config, ... }: container.mkContainerConfig cfg {
|
config = { config, ... }: container.mkContainerConfig cfg {
|
||||||
environment.systemPackages = [ pkgs.postgresql ];
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# package = pkgs.nextcloud29;
|
# package = pkgs.nextcloud29;
|
||||||
|
|
|
@ -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;
|
cfg = config.container.module.paper;
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
|
@ -41,14 +41,13 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = { lib, ... }: container.mkContainerConfig cfg {
|
config = { lib, ... }: container.mkContainerConfig cfg {
|
||||||
environment.systemPackages = with pkgs; [ postgresql inetutils ];
|
|
||||||
|
|
||||||
services.paperless = {
|
services.paperless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dataDir = "/var/lib/paperless";
|
dataDir = "/var/lib/paperless";
|
||||||
# address = cfg.domain;
|
# address = cfg.domain;
|
||||||
address = "0.0.0.0";
|
address = "0.0.0.0";
|
||||||
port = cfg.port;
|
port = cfg.port;
|
||||||
|
package = pkgsStable.paperless-ngx;
|
||||||
passwordFile = pkgs.writeText "PaperlessPassword" "root";
|
passwordFile = pkgs.writeText "PaperlessPassword" "root";
|
||||||
settings = {
|
settings = {
|
||||||
PAPERLESS_URL = "https://${cfg.domain}";
|
PAPERLESS_URL = "https://${cfg.domain}";
|
||||||
|
|
|
@ -191,7 +191,7 @@
|
||||||
|
|
||||||
secret = import ./secret {}; # Secrets (public keys).
|
secret = import ./secret {}; # Secrets (public keys).
|
||||||
container = import ./lib/Container.nix { inherit lib pkgs config; inherit (self) const; }; # Container utils.
|
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 {
|
in {
|
||||||
flake = self;
|
flake = self;
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@
|
||||||
flake = self; # This Flake itself.
|
flake = self; # This Flake itself.
|
||||||
inputs = inputs; # Our dependencies.
|
inputs = inputs; # Our dependencies.
|
||||||
secret = import ./lib/Secret.nix {}; # Secrets (public keys).
|
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.
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Collection of common functions.
|
# Collection of common functions.
|
||||||
{ pkgs, lib, ... }: rec {
|
{ lib }: rec {
|
||||||
# Remove tabs indentation,
|
# Remove tabs indentation,
|
||||||
trimTabs = text: let
|
trimTabs = text: let
|
||||||
shouldStripTab = lines: builtins.all (line: (line == "") || (pkgs.lib.strings.hasPrefix " " line)) lines;
|
shouldStripTab = lines: builtins.all (line: (line == "") || (lib.strings.hasPrefix " " line)) lines;
|
||||||
stripTab = lines: builtins.map (line: pkgs.lib.strings.removePrefix " " line) lines;
|
stripTab = lines: builtins.map (line: lib.strings.removePrefix " " line) lines;
|
||||||
stripTabs = lines: if (shouldStripTab lines) then (stripTabs (stripTab lines)) else lines;
|
stripTabs = lines: if (shouldStripTab lines) then (stripTabs (stripTab lines)) else lines;
|
||||||
in
|
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.
|
# List all files in a dir.
|
||||||
ls = path: map (f: "${path}/${f}") (builtins.attrNames (builtins.readDir path));
|
ls = path: map (f: "${path}/${f}") (builtins.attrNames (builtins.readDir path));
|
||||||
|
|
Loading…
Reference in a new issue