This commit is contained in:
parent
409c927fff
commit
95a1a28e91
42
flake.lock
42
flake.lock
|
@ -502,11 +502,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1684321175,
|
"lastModified": 1684484967,
|
||||||
"narHash": "sha256-V4EbM+jK7pvjKBaj0dgAiW9ultzDE27Nz5fRyu/ceMk=",
|
"narHash": "sha256-P3ftCqeJmDYS9LSr2gGC4XGGcp5vv8TOasJX6fVHWsw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "59659243cd4ababda605e79b4a9c2e6d83e24c86",
|
"rev": "b9a52ad20e58ebd003444915e35e3dd2c18fc715",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -799,11 +799,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_22-11": {
|
"nixpkgs_22-11": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1684280442,
|
"lastModified": 1684398685,
|
||||||
"narHash": "sha256-nC1/kfh6tpMQSLQalbNTNnireIlxvLLugrjZdasNh+I=",
|
"narHash": "sha256-TRE62m91iZ5ArVMgA+uj22Yda8JoQuuhc9uwZ+NoX+0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6c591e7adc514090a77209f56c9d0c551ab8530d",
|
"rev": "628d4bb6e9f4f0c30cfd9b23d3c1cdcec9d3cb5c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -815,11 +815,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1684398339,
|
"lastModified": 1684502756,
|
||||||
"narHash": "sha256-Mrx9RW8e7dZRh6F+koFhKNKYhKk/GmCdsEpdYcQJ9rQ=",
|
"narHash": "sha256-7ssIPaLW2ncTApmExLSoqomPBlubNyUWm/SZYVgKhpI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "4105d3b66358485f1693c5650458bb8819efa8e7",
|
"rev": "a13191189f5d8a7e515155c24eb4e346aa4752f4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -831,11 +831,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1684049129,
|
"lastModified": 1684385584,
|
||||||
"narHash": "sha256-7WB9LpnPNAS8oI7hMoHeKLNhRX7k3CI9uWBRSfmOCCE=",
|
"narHash": "sha256-O7y0gK8OLIDqz+LaHJJyeu09IGiXlZIS3+JgEzGmmJA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0470f36b02ef01d4f43c641bbf07020bcab71bf1",
|
"rev": "48a0fb7aab511df92a17cf239c37f2bd2ec9ae3a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -931,11 +931,11 @@
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1684141492,
|
"lastModified": 1684488481,
|
||||||
"narHash": "sha256-j2fWY7kbOETSNDtlX7whkq2APe44PijzgaCTWV8oE/I=",
|
"narHash": "sha256-NLHSxDUxw/Epw8CRk2cDPt3Zaaw1Zvbgvr2axNGQHds=",
|
||||||
"owner": "pta2002",
|
"owner": "pta2002",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "3600698abad00756947eb3a3d837beedf1c2f551",
|
"rev": "1d478841f8bf84f3b69095984aa74c56abb86ffa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -946,11 +946,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1684397671,
|
"lastModified": 1684500955,
|
||||||
"narHash": "sha256-buTLC8raxk9o4qkoRYiwbOm+8+2CtZyNtEk7wMRm6Tw=",
|
"narHash": "sha256-EJUdpm4lkMn+/HUl3NSHutK+jDLdOHvGBWgz8RlT6Ck=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "c27cba4712f8eb426f8e2e7e2842cef89e672872",
|
"rev": "98294130adb4c09ac5f66e83bf98d80b7853f1d3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1015,11 +1015,11 @@
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1682596858,
|
"lastModified": 1684195081,
|
||||||
"narHash": "sha256-Hf9XVpqaGqe/4oDGr30W8HlsWvJXtMsEPHDqHZA6dDg=",
|
"narHash": "sha256-IKnQUSBhQTChFERxW2AzuauVpY1HRgeVzAjNMAA4B6I=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "pre-commit-hooks.nix",
|
"repo": "pre-commit-hooks.nix",
|
||||||
"rev": "fb58866e20af98779017134319b5663b8215d912",
|
"rev": "96eabec58248ed8f4b0ad59e7ce9398018684fdc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -84,7 +84,10 @@
|
||||||
mac = "00:50:56:91:0d:69";
|
mac = "00:50:56:91:0d:69";
|
||||||
nix = false;
|
nix = false;
|
||||||
};
|
};
|
||||||
# ip = "192.168.0.116";
|
"immich" = {
|
||||||
|
ip = "192.168.0.116";
|
||||||
|
mac = "06:8a:8e:3e:43:45";
|
||||||
|
};
|
||||||
"thelounge" = {
|
"thelounge" = {
|
||||||
ip = "192.168.0.117";
|
ip = "192.168.0.117";
|
||||||
mac = "00:0c:29:2a:69:8f";
|
mac = "00:0c:29:2a:69:8f";
|
||||||
|
|
68
nixos/hosts/hades/immich/configuration.nix
Normal file
68
nixos/hosts/hades/immich/configuration.nix
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
let
|
||||||
|
# https://github.com/immich-app/immich/releases
|
||||||
|
version = "1.55.1";
|
||||||
|
dataDir = "/var/lib/immich";
|
||||||
|
in {
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||||||
|
|
||||||
|
# Additional packages
|
||||||
|
environment.systemPackages = with pkgs; [ ];
|
||||||
|
|
||||||
|
# TODO: https://github.com/suderman/nixos/tree/main/modules/nixos/immich
|
||||||
|
|
||||||
|
fileSystems."/mnt/storage" = {
|
||||||
|
device = "storage:/mnt/storage";
|
||||||
|
fsType = "nfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Unused uid/gid snagged from this list:
|
||||||
|
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/misc/ids.nix
|
||||||
|
ids.uids.immich = 911;
|
||||||
|
ids.gids.immich = 911;
|
||||||
|
|
||||||
|
users.users.immich = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "photos";
|
||||||
|
description = "Immich daemon user";
|
||||||
|
home = dataDir;
|
||||||
|
uid = config.ids.uids.immich;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.immich = { gid = config.ids.gids.immich; };
|
||||||
|
|
||||||
|
# Postgres database configuration
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
package = pkgs.postgresql_15;
|
||||||
|
|
||||||
|
ensureUsers = [{
|
||||||
|
name = "immich";
|
||||||
|
ensurePermissions = { "DATABASE immich" = "ALL PRIVILEGES"; };
|
||||||
|
}];
|
||||||
|
ensureDatabases = [ "immich" ];
|
||||||
|
|
||||||
|
# Allow connections from any docker IP addresses
|
||||||
|
authentication = ''
|
||||||
|
host immich immich 172.16.0.0/12 md5
|
||||||
|
host all all 127.0.0.1/32 ident
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allow docker containers to connect
|
||||||
|
networking.firewall.allowedTCPPorts = [ config.services.postgresql.port ];
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
{ ... }: {
|
_: {
|
||||||
services.sonarr = {
|
services.sonarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dataDir = "/var/lib/sonarr";
|
dataDir = "/var/lib/sonarr";
|
||||||
|
|
Loading…
Reference in a new issue