From 26f031dea8c508467da51f6a0d94636fc1d02f44 Mon Sep 17 00:00:00 2001 From: Fern Garden Date: Wed, 9 Jul 2025 18:35:36 +0800 Subject: [PATCH 1/3] Rename package inputs. Allow dotnet 6. --- flake.lock | 51 ++++++++------------------------------------------- flake.nix | 27 ++++++++++++++++++--------- 2 files changed, 26 insertions(+), 52 deletions(-) diff --git a/flake.lock b/flake.lock index 929b18d..b3a2c29 100755 --- a/flake.lock +++ b/flake.lock @@ -15,7 +15,7 @@ "type": "github" } }, - "feishin0_17": { + "feishin-0_17_0": { "locked": { "lastModified": 1751534869, "narHash": "sha256-kUYk/jPyX5Lnhv7vUUfNVSHUDA8k28xi2H5bt6a1EHg=", @@ -68,7 +68,7 @@ "type": "github" } }, - "fluffychat2": { + "fluffychat-2_0_0": { "locked": { "lastModified": 1751127166, "narHash": "sha256-dX9VUpl3YM9XexkU+QGj1UfptYy/jIOeB3tSMtJSRgE=", @@ -162,11 +162,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1751582995, - "narHash": "sha256-u7ubvtxdTnFPpV27AHpgoKn7qHuE7sgWgza/1oj5nzA=", + "lastModified": 1751741127, + "narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7a732ed41ca0dd64b4b71b563ab9805a80a7d693", + "rev": "29e290002bfff26af1db6f64d070698019460302", "type": "github" }, "original": { @@ -192,22 +192,6 @@ "type": "github" } }, - "nixpkgs_4": { - "locked": { - "lastModified": 1751741127, - "narHash": "sha256-t75Shs76NgxjZSgvvZZ9qOmz5zuBE8buUaYD28BMTxg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "29e290002bfff26af1db6f64d070698019460302", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.05", - "repo": "nixpkgs", - "type": "github" - } - }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -236,14 +220,13 @@ }, "root": { "inputs": { - "feishin0_17": "feishin0_17", - "fluffychat2": "fluffychat2", + "feishin-0_17_0": "feishin-0_17_0", + "fluffychat-2_0_0": "fluffychat-2_0_0", "lanzaboote": "lanzaboote", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "secrets": "secrets", - "sops-nix": "sops-nix", - "webone": "webone" + "sops-nix": "sops-nix" } }, "rust-overlay": { @@ -301,24 +284,6 @@ "repo": "sops-nix", "type": "github" } - }, - "webone": { - "inputs": { - "nixpkgs": "nixpkgs_4" - }, - "locked": { - "lastModified": 1752031448, - "narHash": "sha256-5cWr89OO+rt0saYETbLOIsKG0XYQqlgZ33xUMeQ1a1M=", - "owner": "firewalkwithm3", - "repo": "webone", - "rev": "04cbb02463e52fd917944ee3f7174218d6fa42a5", - "type": "github" - }, - "original": { - "owner": "firewalkwithm3", - "repo": "webone", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 5f8283e..5df0fa9 100755 --- a/flake.nix +++ b/flake.nix @@ -13,9 +13,8 @@ }; # Packages. - fluffychat2.url = "github:NixOS/nixpkgs?ref=pull/419632/head"; # FluffyChat 2.0.0 - feishin0_17.url = "github:NixOS/nixpkgs?ref=pull/414929/head"; # Feishin 0.17.0 - webone.url = "github:firewalkwithm3/webone"; # WebOne HTTP proxy. + fluffychat-2_0_0.url = "github:NixOS/nixpkgs?ref=pull/419632/head"; # FluffyChat 2.0.0 + feishin-0_17_0.url = "github:NixOS/nixpkgs?ref=pull/414929/head"; # Feishin 0.17.0 }; outputs = @@ -25,9 +24,8 @@ lanzaboote, nixos-hardware, sops-nix, - fluffychat2, - feishin0_17, - webone, + fluffychat-2_0_0, + feishin-0_17_0, ... }: with nixpkgs.lib; @@ -43,6 +41,17 @@ nixosSystem rec { system = platform; + pkgs = import nixpkgs { + inherit system; + config = { + allowUnfree = true; + permittedInsecurePackages = [ + "dotnet-sdk-6.0.428" + "dotnet-runtime-6.0.36" + ]; + }; + }; + specialArgs = { inherit hostname @@ -52,9 +61,9 @@ ; # Inherit variables. userPackages = { - fluffychat = fluffychat2.legacyPackages.${system}.fluffychat; - feishin = feishin0_17.legacyPackages.${system}.feishin; - webone = webone.packages.${system}.default; + fluffychat = fluffychat-2_0_0.legacyPackages.${system}.fluffychat; + feishin = feishin-0_17_0.legacyPackages.${system}.feishin; + webone = pkgs.callPackage ./packages/webone { }; }; secrets = builtins.toString inputs.secrets; # Secrets directory. From 90fe03e7c8e5c01e273c29b37dbea1abdf60c1b9 Mon Sep 17 00:00:00 2001 From: Fern Garden Date: Wed, 9 Jul 2025 18:35:45 +0800 Subject: [PATCH 2/3] Add webone package --- packages/webone/default.nix | 29 ++++++++++++++ packages/webone/deps.nix | 77 +++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 packages/webone/default.nix create mode 100644 packages/webone/deps.nix diff --git a/packages/webone/default.nix b/packages/webone/default.nix new file mode 100644 index 0000000..fc35a19 --- /dev/null +++ b/packages/webone/default.nix @@ -0,0 +1,29 @@ +{ + fetchFromGitHub, + buildDotnetModule, + dotnetCorePackages, + ... +}: + +buildDotnetModule rec { + pname = "webone"; + version = "0.17.5"; + + src = fetchFromGitHub { + owner = "atauenis"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-Dybm0Yl3f6Q7bjDRZHn7hCIYBryS93PtzFLC2V+LzXg="; + }; + + projectFile = "WebOne.csproj"; + nugetDeps = ./deps.nix; + + dotnet-sdk = dotnetCorePackages.sdk_6_0; + dotnet-runtime = dotnetCorePackages.runtime_6_0; + + meta = { + homepage = "https://github.com/atauenis/webone"; + description = "HTTP 1.x proxy that makes old web browsers usable again in the Web 2.0 world."; + }; +} diff --git a/packages/webone/deps.nix b/packages/webone/deps.nix new file mode 100644 index 0000000..e63816d --- /dev/null +++ b/packages/webone/deps.nix @@ -0,0 +1,77 @@ +# This file was automatically generated by passthru.fetch-deps. +# Please dont edit it manually, your changes might get overwritten! +# TODO: This format file is obsolete, consider migrating to JSON. + +{ fetchNuGet }: +[ + (fetchNuGet { + pname = "Microsoft.NETCore.Platforms"; + version = "3.1.0"; + hash = "sha256-cnygditsEaU86bnYtIthNMymAHqaT/sf9Gjykhzqgb0="; + }) + (fetchNuGet { + pname = "Microsoft.Win32.Registry"; + version = "4.7.0"; + hash = "sha256-+jWCwRqU/J/jLdQKDFm93WfIDrDMXMJ984UevaQMoi8="; + }) + (fetchNuGet { + pname = "Microsoft.Win32.SystemEvents"; + version = "4.7.0"; + hash = "sha256-GHxnD1Plb32GJWVWSv0Y51Kgtlb+cdKgOYVBYZSgVF4="; + }) + (fetchNuGet { + pname = "Packaging.Targets"; + version = "0.1.232"; + hash = "sha256-boiMjc7oglq472AMH23qnzyLsDkGuCr9n0ijZoH9zYE="; + }) + (fetchNuGet { + pname = "System.Buffers"; + version = "4.5.1"; + hash = "sha256-wws90sfi9M7kuCPWkv1CEYMJtCqx9QB/kj0ymlsNaxI="; + }) + (fetchNuGet { + pname = "System.Configuration.ConfigurationManager"; + version = "4.7.0"; + hash = "sha256-rYjp/UmagI4ZULU1ocia/AiXxLNL8uhMV8LBF4QFW10="; + }) + (fetchNuGet { + pname = "System.Diagnostics.PerformanceCounter"; + version = "4.7.0"; + hash = "sha256-gcanKBgh7EWUJxfa7h9f/HkfTtGRp0BLg9fVDIhjANQ="; + }) + (fetchNuGet { + pname = "System.Drawing.Common"; + version = "4.7.0"; + hash = "sha256-D3qG+xAe78lZHvlco9gHK2TEAM370k09c6+SQi873Hk="; + }) + (fetchNuGet { + pname = "System.Security.AccessControl"; + version = "4.7.0"; + hash = "sha256-/9ZCPIHLdhzq7OW4UKqTsR0O93jjHd6BRG1SRwgHE1g="; + }) + (fetchNuGet { + pname = "System.Security.Cryptography.ProtectedData"; + version = "4.7.0"; + hash = "sha256-dZfs5q3Ij1W1eJCfYjxI2o+41aSiFpaAugpoECaCOug="; + }) + (fetchNuGet { + pname = "System.Security.Permissions"; + version = "4.7.0"; + hash = "sha256-BGgXMLUi5rxVmmChjIhcXUxisJjvlNToXlyaIbUxw40="; + }) + (fetchNuGet { + pname = "System.Security.Principal.Windows"; + version = "4.7.0"; + hash = "sha256-rWBM2U8Kq3rEdaa1MPZSYOOkbtMGgWyB8iPrpIqmpqg="; + }) + (fetchNuGet { + pname = "System.Text.Encoding.CodePages"; + version = "4.7.0"; + hash = "sha256-/wLj3mcmScFAD/9cxmKyQnfdbaF9Mr/lpCuEsMarygM="; + }) + (fetchNuGet { + pname = "System.Windows.Extensions"; + version = "4.7.0"; + hash = "sha256-yW+GvQranReaqPw5ZFv+mSjByQ5y1pRLl05JIEf3tYU="; + }) +] From faeb8963e78de51492ba13d573e8ef78324ef4c7 Mon Sep 17 00:00:00 2001 From: Fern Garden Date: Wed, 9 Jul 2025 18:35:54 +0800 Subject: [PATCH 3/3] Move unfree config to flake. --- suites/common.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/suites/common.nix b/suites/common.nix index f53627b..9ecb45d 100644 --- a/suites/common.nix +++ b/suites/common.nix @@ -16,9 +16,6 @@ with lib; "flakes" ]; - # Allow unfree packages. - nixpkgs.config.allowUnfree = true; - # Enable redistributable firmware. hardware.enableRedistributableFirmware = true;