3 Commits

Author SHA1 Message Date
8c726db73a test
Some checks failed
/ perform flake analysis (push) Failing after 3h12m58s
2026-02-08 22:33:05 +01:00
b5aa64e74a trilium & authelia setup
Some checks failed
/ perform flake analysis (push) Has been cancelled
/ build hive configuration (push) Failing after 22m46s
2026-01-29 09:45:10 +01:00
d7c765b80e test
Some checks failed
/ perform flake analysis (push) Failing after 3h0m29s
2026-01-27 20:40:20 +01:00
11 changed files with 316 additions and 88 deletions

162
flake.lock generated
View File

@@ -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": 1768336726,
"narHash": "sha256-Os4qn0S0bv7MauXGz16ozyOYZuMrA2FJuXNjDnr5yps=",
"lastModified": 1769889994,
"narHash": "sha256-uEn3WcpPHe3sMJMgIJ0XW3f4/+TRzZpNgv4vu5/gjmA=",
"owner": "9001",
"repo": "copyparty",
"rev": "c46cd7f57a8ae3b121866485c91ec078c4dd970e",
"rev": "9b436eb52e5cfe7a0a8e59dd9f1a37351f3a2abd",
"type": "github"
},
"original": {
@@ -91,11 +107,11 @@
]
},
"locked": {
"lastModified": 1766150702,
"narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=",
"lastModified": 1769524058,
"narHash": "sha256-zygdD6X1PcVNR2PsyK4ptzrVEiAdbMqLos7utrMDEWE=",
"owner": "nix-community",
"repo": "disko",
"rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378",
"rev": "71a3fc97d80881e91710fe721f1158d3b96ae14d",
"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": 1767838769,
"narHash": "sha256-KCLU6SUU80tEBKIVZsBrSjRYX6kn1eVIYI3fEEqOp24=",
"lastModified": 1770000653,
"narHash": "sha256-QO/twGynxjOSUDtxbqJLshc/Q5/wImLH5O6KV2p9eoE=",
"owner": "Infinidoge",
"repo": "nix-minecraft",
"rev": "4da21f019f6443f513f16af7f220ba4db1cdfc04",
"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,16 +373,16 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"lastModified": 1770136044,
"narHash": "sha256-tlFqNG/uzz2++aAmn4v8J0vAkV3z7XngeIIB3rM3650=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"rev": "e576e3c9cf9bad747afcddd9e34f51d18c855b4e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
@@ -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": 1768127708,
"narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=",
"lastModified": 1769789167,
"narHash": "sha256-kKB3bqYJU5nzYeIROI82Ef9VtTbu4uA3YydSk/Bioa8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38",
"rev": "62c8382960464ceb98ea593cb8321a2cf8f9e3e5",
"type": "github"
},
"original": {

View File

@@ -3,24 +3,24 @@
# Flake inputs
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
colmena.url = "github:zhaofengli/colmena";
# 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;
};
};

View File

@@ -17,7 +17,7 @@
./secrets.nix
./coredns
./copyparty.nix
# ./trilium.nix
./trilium.nix
];
boot.initrd.kernelModules = [ "usb_storage" ];
@@ -44,6 +44,8 @@
3000 # gitea
config.services.trilium-server.port
53
];

View File

@@ -2,19 +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
vaapiVdpau
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
vpl-gpu-rt # QSV on 11th gen or newer
intel-media-sdk # QSV up to 11th gen
];
};
@@ -84,16 +80,25 @@ in
group = "starr";
settings = {
authentication.AuthenticationMethod = "external";
authentication.AuthenticationType = "enabled";
};
};
radarr = {
enable = true;
openFirewall = true;
group = "starr";
settings = {
authentication.AuthenticationMethod = "external";
authentication.AuthenticationType = "enabled";
};
};
prowlarr = {
enable = true;
openFirewall = true;
settings = {
authentication.AuthenticationMethod = "external";
authentication.AuthenticationType = "enabled";
};
};
bazarr = {
enable = true;
@@ -102,10 +107,18 @@ in
lidarr = {
enable = true;
openFirewall = true;
settings = {
authentication.AuthenticationMethod = "external";
authentication.AuthenticationType = "enabled";
};
};
whisparr = {
enable = true;
openFirewall = true;
settings = {
authentication.AuthenticationMethod = "external";
authentication.AuthenticationType = "enabled";
};
};
jellyseerr = {

37
hosts/sin/mailserver.nix Normal file
View File

@@ -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";
};
};
};
}

View File

@@ -1 +1,9 @@
{ ... }: { }
{ ... }:
{
services.trilium-server = {
enable = true;
port = 12783;
host = "0.0.0.0";
noAuthentication = true;
};
}

View File

@@ -49,6 +49,10 @@ in
access_control = {
default_policy = "deny";
rules = [
# {
# domain = "radarr.shobu.fr";
# policy = "bypass";
# }
{
domain = "*.shobu.fr";
policy = "one_factor";

View File

@@ -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"

View File

@@ -2,7 +2,7 @@
{
proxy = pkgs.writeText "proxy.conf" ''
## Headers
proxy_set_header Host $host;
# proxy_set_header Host $host;
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;

View File

@@ -1,4 +1,9 @@
{ inputs, pkgs, ... }:
{
inputs,
pkgs,
lib,
...
}:
let
# striped-front = inputs.striped-front;
@@ -18,64 +23,93 @@ in
recommendedProxySettings = true;
recommendedTlsSettings = true;
typesHashMaxSize = 512;
mapHashMaxSize = 512;
virtualHosts =
let
mkStarr = host: port: {
mkVHost = host: port: {
"${host}" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://${sin-address}:${port}";
};
};
};
mkStarr = host: port: {
"${host}" = {
enableACME = true;
forceSSL = true;
extraConfig = ''
include ${authelia-snippets.authelia-location};
'';
locations."/api" = {
proxyPass = "http://${sin-address}:${port}";
proxyWebsockets = true;
extraConfig = ''
proxy_ssl_server_name on;
'';
};
locations."/" = {
proxyPass = "http://${sin-address}:${port}";
proxyWebsockets = true;
extraConfig = ''
include ${authelia-snippets.proxy};
include ${authelia-snippets.authelia-authrequest};
proxy_ssl_server_name on;
proxy_read_timeout 4800s;
'';
};
};
};
withAuthelia =
vhost: location:
(builtins.mapAttrs (
name: value:
(lib.recursiveUpdate value {
extraConfig = (if value ? extraConfig then value.extraConfig else "") + ''
include ${authelia-snippets.authelia-location};
'';
locations."${location}".extraConfig =
(
if value.locations."${location}" ? extraConfig then
value.locations."${location}".extraConfig
else
""
)
+ ''
include ${authelia-snippets.proxy};
include ${authelia-snippets.authelia-authrequest};
'';
})
) vhost);
withWebsockets =
vhost: location:
(builtins.mapAttrs (
name: value:
(lib.recursiveUpdate value {
locations."${location}".proxyWebsockets = true;
})
) vhost);
in
(
mkStarr "jellyfin.shobu.fr" "8096"
# // mkStarr "radarr.shobu.fr" "7878"
(withWebsockets (mkVHost "jellyfin.shobu.fr" "8096") "/")
// mkStarr "radarr.shobu.fr" "7878"
// mkStarr "sonarr.shobu.fr" "8989"
// mkStarr "prowlarr.shobu.fr" "9696"
// mkStarr "bazarr.shobu.fr" "6767"
// mkStarr "lidarr.shobu.fr" "8686"
// mkStarr "whisparr.shobu.fr" "6969"
// mkStarr "jellyseerr.shobu.fr" "5055"
// mkStarr "transmission.shobu.fr" "9091"
// mkStarr "zimablade-admin.shobu.fr" "61208"
// mkVHost "jellyseerr.shobu.fr" "5055"
// mkVHost "transmission.shobu.fr" "9091"
// mkVHost "zimablade-admin.shobu.fr" "61208"
// (withWebsockets (withAuthelia (mkVHost "trilium.shobu.fr" "12783") "/") "/")
// {
"radarr.shobu.fr" = {
enableACME = true;
forceSSL = true;
extraConfig = ''
include ${authelia-snippets.authelia-location};
error_log /var/log/nginx/debug_radarr.log debug;
'';
locations."/" = {
proxyPass = "http://${sin-address}:7878";
proxyWebsockets = true;
extraConfig = ''
include ${authelia-snippets.proxy};
include ${authelia-snippets.authelia-authrequest};
proxy_ssl_server_name on;
'';
};
locations."/api" = {
proxyPass = "http://${sin-address}:7878";
proxyWebsockets = true;
extraConfig = ''
proxy_ssl_server_name on;
'';
};
};
"shobu.fr" = {
enableACME = true;
forceSSL = true;
@@ -137,9 +171,16 @@ in
enableACME = true;
forceSSL = true;
extraConfig = ''
# include ${authelia-snippets.authelia-location};
# error_log /var/log/nginx/debug_files.log debug;
'';
locations."/" = {
proxyPass = "http://${sin-address}:8086";
extraConfig = ''
# include ${authelia-snippets.proxy};
# include ${authelia-snippets.authelia-authrequest};
proxy_set_header X-Real-IP $remote_addr;
client_max_body_size 100M;
'';

View File

@@ -1,4 +1,4 @@
{ nodes, pkgs, ... }:
{ nodes, pkgs, ... }:
{
systemd.sockets.podman.socketConfig.Symlinks = [
"/run/docker.sock"