From 8c726db73a631621da72d11d3a2d6e40bd621cfb Mon Sep 17 00:00:00 2001 From: Sin Ser'hao Date: Sun, 8 Feb 2026 22:33:05 +0100 Subject: [PATCH] test --- flake.lock | 154 +++++++++++++++++++++----- flake.nix | 37 +++++-- hosts/sin/jellyfin.nix | 13 +-- hosts/sin/mailserver.nix | 37 +++++++ hosts/thea/hardware-configuration.nix | 2 +- modules/gitea/thea/virtualisation.nix | 2 +- 6 files changed, 201 insertions(+), 44 deletions(-) create mode 100644 hosts/sin/mailserver.nix diff --git a/flake.lock b/flake.lock index 2160b4e..e0917c1 100644 --- a/flake.lock +++ b/flake.lock @@ -21,6 +21,22 @@ "type": "github" } }, + "blobs": { + "flake": false, + "locked": { + "lastModified": 1604995301, + "narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=", + "owner": "simple-nixos-mailserver", + "repo": "blobs", + "rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265", + "type": "gitlab" + }, + "original": { + "owner": "simple-nixos-mailserver", + "repo": "blobs", + "type": "gitlab" + } + }, "colmena": { "inputs": { "flake-compat": "flake-compat", @@ -49,11 +65,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1769470446, - "narHash": "sha256-nze0VZ70K2kbDxjE+BBZLD7juOmnZqNYdOhl9aUNGWg=", + "lastModified": 1769889994, + "narHash": "sha256-uEn3WcpPHe3sMJMgIJ0XW3f4/+TRzZpNgv4vu5/gjmA=", "owner": "9001", "repo": "copyparty", - "rev": "2f57228fd4e62f8cd8e12cb80a3531dc2d4d170a", + "rev": "9b436eb52e5cfe7a0a8e59dd9f1a37351f3a2abd", "type": "github" }, "original": { @@ -136,6 +152,22 @@ "type": "github" } }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1659877975, @@ -166,21 +198,51 @@ "type": "github" } }, - "flake-utils_3": { + "git-hooks": { "inputs": { - "systems": "systems_2" + "flake-compat": [ + "simple-mailserver", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "simple-mailserver", + "nixpkgs" + ] }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "lastModified": 1763988335, + "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "simple-mailserver", + "git-hooks", + "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" } }, @@ -229,15 +291,15 @@ "nix-minecraft": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_4", + "systems": "systems_2" }, "locked": { - "lastModified": 1769567010, - "narHash": "sha256-R4ESxjCluQQlSIPw4NaRYVvEtvsnKGRwmACcXU1at6g=", + "lastModified": 1770000653, + "narHash": "sha256-QO/twGynxjOSUDtxbqJLshc/Q5/wImLH5O6KV2p9eoE=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "1c9c95fea177a4f8430c34dc1f974394e72bca1f", + "rev": "6a2ddb643aaf7949caa6158e718c5efc3dda7dc1", "type": "github" }, "original": { @@ -295,11 +357,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1748929857, - "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", + "lastModified": 1769461804, + "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4", + "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", "type": "github" }, "original": { @@ -311,11 +373,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1769318308, - "narHash": "sha256-Mjx6p96Pkefks3+aA+72lu1xVehb6mv2yTUUqmSet6Q=", + "lastModified": 1770136044, + "narHash": "sha256-tlFqNG/uzz2++aAmn4v8J0vAkV3z7XngeIIB3rM3650=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1cd347bf3355fce6c64ab37d3967b4a2cb4b878c", + "rev": "e576e3c9cf9bad747afcddd9e34f51d18c855b4e", "type": "github" }, "original": { @@ -340,6 +402,22 @@ } }, "nixpkgs_7": { + "locked": { + "lastModified": 1764374374, + "narHash": "sha256-naS7hg/D1yLKSZoENx9gvsPLFiNEOTcqamJSu0OEvCA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6a49303095abc094ee77dc243a9e351b642e8e75", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { "locked": { "lastModified": 1736549401, "narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=", @@ -364,6 +442,7 @@ "nix-minecraft": "nix-minecraft", "nixpkgs": "nixpkgs_5", "shoblog-front": "shoblog-front", + "simple-mailserver": "simple-mailserver", "testing-grounds": "testing-grounds", "unstable": "unstable" } @@ -386,6 +465,27 @@ "type": "gitlab" } }, + "simple-mailserver": { + "inputs": { + "blobs": "blobs", + "flake-compat": "flake-compat_3", + "git-hooks": "git-hooks", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1766321686, + "narHash": "sha256-icOWbnD977HXhveirqA10zoqvErczVs3NKx8Bj+ikHY=", + "owner": "simple-nixos-mailserver", + "repo": "nixos-mailserver", + "rev": "7d433bf89882f61621f95082e90a4ab91eb0bdd3", + "type": "gitlab" + }, + "original": { + "owner": "simple-nixos-mailserver", + "repo": "nixos-mailserver", + "type": "gitlab" + } + }, "stable": { "locked": { "lastModified": 1750133334, @@ -434,7 +534,7 @@ }, "testing-grounds": { "inputs": { - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1755527993, @@ -452,11 +552,11 @@ }, "unstable": { "locked": { - "lastModified": 1769461804, - "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", + "lastModified": 1769789167, + "narHash": "sha256-kKB3bqYJU5nzYeIROI82Ef9VtTbu4uA3YydSk/Bioa8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", + "rev": "62c8382960464ceb98ea593cb8321a2cf8f9e3e5", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e9a3487..e3b92cc 100644 --- a/flake.nix +++ b/flake.nix @@ -10,17 +10,17 @@ # commons agenix.url = "github:ryantm/agenix"; - # zimablade inputs + # sin inputs disko.url = "github:nix-community/disko"; disko.inputs.nixpkgs.follows = "nixpkgs"; + copyparty.url = "github:9001/copyparty"; + simple-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; - # sin inputs + # thea inputs nix-minecraft.url = "github:Infinidoge/nix-minecraft"; testing-grounds.url = "gitlab:shobu13/testing-grounds"; shoblog-front.url = "gitlab:shobu13/shoblog"; - copyparty.url = "github:9001/copyparty"; - }; # Flake outputs @@ -61,7 +61,7 @@ ); in { - nixosConfigurations = { + nixosConfigurations = rec { sin = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -80,6 +80,24 @@ inherit inputs; }; }; + thea = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + + modules = [ + agenix.nixosModules.default + ./hosts/thea/configuration.nix + ./hosts/thea/hardware-configuration.nix + ] + ++ [ + # modules + ./modules/gitea/thea + ]; + + specialArgs = { + inherit inputs; + nodes = {inherit sin;}; + }; + }; }; colmenaHive = colmena.lib.makeHive { meta = { @@ -111,7 +129,9 @@ ./modules/gitea/${name} ]; - deployment.targetHost = "192.168.1.12"; + deployment.targetHost = "git.shobu.fr"; + + # deployment.targetHost = "192.168.1.12"; }; sin = @@ -133,7 +153,10 @@ ./modules/gitea/${name} ]; - deployment.targetHost = "192.168.1.14"; + deployment.targetHost = "git.shobu.fr"; + deployment.targetPort = 24658; + + # deployment.targetHost = "192.168.1.14"; deployment.allowLocalDeployment = true; }; }; diff --git a/hosts/sin/jellyfin.nix b/hosts/sin/jellyfin.nix index b300712..807d886 100644 --- a/hosts/sin/jellyfin.nix +++ b/hosts/sin/jellyfin.nix @@ -2,18 +2,15 @@ let unstable = import inputs.unstable { system = pkgs.system; }; in -{ - nixpkgs.config.packageOverrides = pkgs: { - vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; - }; +{systemd.services.jellyfin.environment.LIBVA_DRIVER_NAME = "iHD"; # or i965 for older GPUs + environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; hardware.graphics = { enable = true; extraPackages = with pkgs; [ + intel-ocl # Generic OpenCL support + + # For Broadwell and newer (ca. 2014+), use with LIBVA_DRIVER_NAME=iHD: intel-media-driver - intel-vaapi-driver - libva-vdpau-driver - intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in) - vpl-gpu-rt # QSV on 11th gen or newer ]; }; diff --git a/hosts/sin/mailserver.nix b/hosts/sin/mailserver.nix new file mode 100644 index 0000000..3157df7 --- /dev/null +++ b/hosts/sin/mailserver.nix @@ -0,0 +1,37 @@ +{ + inputs, + config, + lib, + ... +}: +let + inherit (lib) + mkDefault + ; +in +{ + imports = [ + inputs.simple-mailserver.default + ]; + + security.acme = { + acceptTerms = mkDefault true; + certs.${config.mailserver.fqdn} = { + }; + }; + + mailserver = { + enable = true; + stateVersion = 3; + fqdn = "mail.shobu.fr"; + domains = [ "shobu.fr" ]; + + x509.useACMEHost = config.mailserver.fqdn; + + loginAccounts = { + "auth@shobu.fr" = { + password = "$y$j9T$aLAZYUOUrc2jxcNYGy1qt/$B1ZdufZtzJJmnLYIYW11nk1BwIIy1Xkjxb7lx3ge/Z3"; + }; + }; + }; +} diff --git a/hosts/thea/hardware-configuration.nix b/hosts/thea/hardware-configuration.nix index 38f8201..2f12848 100644 --- a/hosts/thea/hardware-configuration.nix +++ b/hosts/thea/hardware-configuration.nix @@ -49,7 +49,7 @@ }; fileSystems."/boot" = { - device = "/dev/disk/by-uuid/D1B9-8019"; + device = "/dev/disk/by-uuid/2CF4-0109"; fsType = "vfat"; options = [ "fmask=0077" diff --git a/modules/gitea/thea/virtualisation.nix b/modules/gitea/thea/virtualisation.nix index 0b87b84..093435a 100644 --- a/modules/gitea/thea/virtualisation.nix +++ b/modules/gitea/thea/virtualisation.nix @@ -1,4 +1,4 @@ -{ nodes, pkgs, ... }: +{ nodes, pkgs, ... }: { systemd.sockets.podman.socketConfig.Symlinks = [ "/run/docker.sock"