3 Commits
Author SHA1 Message Date
sin_serhao f5e3ef7c5b heuuu plein de trucs en vrais
/ perform flake analysis (push) Failing after 3h7m58s
/ build hive configuration (push) Failing after 12m57s
2026-06-22 11:53:37 +02:00
sin_serhao 8c726db73a test
/ perform flake analysis (push) Failing after 3h12m58s
2026-02-08 22:33:05 +01:00
sin_serhao b5aa64e74a trilium & authelia setup
/ perform flake analysis (push) Has been cancelled
/ build hive configuration (push) Failing after 22m46s
2026-01-29 09:45:10 +01:00
19 changed files with 692 additions and 183 deletions
Generated
+151 -35
View File
@@ -8,11 +8,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1762618334, "lastModified": 1770165109,
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=", "narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "fcdea223397448d35d9b31f798479227e80183f6", "rev": "b027ee29d959fda4b60b57566d64c98a202e0feb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -21,6 +21,22 @@
"type": "github" "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": { "colmena": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@@ -49,11 +65,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1768336726, "lastModified": 1779822991,
"narHash": "sha256-Os4qn0S0bv7MauXGz16ozyOYZuMrA2FJuXNjDnr5yps=", "narHash": "sha256-r6e4eHEyQJEDhT6gkW3B9+OgB0pZebw2+du4bvN3vww=",
"owner": "9001", "owner": "9001",
"repo": "copyparty", "repo": "copyparty",
"rev": "c46cd7f57a8ae3b121866485c91ec078c4dd970e", "rev": "6e75faa62349a59f4df328a4939ba8626d89ee1a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -91,11 +107,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1766150702, "lastModified": 1780290312,
"narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=", "narHash": "sha256-eTAlX0CwgB84Ts3GaBd944A3DRXVMzgA0EqroZBISUo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378", "rev": "115e5211780054d8a890b41f0b7734cafad54dfe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -136,6 +152,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1659877975,
@@ -166,21 +198,51 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": { "git-hooks": {
"inputs": { "inputs": {
"systems": "systems_2" "flake-compat": [
"simple-mailserver",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"simple-mailserver",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1778507602,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=",
"owner": "numtide", "owner": "cachix",
"repo": "flake-utils", "repo": "git-hooks.nix",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "cachix",
"repo": "flake-utils", "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" "type": "github"
} }
}, },
@@ -229,15 +291,15 @@
"nix-minecraft": { "nix-minecraft": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_3", "nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_4" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1767838769, "lastModified": 1780375694,
"narHash": "sha256-KCLU6SUU80tEBKIVZsBrSjRYX6kn1eVIYI3fEEqOp24=", "narHash": "sha256-TznzgYVONg28KiSFB2rVdf/eLVIMtEQOxKt13Kzyrp8=",
"owner": "Infinidoge", "owner": "Infinidoge",
"repo": "nix-minecraft", "repo": "nix-minecraft",
"rev": "4da21f019f6443f513f16af7f220ba4db1cdfc04", "rev": "e6f8bec35104ca5955efe73742da58d2823684f7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -262,6 +324,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-2505": {
"locked": {
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1750134718, "lastModified": 1750134718,
@@ -295,11 +373,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1748929857, "lastModified": 1769461804,
"narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4", "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -311,16 +389,16 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1767313136, "lastModified": 1780203844,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", "narHash": "sha256-K5sT4jTpGs15ADhviMKNBH38REpPf5Q6mM1+N6cArVE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", "rev": "b51242d7d43689db2f3be91bd05d5b24fbb469c4",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-25.05", "ref": "nixos-26.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -340,6 +418,22 @@
} }
}, },
"nixpkgs_7": { "nixpkgs_7": {
"locked": {
"lastModified": 1779630130,
"narHash": "sha256-RWn/gMXEy+p6yL5lKh51Z/w6RHC+5Px18Tarkuva99Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "68ac0b94b449482d8a90f3e3791d61a8ee186f07",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1736549401, "lastModified": 1736549401,
"narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=", "narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=",
@@ -363,7 +457,9 @@
"disko": "disko", "disko": "disko",
"nix-minecraft": "nix-minecraft", "nix-minecraft": "nix-minecraft",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-2505": "nixpkgs-2505",
"shoblog-front": "shoblog-front", "shoblog-front": "shoblog-front",
"simple-mailserver": "simple-mailserver",
"testing-grounds": "testing-grounds", "testing-grounds": "testing-grounds",
"unstable": "unstable" "unstable": "unstable"
} }
@@ -386,6 +482,27 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"simple-mailserver": {
"inputs": {
"blobs": "blobs",
"flake-compat": "flake-compat_3",
"git-hooks": "git-hooks",
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1780340963,
"narHash": "sha256-rQCWOQXN0/sQxwP7T2Y3hsC1KYxLQgul6l9LPbQdqi4=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "a61228e6918a9d673c3faf48ab23e92a55822012",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"type": "gitlab"
}
},
"stable": { "stable": {
"locked": { "locked": {
"lastModified": 1750133334, "lastModified": 1750133334,
@@ -434,7 +551,7 @@
}, },
"testing-grounds": { "testing-grounds": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1755527993, "lastModified": 1755527993,
@@ -452,16 +569,15 @@
}, },
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1768127708, "lastModified": 1780651739,
"narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", "narHash": "sha256-3VfA5BcsITQmorkCW/6ZF9usmLTkFTAfTj4QT7DG338=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", "rev": "e91830af5eb4b2394ddd405998dec32f0ef18a51",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
+34 -10
View File
@@ -3,24 +3,25 @@
# Flake inputs # Flake inputs
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-2505.url = "github:nixos/nixpkgs/nixos-25.05";
unstable.url = "github:NixOS/nixpkgs";
colmena.url = "github:zhaofengli/colmena"; colmena.url = "github:zhaofengli/colmena";
# commons # commons
agenix.url = "github:ryantm/agenix"; agenix.url = "github:ryantm/agenix";
# zimablade inputs # sin inputs
disko.url = "github:nix-community/disko"; disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs"; 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"; nix-minecraft.url = "github:Infinidoge/nix-minecraft";
testing-grounds.url = "gitlab:shobu13/testing-grounds"; testing-grounds.url = "gitlab:shobu13/testing-grounds";
shoblog-front.url = "gitlab:shobu13/shoblog"; shoblog-front.url = "gitlab:shobu13/shoblog";
copyparty.url = "github:9001/copyparty";
}; };
# Flake outputs # Flake outputs
@@ -61,7 +62,7 @@
); );
in in
{ {
nixosConfigurations = { nixosConfigurations = rec {
sin = nixpkgs.lib.nixosSystem { sin = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@@ -80,6 +81,24 @@
inherit inputs; 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 { colmenaHive = colmena.lib.makeHive {
meta = { meta = {
@@ -111,7 +130,9 @@
./modules/gitea/${name} ./modules/gitea/${name}
]; ];
deployment.targetHost = "192.168.1.12"; deployment.targetHost = "git.shobu.fr";
# deployment.targetHost = "192.168.1.12";
}; };
sin = sin =
@@ -133,7 +154,10 @@
./modules/gitea/${name} ./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; deployment.allowLocalDeployment = true;
}; };
}; };
@@ -152,7 +176,7 @@
env = { }; env = { };
# Add any shell logic you want executed any time the environment is activated # Add any shell logic you want executed any time the environment is activated
shellHook = ''''; shellHook = "";
}; };
} }
); );
+12
View File
@@ -0,0 +1,12 @@
{ inputs, pkgs, ... }:
let
unstable = import inputs.unstable { system = pkgs.stdenv.system; };
in
{
services.actual = {
package = unstable.actual-server;
enable = true;
openFirewall = true;
settings.port = 3001;
};
}
+4 -1
View File
@@ -17,7 +17,8 @@
./secrets.nix ./secrets.nix
./coredns ./coredns
./copyparty.nix ./copyparty.nix
# ./trilium.nix ./trilium.nix
./actual.nix
]; ];
boot.initrd.kernelModules = [ "usb_storage" ]; boot.initrd.kernelModules = [ "usb_storage" ];
@@ -44,6 +45,8 @@
3000 # gitea 3000 # gitea
config.services.trilium-server.port
53 53
]; ];
+38 -5
View File
@@ -15,8 +15,8 @@
settings = { settings = {
p = [ 8086 ]; p = [ 8086 ];
e2dsa = true; e2dsa = true; # files indexing
e2ts = true; e2ts = true; # multimedia indexing
z = true; z = true;
qr = true; qr = true;
xff-hdr = "X-Real-IP"; xff-hdr = "X-Real-IP";
@@ -25,6 +25,13 @@
http-only = true; http-only = true;
og = true; og = true;
shr = "/shares"; shr = "/shares";
ansi = true; # color in log messages
re-maxage = 60 * 60 * 12; # reindex every 12h
# idp-h-usr = "remote-user";
# idp-h-grp = "remote-group";
# idp-login = "https://auth.shobu.fr/?rd=https://files.shobu.fr";
# idp-logout = "https://auth.shobu.fr/";
}; };
accounts = { accounts = {
@@ -54,9 +61,9 @@
}; };
}; };
"/mediacenter" = { "/mediacenter" = {
path = "/mnt/mediacenter/media"; path = "/mnt/mediacenter/";
access = { access = {
rw = ["serhao"]; rw = [ "serhao" ];
}; };
flags = { flags = {
e2d = true; e2d = true;
@@ -65,12 +72,38 @@
"/data" = { "/data" = {
path = "/mnt/data"; path = "/mnt/data";
access = { access = {
rwd = ["serhao"]; rwd = [ "serhao" ];
}; };
flags = { flags = {
e2d = true; e2d = true;
}; };
}; };
"/dump" = {
path = "/mnt/data/dump";
access = {
rw = "*";
rwd = [ "serhao" ];
};
flags = {
lifetime = 86400;
df = "100g";
vmaxb = "10g";
};
};
"/dump/quick" = {
path = "/mnt/data/dump/quick";
access = {
rw = "*";
rwd = [ "serhao" ];
};
flags = {
e2ds = true;
pk = "gz,9";
lifetime = 300;
df = "100g";
vmaxb = "10g";
};
};
}; };
}; };
+6 -1
View File
@@ -4,6 +4,11 @@
enable = true; enable = true;
openFirewall = true; openFirewall = true;
# TODO Change secrets # TODO Change secrets
extraArgs = [ "--webserver" ]; extraArgs = [
"--webserver"
"--disable-webui"
"--disable-plugin"
"processcount"
];
}; };
} }
+163 -6
View File
@@ -12,7 +12,6 @@
headerStyle = "boxed"; headerStyle = "boxed";
providers = { providers = {
"finnhub" = "cuvq5e9r01qub8tv03g0cuvq5e9r01qub8tv03gg";
}; };
layout = [ layout = [
@@ -38,6 +37,20 @@
header = false; header = false;
}; };
} }
{
"admin" = {
tab = "Admin";
header = false;
sin = {
style = "row";
columns = 3;
};
thea = {
style = "row";
columns = 3;
};
};
}
]; ];
}; };
@@ -56,9 +69,7 @@
} }
{ {
glances = { glances = {
url = "https://zimablade-admin.shobu.fr"; url = "http://sin.home:61208";
user = "shobu";
password = "shobu";
version = 4; version = 4;
disk = [ disk = [
"/" "/"
@@ -154,7 +165,7 @@
widget = { widget = {
type = "jellyseerr"; type = "jellyseerr";
url = "https://jellyseerr.shobu.fr"; url = "https://jellyseerr.shobu.fr";
key = "MTczNzkyNzMxMzgwODk4N2FlZWJkLTQ0N2QtNGU0MS1iOWE1LTJmZmE3OTI4ZGQ5OQ=="; key = "MTc0OTMzOTE2MDMwODgxNzdlYjNlLTU4N2ItNDc0Mi1iZTY4LTM3NzVhMWZiMDUzZg==";
}; };
}; };
} }
@@ -227,7 +238,7 @@
href = "https://transmission.shobu.fr"; href = "https://transmission.shobu.fr";
widget = { widget = {
type = "transmission"; type = "transmission";
url = "https://transmission.shobu.fr"; url = "http://sin.home:9091";
}; };
}; };
} }
@@ -235,6 +246,152 @@
} }
]; ];
} }
{
"admin" = [
(
let
name = "sin";
address = "http://sin.home:61208";
in
{
"${name}" = [
{
"info" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "info";
};
};
}
{
"main storage" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "fs:/mnt/fs";
};
};
}
{
"system storage" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "fs:/";
};
};
}
{
"memory" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "memory";
};
};
}
{
"cpu" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "cpu";
};
};
}
{
"network" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "network:enp2s0";
};
};
}
];
}
)
(
let
name = "thea";
address = "http://thea.home:61208";
in
{
"${name}" = [
{
"info" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "info";
};
};
}
{
"main storage" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "fs:/mnt/fs";
};
};
}
{
"system storage" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "fs:/";
};
};
}
{
"memory" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "memory";
};
};
}
{
"cpu" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "cpu";
};
};
}
{
"network" = {
widget = {
type = "glances";
url = address;
version = 4;
metric = "network:enp2s0";
};
};
}
];
}
)
];
}
]; ];
}; };
} }
+62 -17
View File
@@ -1,26 +1,44 @@
{ pkgs, inputs, ... }: {
pkgs,
inputs,
...
}:
let let
unstable = import inputs.unstable { system = pkgs.system; }; nixpkgs-2505 = import inputs.nixpkgs-2505 {
system = pkgs.stdenv.system;
config.allowUnfree = true;
config.permittedInsecurePackages = [ "intel-media-sdk-23.2.2" ];
};
in in
{ {
nixpkgs.config.packageOverrides = pkgs: { systemd.services.jellyfin.environment = {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; LIBVA_DRIVER_NAME = "iHD"; # or i965 for older GPUs
NEOReadDebugKeys = "1";
OverrideGpuAddressSpace = "48";
};
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
NEOReadDebugKeys = "1";
OverrideGpuAddressSpace = "48";
}; };
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
intel-ocl # Generic OpenCL support
intel-compute-runtime-legacy1
intel-media-driver intel-media-driver
intel-vaapi-driver nixpkgs-2505.intel-media-sdk
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
]; ];
}; };
hardware.enableRedistributableFirmware = true;
boot.kernelParams = [ "i915.enable_guc=3" ];
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = [
"dotnet-sdk-6.0.428" # "dotnet-sdk-6.0.428"
"aspnetcore-runtime-6.0.36" # "aspnetcore-runtime-6.0.36"
"intel-media-sdk-23.2.2"
]; ];
users.users."starr" = { users.users."starr" = {
@@ -67,12 +85,27 @@ in
"radarr" "radarr"
"sonarr" "sonarr"
]; ];
users.users.jellyfin.extraGroups = [
"render"
"video"
];
users.groups = { users.groups = {
starr = { }; starr = {
gid = 990;
};
}; };
services = { services =
let
mkEnvFile =
name:
(pkgs.writeText "${name}.env" ''
${name}__AUTH__ENABLED=false
${name}__AUTH__METHOD=External
'');
in
{
jellyfin = { jellyfin = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
@@ -82,31 +115,43 @@ in
enable = true; enable = true;
openFirewall = true; openFirewall = true;
group = "starr"; group = "starr";
settings = { environmentFiles = [
authentication.AuthenticationMethod = "external"; (mkEnvFile "SONARR")
authentication.AuthenticationType = "enabled"; ];
};
}; };
radarr = { radarr = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
group = "starr"; group = "starr";
environmentFiles = [
(mkEnvFile "RADARR")
];
}; };
prowlarr = { prowlarr = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
environmentFiles = [
(mkEnvFile "PROWLARR")
];
}; };
bazarr = { bazarr = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
group = "starr";
}; };
lidarr = { lidarr = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
environmentFiles = [
(mkEnvFile "LIDARR")
];
}; };
whisparr = { whisparr = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;
environmentFiles = [
(mkEnvFile "WHISPARR")
];
}; };
jellyseerr = { jellyseerr = {
+1 -1
View File
@@ -86,7 +86,7 @@
]; ];
environment = { environment = {
PUID = toString config.users.users.transmission.uid; PUID = toString config.users.users.transmission.uid;
GUID = toString config.users.groups.transmission.gid; PGID = toString config.users.groups.starr.gid;
PEERPORT = peerport; PEERPORT = peerport;
}; };
}; };
+10 -1
View File
@@ -1 +1,10 @@
{ ... }: { } { ... }:
{
services.trilium-server = {
enable = true;
port = 12783;
host = "0.0.0.0";
# noAuthentication = true;
environmentFile = "/secrets/trilium.env";
};
}
+71 -2
View File
@@ -50,12 +50,12 @@ in
default_policy = "deny"; default_policy = "deny";
rules = [ rules = [
{ {
domain = "radarr.shobu.fr"; domain = "auth.shobu.fr";
policy = "bypass"; policy = "bypass";
} }
{ {
domain = "*.shobu.fr"; domain = "*.shobu.fr";
policy = "one_factor"; policy = "two_factor";
} }
]; ];
}; };
@@ -68,6 +68,75 @@ in
}; };
}; };
}; };
identity_providers = {
oidc = {
hmac_secret = "this_is_a_secret_abc123abc123abc"; # 64+ character secret
jwks = [
{
key = ''
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDBGxQpgV074AB1
ee+JiDMxuiVooVuD8RzVISTy0tVNBFS5vydB1g5k072shMdCE8S2M4oTaW7ZG1h0
A+XbgZj+wZFcdHA+lD6QRGSN03FlrRZBMv8BCKzctdgAW1Dtrho31+Nw+3jTrrbO
DiQaH2kzanET0GZJ+cD3AngWYV0KCkq8yws3T8AiK4oNghyv6Amknmbf7sJ+aZ8C
f8WCixiErT/TjEGKRxFTKw3LMrdrbljE8JP+f1sTpDZP6uOtH0YS0iJ4nWHvxKYH
LHLzrx3rO0zBrPiXK3eAtP2baPxS5y26kJcVL5bUSbDdB3NCznZc50OO14huX2s+
GVct0FsLAgMBAAECggEAAUoZTy91wXa5gn8EzQVWzj9YfJDv2Pn4/hjLmRNHFADQ
gmtXfhNJiHte7qqdjB1ag8TgOcHd8oyRFmcgCs3BaL68uwEdtq/hT4FXvF37EKW+
q/PyS38XNMWBIpfD+tmYGJHfzp2HsuPCz5tbSzG5qioZvMNHd4FtRXj6cGntjRAg
uW1Ns2h//BajftwD8RLHOvq7lWLaPWbdbte396KNBdNpceargISf9VEJik/dPWrT
jV5bNAm7chvEfjhLqFCJ/p6j7z4DLFGrhYnh50btfe9FnWRtUYAGxhfaobveDPVe
AI0lFN7IFU6+G6cYHTZAtAviWIutDwK0K9ACYCo1wQKBgQDiWEIdoYvjAh2J9K8f
8YWa660YuvLSYQmvimr7E9FzoFdiUeFqlVCw/SIz7mRuDDCliDFxheekc8+jJB5U
kfR2C2o3llRy+wLVap6X5OmqVAjFuHXxntbK/zwyv4K5uecwtEgDyGdXW2eZDog7
VohuWOD3cTDAkVFu/Mw/02/CqwKBgQDaZ/b1Rfu9QXLvgtf23PpqKb0VG6gOo/Sm
bpGnEBG9sAnsvDHBs85UTxzzr0qWOSguDh5NMxd0/IxKiLDRPvshhod9rWw0T8Qh
jBDYsDLBZlBT1AVKvkeELZx9DW1Iomx6bdtYRX3SkgBKVK43q17J3T37U/UJ36PQ
5e1lBbDJIQKBgQDcEcP222MPTLc7stOy0zl77zlVmi8NrZulOYfapuI28ecEiWgK
ITNbYkMnCtpKxT9nMowgPHmEw7VWgX+b6m0teNvFQDzLrpKKvieEt+UY3qvI0hia
3D0rEg6NqPaJbd8C08ZRJ0CTByQrBJ4gU3pDD9drvnoQQTpUFybfx8waEQKBgQDL
6a1FKuXyuRyaSktgjMiwPe/vuTabFLDigvEyTWqC880QXlUGSN4nEQYy7kJxJ0RA
W6Ym5cDM1M4W+LA9bNQDZRszV6ti2+Z+e8tuxHNe5iuxWI7oTedvnTYx+0tBOYSW
eeME8zyaUP48Z/uQtkt1pT6tXKG3ajoEW+fdHgcEgQKBgCCTnBkASe21/n+D3c02
vGekM3ioWNe9heIWv/7aWmMXb14DBCZMVXNyfOe7gQs2u3OX+IBW8UscGhY2LjVV
5dKLMIWHw8Afccw4isYhequmJeai2Q3SSenWc7lIqOG4FDpwkcjW0VBBaU/p7ZnA
h3JJ7q49hdgOKpF/xZNwmmfI
-----END PRIVATE KEY-----''; # rsa private key
}
];
claims_policies = {
trilium = {
id_token = [
"email"
"name"
];
};
};
clients = [
{
client_id = "trilium";
client_name = "Trilium Notes";
client_secret = "$pbkdf2-sha512$310000$c8p78n7pUMln0jzvd4aK4Q$JNRBzwAo0ek5qKn50cFzzvE9RXV88h1wJn5KGiHrD0YKtZaR/nCb2CJPOsKaPK0hjf.9yHxzQGZziziccp6Yng";
public = false;
authorization_policy = "two_factor";
claims_policy = "trilium";
require_pkce = false;
pkce_challenge_method = "";
redirect_uris = [ "https://trilium.shobu.fr/callback" ];
scopes = [
"openid"
"profile"
"email"
];
response_types = [ "code" ];
grant_types = [ "authorization_code" ];
access_token_signed_response_alg = "none";
userinfo_signed_response_alg = "none";
token_endpoint_auth_method = "client_secret_basic";
}
];
};
};
}; };
}; };
}; };
+14 -4
View File
@@ -17,10 +17,11 @@ in
imports = [ imports = [
./nginx.nix ./nginx.nix
# ./cybercoffee # ./cybercoffee
./ollama.nix # ./ollama.nix
./minecraft.nix # ./minecraft.nix
./secrets ./secrets
./authelia.nix ./authelia.nix
./glances.nix
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
@@ -39,6 +40,7 @@ in
firewall = { firewall = {
allowedTCPPorts = [ allowedTCPPorts = [
nodes.sin.config.services.gitea.settings.server.SSH_PORT nodes.sin.config.services.gitea.settings.server.SSH_PORT
993 # mail port
] ]
++ [ ++ [
# minecraft ad hoc server ports # minecraft ad hoc server ports
@@ -57,6 +59,16 @@ in
proto = "tcp"; proto = "tcp";
destination = "${sin-address}:22"; destination = "${sin-address}:22";
} }
{
sourcePort = 993;
proto = "tcp";
destination = "${sin-address}:993";
}
{
sourcePort = 8086;
proto = "tcp";
destination = "${sin-address}:8086";
}
]; ];
}; };
}; };
@@ -87,13 +99,11 @@ in
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lunarvim
wget wget
httpie httpie
tmux tmux
git git
helix helix
python312
# lemonade # lemonade
]; ];
+14
View File
@@ -0,0 +1,14 @@
{ ... }:
{
services.glances = {
enable = true;
openFirewall = true;
# TODO Change secrets
extraArgs = [
"--webserver"
"--disable-webui"
"--disable-plugin"
"processcount"
];
};
}
+1 -1
View File
@@ -49,7 +49,7 @@
}; };
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D1B9-8019"; device = "/dev/disk/by-uuid/2CF4-0109";
fsType = "vfat"; fsType = "vfat";
options = [ options = [
"fmask=0077" "fmask=0077"
+1 -1
View File
@@ -2,7 +2,7 @@
{ {
proxy = pkgs.writeText "proxy.conf" '' proxy = pkgs.writeText "proxy.conf" ''
## Headers ## 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-Original-URL $scheme://$http_host$request_uri;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Forwarded-Host $http_host;
+1 -5
View File
@@ -9,10 +9,6 @@ let
url = "file:///${inputs.testing-grounds.modpack}/pack.toml"; url = "file:///${inputs.testing-grounds.modpack}/pack.toml";
packHash = "sha256-+taYj4uroLNxM4Nia3n+5P1Y/g6dzE6Iq13TsZgk4mU="; packHash = "sha256-+taYj4uroLNxM4Nia3n+5P1Y/g6dzE6Iq13TsZgk4mU=";
}; };
gregpack = pkgs.fetchPackwizModpack {
url = "https://raw.githubusercontent.com/GregTechCEu/GregTech-Modern-Community-Pack/refs/heads/main/pack.toml";
packHash = "sha256-SE86gP15H/Aug6vTLmMxHuxF2/+iLmCI/wQlON1xasM=";
};
in in
{ {
imports = [ inputs.nix-minecraft.nixosModules.minecraft-servers ]; imports = [ inputs.nix-minecraft.nixosModules.minecraft-servers ];
@@ -24,7 +20,7 @@ in
openFirewall = true; openFirewall = true;
servers.testing-grounds = { servers.testing-grounds = {
enable = true; enable = false;
package = inputs.testing-grounds.packages.x86_64-linux.forge-server; package = inputs.testing-grounds.packages.x86_64-linux.forge-server;
+74 -52
View File
@@ -1,4 +1,10 @@
{ inputs, pkgs, ... }: {
inputs,
pkgs,
lib,
nodes,
...
}:
let let
# striped-front = inputs.striped-front; # striped-front = inputs.striped-front;
@@ -18,81 +24,94 @@ in
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
typesHashMaxSize = 512;
mapHashMaxSize = 512;
virtualHosts = virtualHosts =
let let
mkStarr = host: port: { mkVHost = host: port: {
"${host}" = { "${host}" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {
proxyPass = "http://${sin-address}:${toString port}";
};
};
};
mkStarr = host: port: {
"${host}" = {
enableACME = true;
forceSSL = true;
extraConfig = ''
include ${authelia-snippets.authelia-location};
'';
locations."/api" = {
proxyPass = "http://${sin-address}:${port}"; proxyPass = "http://${sin-address}:${port}";
proxyWebsockets = true; proxyWebsockets = true;
extraConfig = '' extraConfig = ''
proxy_ssl_server_name on; 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; 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 in
( (
mkStarr "jellyfin.shobu.fr" "8096" (withWebsockets (mkVHost "jellyfin.shobu.fr" "8096") "/")
# // mkStarr "radarr.shobu.fr" "7878" // mkStarr "radarr.shobu.fr" "7878"
// mkStarr "sonarr.shobu.fr" "8989" // mkStarr "sonarr.shobu.fr" "8989"
// mkStarr "prowlarr.shobu.fr" "9696" // mkStarr "prowlarr.shobu.fr" "9696"
// mkStarr "bazarr.shobu.fr" "6767" // mkStarr "bazarr.shobu.fr" "6767"
// mkStarr "lidarr.shobu.fr" "8686" // mkStarr "lidarr.shobu.fr" "8686"
// mkStarr "whisparr.shobu.fr" "6969" // mkStarr "whisparr.shobu.fr" "6969"
// mkStarr "jellyseerr.shobu.fr" "5055" // mkVHost "jellyseerr.shobu.fr" "5055"
// mkStarr "transmission.shobu.fr" "9091" // withAuthelia (mkVHost "transmission.shobu.fr" "9091") "/"
// mkStarr "zimablade-admin.shobu.fr" "61208" // withAuthelia (mkVHost "zimablade-admin.shobu.fr" "61208") "/"
// withAuthelia (mkVHost "actual.shobu.fr" nodes.sin.config.services.actual.settings.port) "/"
// (withWebsockets (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_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# From https://gist.github.com/R0GGER/916183fca41f02df1471a6f455e5869f
# HSTS (ngx_http_headers_module is required) (63072000 seconds = 2 years)
add_header Strict-Transport-Security "max-age=63072000; preload" always;
add_header Referrer-Policy strict-origin-when-cross-origin;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Frame-Options SAMEORIGIN;
add_header Content-Security-Policy upgrade-insecure-requests;
add_header Permissions-Policy interest-cohort=();
add_header Expect-CT 'enforce; max-age=604800';
more_set_headers 'Server: Proxy';
more_clear_headers 'X-Powered-By';
proxy_ssl_server_name on;
'';
};
locations."/api" = {
proxyPass = "http://${sin-address}:7878";
proxyWebsockets = true;
extraConfig = ''
proxy_ssl_server_name on;
'';
};
};
"shobu.fr" = { "shobu.fr" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
@@ -148,6 +167,9 @@ in
locations."/" = { locations."/" = {
proxyPass = "http://${sin-address}:3000"; proxyPass = "http://${sin-address}:3000";
extraConfig = ''
client_max_body_size 100M;
'';
}; };
}; };
"files.shobu.fr" = { "files.shobu.fr" = {
-6
View File
@@ -1,12 +1,9 @@
{ {
nodes, nodes,
inputs,
pkgs,
... ...
}: }:
let let
sin-address = "192.168.1.14"; sin-address = "192.168.1.14";
unstable = import inputs.unstable { system = pkgs.system; };
in in
{ {
imports = [ imports = [
@@ -19,9 +16,6 @@ in
destination = "${sin-address}:22"; destination = "${sin-address}:22";
} }
]; ];
services.gitea-actions-runner.package = unstable.gitea-actions-runner;
# services.gitea-actions-runner.instances = { # services.gitea-actions-runner.instances = {
# "gitea.shobu.fr-runner" = { # "gitea.shobu.fr-runner" = {
# enable = true; # enable = true;