From 6abd43ffbbbca29216a2935e20300be9263bb7f1 Mon Sep 17 00:00:00 2001 From: Jurn Wubben Date: Thu, 17 Apr 2025 17:59:44 +0000 Subject: [PATCH] Updated graphics to support intel and nvidia (laptop gpu without prime) Added immich Updated cfile and smaller changes Updated transfer-sh password --- flake.lock | 275 +++++++++++++++++++++++++++-- flake.nix | 5 + hosts/lapserv/default.nix | 14 +- secrets/transfer-sh.age | Bin 582 -> 582 bytes system/hardware/commonGraphics.nix | 16 -- system/hardware/default.nix | 2 +- system/hardware/graphics.nix | 59 +++++++ system/server/default.nix | 2 +- system/server/immich.nix | 57 ++++++ system/server/seafile.nix | 35 ++-- 10 files changed, 419 insertions(+), 46 deletions(-) delete mode 100644 system/hardware/commonGraphics.nix create mode 100644 system/hardware/graphics.nix create mode 100644 system/server/immich.nix diff --git a/flake.lock b/flake.lock index d69fba0..d97f924 100644 --- a/flake.lock +++ b/flake.lock @@ -157,6 +157,38 @@ } }, "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { "locked": { "lastModified": 1733328505, "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", @@ -193,6 +225,24 @@ "inputs": { "nixpkgs-lib": "nixpkgs-lib_2" }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" + }, "locked": { "lastModified": 1738453229, "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", @@ -207,7 +257,7 @@ "type": "github" } }, - "flake-parts_3": { + "flake-parts_4": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -249,7 +299,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_5" + "systems": "systems_4" }, "locked": { "lastModified": 1731533236, @@ -266,6 +316,24 @@ } }, "flake-utils_3": { + "inputs": { + "systems": "systems_6" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { "inputs": { "systems": [ "stylix", @@ -308,7 +376,7 @@ "stylix", "flake-compat" ], - "gitignore": "gitignore", + "gitignore": "gitignore_2", "nixpkgs": [ "stylix", "nixpkgs" @@ -329,6 +397,28 @@ } }, "gitignore": { + "inputs": { + "nixpkgs": [ + "nur-xddxdd", + "pre-commit-hooks-nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_2": { "inputs": { "nixpkgs": [ "stylix", @@ -489,6 +579,27 @@ "type": "github" } }, + "nix-index-database": { + "inputs": { + "nixpkgs": [ + "nur-xddxdd", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744518957, + "narHash": "sha256-RLBSWQfTL0v+7uyskC5kP6slLK1jvIuhaAh8QvB75m4=", + "owner": "nix-community", + "repo": "nix-index-database", + "rev": "4fc9ea78c962904f4ea11046f3db37c62e8a02fd", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-index-database", + "type": "github" + } + }, "nixcord": { "inputs": { "flake-compat": "flake-compat", @@ -526,6 +637,22 @@ "type": "github" } }, + "nixpkgs-24_05": { + "locked": { + "lastModified": 1735563628, + "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-lib": { "locked": { "lastModified": 1740877520, @@ -542,6 +669,21 @@ } }, "nixpkgs-lib_2": { + "locked": { + "lastModified": 1743296961, + "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-lib_3": { "locked": { "lastModified": 1738452942, "narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=", @@ -680,12 +822,12 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_3", + "flake-parts": "flake-parts_4", "nixpkgs": [ "stylix", "nixpkgs" ], - "treefmt-nix": "treefmt-nix_2" + "treefmt-nix": "treefmt-nix_3" }, "locked": { "lastModified": 1740408283, @@ -701,17 +843,43 @@ "type": "github" } }, - "nvf": { + "nur-xddxdd": { "inputs": { "flake-parts": "flake-parts_2", - "flake-utils": "flake-utils", + "nix-index-database": "nix-index-database", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-24_05": "nixpkgs-24_05", + "nvfetcher": "nvfetcher", + "pre-commit-hooks-nix": "pre-commit-hooks-nix", + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1744798043, + "narHash": "sha256-Z4bd90BOo7b6uD6mJ/dbwqVg8RkXPQVDgA9ujT+mzMA=", + "owner": "xddxdd", + "repo": "nur-packages", + "rev": "c536bd168abfac67e027fe51707ddb502e218ed6", + "type": "github" + }, + "original": { + "owner": "xddxdd", + "repo": "nur-packages", + "type": "github" + } + }, + "nvf": { + "inputs": { + "flake-parts": "flake-parts_3", + "flake-utils": "flake-utils_2", "mnw": "mnw", "nil": "nil", "nixpkgs": [ "nixpkgs" ], "nmd": "nmd", - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1741477095, @@ -727,6 +895,52 @@ "type": "github" } }, + "nvfetcher": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils", + "nixpkgs": [ + "nur-xddxdd", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1732501185, + "narHash": "sha256-Z0BpHelaGQsE5VD9hBsBHsvMU9h+Xt0kfkDJyFivZOU=", + "owner": "berberman", + "repo": "nvfetcher", + "rev": "bdb14eab6fe9cefc29efe01e60c3a3f616d6b62a", + "type": "github" + }, + "original": { + "owner": "berberman", + "repo": "nvfetcher", + "type": "github" + } + }, + "pre-commit-hooks-nix": { + "inputs": { + "flake-compat": "flake-compat_3", + "gitignore": "gitignore", + "nixpkgs": [ + "nur-xddxdd", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1742649964, + "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "agenix": "agenix", @@ -736,6 +950,7 @@ "nixcord": "nixcord", "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable", + "nur-xddxdd": "nur-xddxdd", "nvf": "nvf", "somcli": "somcli", "stylix": "stylix" @@ -765,7 +980,7 @@ }, "somcli": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "naersk": "naersk", "nixpkgs": "nixpkgs_6" }, @@ -790,14 +1005,14 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_3", + "flake-compat": "flake-compat_4", + "flake-utils": "flake-utils_4", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", "nixpkgs": "nixpkgs_7", "nur": "nur", - "systems": "systems_6", + "systems": "systems_7", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -907,6 +1122,21 @@ "type": "github" } }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -1008,6 +1238,27 @@ } }, "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "nur-xddxdd", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744707583, + "narHash": "sha256-IPFcShGro/UUp8BmwMBkq+6KscPlWQevZi9qqIwVUWg=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "49d05555ccdd2592300099d6a657cc33571f4fe0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_3": { "inputs": { "nixpkgs": [ "stylix", diff --git a/flake.nix b/flake.nix index d860cfc..5075e4d 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,10 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; # build error unrelated to config. nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11-small"; # build error unrelated to config. flake-parts.url = "github:hercules-ci/flake-parts"; + nur-xddxdd = { # FIXME: Used by flaresolverr as the nixpkgs version is broken. + url = "github:xddxdd/nur-packages"; + inputs.nixpkgs.follows = "nixpkgs"; + }; hm = { url = "github:nix-community/home-manager/master"; @@ -53,5 +57,6 @@ }; agenix.url = "github:ryantm/agenix"; + }; } diff --git a/hosts/lapserv/default.nix b/hosts/lapserv/default.nix index 3a5013f..69b99ee 100644 --- a/hosts/lapserv/default.nix +++ b/hosts/lapserv/default.nix @@ -3,7 +3,19 @@ ./hardware-configuration.nix ]; - niksos.server = true; + niksos = { + server = true; + graphics.nvidia = true; + graphics.intel = true; + }; + + services.immich = { + # settings.ffmepg.accel = "nvenc"; + settings.ffmpeg.preferredHwDevice = "/dev/dri/renderD128"; + accelerationDevices = [ + "/dev/dri/renderD128" + ]; + }; systemd.sleep.extraConfig = '' AllowSuspend=no diff --git a/secrets/transfer-sh.age b/secrets/transfer-sh.age index 6674fcd9d4c2fac631858f1c73c5f880df575a71..35c4361655881c81fa4229f5fccb04de1cb2abc4 100644 GIT binary patch delta 510 zcmX@ca*SnyPQ7KWX=zf5xvR0Mg!bAb7@In zaz;>?hgX#amw$eqagLi;NoAFBcxt4JzrLeqMr5f$fV;7&p=DX6S6)zQsc)21P^Cxc z#E;_P=>~=FQHJih=7G*;PKg&1A)#(Xu9-O=rd0-9e%jel zSs~fUK}9L%;l?Ss?tX5CVWp0VegXPsX8B2$5s{VwQ6|2rmHE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