fix: move paperless config to module
This commit is contained in:
parent
f602f150ba
commit
bdeb5584de
3 changed files with 22 additions and 20 deletions
|
@ -4,6 +4,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
../modules/profiles/laptop.nix
|
../modules/profiles/laptop.nix
|
||||||
./disks.nix
|
./disks.nix
|
||||||
|
# TODO ./paperless.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
luks.devices = {
|
luks.devices = {
|
||||||
root = {
|
root = {
|
||||||
# TODO
|
# TODO
|
||||||
device = "/dev/disk/by-uuid/todo";
|
device = "/dev/disk/by-uuid/TODO";
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
# TODO lanzaboote + TPM2 unlock with PIN https://www.freedesktop.org/software/systemd/man/251/systemd-cryptenroll.html#--tpm2-with-pin=BOOL
|
# TODO lanzaboote + TPM2 unlock with PIN https://www.freedesktop.org/software/systemd/man/251/systemd-cryptenroll.html#--tpm2-with-pin=BOOL
|
||||||
#crypttabExtraOpts = [ "fido2-device=auto" ];
|
#crypttabExtraOpts = [ "fido2-device=auto" ];
|
||||||
|
@ -115,11 +116,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
browsing = true;
|
browsing = true;
|
||||||
};
|
};
|
||||||
paperless = {
|
|
||||||
# TODO migrate DB
|
|
||||||
enable = true;
|
|
||||||
passwordFile = config.age.secrets.paperless.path;
|
|
||||||
};
|
|
||||||
tlp.enable = false;
|
tlp.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -127,19 +123,6 @@
|
||||||
stateVersion = "25.05";
|
stateVersion = "25.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules =
|
|
||||||
let
|
|
||||||
cfg = config.services.paperless;
|
|
||||||
in
|
|
||||||
[
|
|
||||||
(
|
|
||||||
if cfg.consumptionDirIsPublic then
|
|
||||||
"d '${cfg.consumptionDir}' 777 - - - -"
|
|
||||||
else
|
|
||||||
"d '${cfg.consumptionDir}' 770 ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
|
|
||||||
)
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
modem-manager.enable = lib.mkForce false;
|
modem-manager.enable = lib.mkForce false;
|
||||||
"dbus-org.freedesktop.ModemManager1".enable = lib.mkForce false;
|
"dbus-org.freedesktop.ModemManager1".enable = lib.mkForce false;
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
mountOptions = [ "umask=0077" ];
|
mountOptions = [ "umask=0077" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# TODO tmpfs for nix/var/nix/builds
|
|
||||||
luks = {
|
luks = {
|
||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
|
|
20
nixos/stolas/paperless.nix
Normal file
20
nixos/stolas/paperless.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ config }:
|
||||||
|
{
|
||||||
|
services.paperless = {
|
||||||
|
# TODO migrate DB
|
||||||
|
enable = true;
|
||||||
|
passwordFile = config.age.secrets.paperless.path;
|
||||||
|
};
|
||||||
|
systemd.tmpfiles.rules =
|
||||||
|
let
|
||||||
|
cfg = config.services.paperless;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
(
|
||||||
|
if cfg.consumptionDirIsPublic then
|
||||||
|
"d '${cfg.consumptionDir}' 777 - - - -"
|
||||||
|
else
|
||||||
|
"d '${cfg.consumptionDir}' 770 ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
|
||||||
|
)
|
||||||
|
];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue