From f8a9914d3ce1feda7b31efb0af1d485a5d8166e4 Mon Sep 17 00:00:00 2001 From: Lucy Date: Thu, 25 Sep 2025 13:57:05 +0200 Subject: [PATCH] deadnix --- flake.lock | 37 +----------------------- flake.nix | 17 ++++++----- pkgs/by-name/is/isrg-root-x1/package.nix | 7 +++++ tools/treefmt.nix | 2 +- 4 files changed, 18 insertions(+), 45 deletions(-) create mode 100644 pkgs/by-name/is/isrg-root-x1/package.nix diff --git a/flake.lock b/flake.lock index bda2242..091e321 100644 --- a/flake.lock +++ b/flake.lock @@ -16,44 +16,9 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1754340878, - "narHash": "sha256-lgmUyVQL9tSnvvIvBp7x1euhkkCho7n3TMzgjdvgPoU=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "cab778239e705082fe97bb4990e0d24c50924c04", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "treefmt-nix": "treefmt-nix" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1758728421, - "narHash": "sha256-ySNJ008muQAds2JemiyrWYbwbG+V7S5wg3ZVKGHSFu8=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "5eda4ee8121f97b218f7cc73f5172098d458f1d1", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 52e5448..1936456 100644 --- a/flake.nix +++ b/flake.nix @@ -3,14 +3,11 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; - treefmt-nix.url = "github:numtide/treefmt-nix"; }; outputs = { - self, nixpkgs, - treefmt-nix, }: let systemList = [ @@ -30,28 +27,32 @@ ); # ISRG Root X1 Certificate package per system - isrgRootX1 = eachSystem (pkgs: system: pkgs.callPackage ./pkgs/by-name/is/isrg-root-x1 { }); + isrgRootX1 = eachSystem ( + pkgs: _system: pkgs.callPackage ./pkgs/by-name/is/isrg-root-x1/package.nix { } + ); in { + formatter = eachSystem (pkgs: _system: pkgs.nixfmt-rfc-style); + # Packages per system packages = eachSystem ( - pkgs: system: { + _pkgs: system: { isrg-root-x1 = isrgRootX1.${system}; } ); # NixOS Modules per system nixosModules = eachSystem ( - pkgs: system: + lib: pkgs: system: import ./nixos-modules/wifi.nix { - inherit pkgs; + inherit pkgs lib; isrgRootX1Cert = isrgRootX1.${system}; } ); # Dev Shells per system devShells = eachSystem ( - pkgs: system: { + pkgs: _system: { default = pkgs.mkShell { buildInputs = with pkgs; [ nixos-rebuild diff --git a/pkgs/by-name/is/isrg-root-x1/package.nix b/pkgs/by-name/is/isrg-root-x1/package.nix new file mode 100644 index 0000000..5082140 --- /dev/null +++ b/pkgs/by-name/is/isrg-root-x1/package.nix @@ -0,0 +1,7 @@ +{ fetchurl }: + +fetchurl { + name = "isrg-root-x1.pem"; + url = "https://letsencrypt.org/certs/isrgrootx1.pem"; + sha256 = "sha256-C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M="; +} diff --git a/tools/treefmt.nix b/tools/treefmt.nix index d5ea330..52b7dee 100644 --- a/tools/treefmt.nix +++ b/tools/treefmt.nix @@ -1,5 +1,5 @@ # treefmt.nix -{ pkgs, ... }: +{ ... }: { projectRootFile = "flake.nix"; }