summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--flake.lock16
-rw-r--r--flake.nix16
2 files changed, 25 insertions, 7 deletions
diff --git a/flake.lock b/flake.lock
index 849d8ed..057f084 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,20 @@
 {
   "nodes": {
+    "flake-utils": {
+      "locked": {
+        "lastModified": 1610051610,
+        "narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
     "nixpkgs": {
       "locked": {
         "lastModified": 1611078587,
@@ -31,6 +46,7 @@
     },
     "root": {
       "inputs": {
+        "flake-utils": "flake-utils",
         "nixpkgs": "nixpkgs",
         "nur": "nur"
       }
diff --git a/flake.nix b/flake.nix
index 59380ba..b759c81 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,12 +1,12 @@
 {
   description = "19 PDH Puszcza low-tech site";
   inputs.nur.url = github:nix-community/NUR;
+  inputs.flake-utils.url = "github:numtide/flake-utils";
 
-  outputs = { self, nixpkgs, nur }:
+  outputs = { self, nixpkgs, nur, flake-utils }:
+  flake-utils.lib.eachDefaultSystem (system:
   let
-    system = "x86_64-linux";
     pkgs = import nixpkgs { inherit system; overlays = [ nur.overlay ]; };
-
     kronika = let
       kronika_json = pkgs.lib.importJSON ./kronika.json;
     in pkgs.fetchFromGitHub {
@@ -16,10 +16,8 @@
       sha256 = kronika_json.sha256;
     };
 
-  in {
-    defaultPackage.${system} = self.packages.${system}.low-puszcza;
 
-    packages.${system}.low-puszcza = pkgs.stdenv.mkDerivation {
+    low-puszcza = pkgs.stdenv.mkDerivation {
       name = "low-puszcza";
       src = self;
       nativeBuildInputs = [
@@ -50,5 +48,9 @@
       '';
     };
 
-  };
+
+  in {
+    defaultPackage = low-puszcza;
+    packages.low-puszcza = low-puszcza;
+  });
 }