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.papermc.enable = true;

View file

@ -24,6 +24,14 @@
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 = {
enable = true;
openFirewall = true;

View file

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

20
flake.lock generated
View file

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

View file

@ -4,7 +4,7 @@
# 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.
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";
# Home-manager isn't used for anything except my workstations, which all use the unstable channel.

View file

@ -7,9 +7,6 @@
}:
let
gpu = config.my.hardware.gpu;
hwAccelerationOptionPath = if (machineProps.nixpkgs == "unstable") then "graphics" else "opengl";
enable32BitOptionName =
if (machineProps.nixpkgs == "unstable") then "enable32Bit" else "driSupport32Bit";
anyWineUser =
if machineProps.enableHomeManager then
(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" ];
services.xserver.videoDrivers = mkIf (gpu == "nvidia") [ "nvidia" ];
# Small hack as this option path changes between 24.05 and unstable
hardware.${hwAccelerationOptionPath} = {
hardware.graphics = {
enable = gpu != null;
"${enable32BitOptionName}" = anyWineUser;
enable32Bit = anyWineUser;
extraPackages = with pkgs; [
(mkIf (gpu == "intel") intel-media-driver)

View file

@ -3,7 +3,6 @@
../common
./network.nix
./nginx.nix
./mollysocket.nix
./blog.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}";
};
};
};
}