Compare commits

...

3 commits

8 changed files with 23 additions and 62 deletions

View file

@ -53,7 +53,6 @@
}; };
}; };
my.server.mollysocket.enable = true;
my.server.blog.enable = true; my.server.blog.enable = true;
my.server.papermc.enable = true; my.server.papermc.enable = true;

View file

@ -24,6 +24,14 @@
group = "media"; group = "media";
}; };
# Sonarr didn't update their runtime for a while...
nixpkgs.config.permittedInsecurePackages = [
"aspnetcore-runtime-6.0.36"
"aspnetcore-runtime-wrapped-6.0.36"
"dotnet-sdk-wrapped-6.0.428"
"dotnet-sdk-6.0.428"
];
services.radarr = { services.radarr = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;

View file

@ -12,13 +12,13 @@
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud28; package = pkgs.nextcloud30;
datadir = "/srv/nextcloud"; datadir = "/srv/nextcloud";
https = true; https = true;
hostName = extraInfo.nextcloudURI; hostName = extraInfo.nextcloudURI;
extraAppsEnable = true; extraAppsEnable = true;
appstoreEnable = true; appstoreEnable = false;
extraApps = { extraApps = {
inherit (config.services.nextcloud.package.packages.apps) inherit (config.services.nextcloud.package.packages.apps)
calendar calendar

20
flake.lock generated
View file

@ -184,11 +184,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1732482255, "lastModified": 1733045511,
"narHash": "sha256-GUffLwzawz5WRVfWaWCg78n/HrBJrOG7QadFY6rtV8A=", "narHash": "sha256-n8AldXJRNVMm2UZ6yN0HwVxlARY2Cm/uhdOw76tQ0OI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a9953635d7f34e7358d5189751110f87e3ac17da", "rev": "4964f3c6fc17ae4578e762d3dc86b10fe890860e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -289,27 +289,27 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1731797254, "lastModified": 1732981179,
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=", "narHash": "sha256-F7thesZPvAMSwjRu0K8uFshTk3ZZSNAsXTIFvXBT+34=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59", "rev": "62c435d93bf046a5396f3016472e8f7c8e2aed65",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.05", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1732014248, "lastModified": 1732837521,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=", "narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367", "rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -4,7 +4,7 @@
# As we have machine using the unstable channel, and other machines using the stable one, # As we have machine using the unstable channel, and other machines using the stable one,
# we import both, and we will select for each machine which one to use. # we import both, and we will select for each machine which one to use.
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
# Home-manager isn't used for anything except my workstations, which all use the unstable channel. # Home-manager isn't used for anything except my workstations, which all use the unstable channel.

View file

@ -7,9 +7,6 @@
}: }:
let let
gpu = config.my.hardware.gpu; gpu = config.my.hardware.gpu;
hwAccelerationOptionPath = if (machineProps.nixpkgs == "unstable") then "graphics" else "opengl";
enable32BitOptionName =
if (machineProps.nixpkgs == "unstable") then "enable32Bit" else "driSupport32Bit";
anyWineUser = anyWineUser =
if machineProps.enableHomeManager then if machineProps.enableHomeManager then
(builtins.any (user: user.my.games.wine.enable) (builtins.attrValues config.home-manager.users)) (builtins.any (user: user.my.games.wine.enable) (builtins.attrValues config.home-manager.users))
@ -37,11 +34,10 @@ with lib;
boot.kernelParams = mkIf (gpu == "intel") [ "i915.enable_guc=2" ]; boot.kernelParams = mkIf (gpu == "intel") [ "i915.enable_guc=2" ];
services.xserver.videoDrivers = mkIf (gpu == "nvidia") [ "nvidia" ]; services.xserver.videoDrivers = mkIf (gpu == "nvidia") [ "nvidia" ];
# Small hack as this option path changes between 24.05 and unstable hardware.graphics = {
hardware.${hwAccelerationOptionPath} = {
enable = gpu != null; enable = gpu != null;
"${enable32BitOptionName}" = anyWineUser; enable32Bit = anyWineUser;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
(mkIf (gpu == "intel") intel-media-driver) (mkIf (gpu == "intel") intel-media-driver)

View file

@ -3,7 +3,6 @@
../common ../common
./network.nix ./network.nix
./nginx.nix ./nginx.nix
./mollysocket.nix
./blog.nix ./blog.nix
./minecraft.nix ./minecraft.nix
]; ];

View file

@ -1,41 +0,0 @@
{
lib,
config,
extraInfo,
...
}:
let
msConfig = config.services.mollysocket.settings;
in
with lib;
{
options.my.server.mollysocket.enable = mkOption {
type = types.bool;
default = false;
description = ''
Enable the mollysocket server, allowing UnifiedPush notifications for te Molly app.
'';
};
config = mkIf config.my.server.mollysocket.enable {
services.mollysocket = {
enable = true;
settings = {
allowed_uuids = [
extraInfo.signal.clientUuid
];
};
};
services.nginx.virtualHosts.${extraInfo.signal.notificationServerUri} = {
enableACME = true;
forceSSL = true;
locations."/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://${msConfig.host}:${builtins.toString msConfig.port}";
};
};
};
}