Compare commits

...

2 Commits

Author SHA1 Message Date
1a54eab3fb
fix: pass lib to backup module and fixup backup configuration
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-30 11:16:19 +05:30
104d4b6c8d
chore: move lanzaboote to system module and remove nixpkgs-immich input
* lanzaboote is needed to evaluate nix configuration, even if it's not used
in the system.
* removed nixpkgs-immich since nixpkgs now has immich service

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
2024-09-30 11:14:57 +05:30
5 changed files with 7 additions and 15 deletions

View File

@ -23,11 +23,11 @@
disko.nixosModules.disko
srvos.nixosModules.common
srvos.nixosModules.mixins-systemd-boot
inputs.lanzaboote.nixosModules.lanzaboote
];
systems.hosts.thonkpad.modules = [
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-12th-gen
inputs.lanzaboote.nixosModules.lanzaboote
];
systems.hosts.thonkpad.specialArgs = {
inherit userdata;
@ -101,7 +101,6 @@
nil.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-immich.url = "github:nixos/nixpkgs/d026e3fa1ad0d78d9072d9afdeae515d2d68acae";
nixos-hardware.url = "github:nixos/nixos-hardware";
nur.url = "github:nix-community/nur";

View File

@ -3,9 +3,7 @@
lib,
...
}:
with lib; let
inherit (utils.systemdUtils.unitOptions) unitOption;
in {
with lib; {
options.snowflake.services.backups = {
enable = mkEnableOption "Enable restic backup service";
@ -27,7 +25,7 @@ in {
default = {};
type = types.attrsOf (
types.submodule (
{_}: {
{lib, ...}: {
options = {
dynamicFilesFrom = mkOption {
type = types.nullOr types.str;
@ -63,7 +61,6 @@ in {
};
timerConfig = mkOption {
type = types.attrsOf unitOption;
default = {
OnCalendar = "daily";
};

View File

@ -1,13 +1,9 @@
{
config,
inputs,
lib,
pkgs,
...
}: {
imports = [
"${inputs.nixpkgs-immich}/nixos/modules/services/web-apps/immich.nix"
];
options.snowflake.services.immich = {
enable = lib.mkEnableOption "Enable immich service";
@ -24,7 +20,7 @@
lib.mkIf cfg.enable {
services.immich = {
enable = true;
package = inputs.nixpkgs-immich.legacyPackages.x86_64-linux.immich;
package = pkgs.immich;
mediaLocation = "/storage/media/immich-library";
port = 9121;
};

View File

@ -64,7 +64,7 @@
};
};
snowflake.services.backups.paperless.config = {
snowflake.services.backups.config.paperless = {
dynamicFilesFrom = let
path = config.services.paperless.dataDir;
in ''

View File

@ -77,7 +77,7 @@
};
};
snowflake.services.backups.vaultwarden.paths = [
snowflake.services.backups.config.vaultwarden.paths = [
"/var/lib/bitwarden_rs"
];
};