diff options
author | Karel Kočí <cynerd@email.cz> | 2021-12-30 23:18:59 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-01-02 15:28:44 +0100 |
commit | 794ed83a6c840703798b80503643025327e5c24d (patch) | |
tree | 5a374ac1f426995caa6d771943943fe5f27be6a0 | |
parent | e3e7eed22cf5f2db558477a0dfdd90e81e038122 (diff) | |
download | nixturris-794ed83a6c840703798b80503643025327e5c24d.tar.gz nixturris-794ed83a6c840703798b80503643025327e5c24d.tar.bz2 nixturris-794ed83a6c840703798b80503643025327e5c24d.zip |
Convert to use flake.nix
The flakes are the future as it seems and thus it makes more sense to
use that.
-rw-r--r-- | default.nix | 1 | ||||
-rw-r--r-- | flake.lock | 41 | ||||
-rw-r--r-- | flake.nix | 13 | ||||
-rw-r--r-- | pkgs/default.nix | 4 |
4 files changed, 56 insertions, 3 deletions
diff --git a/default.nix b/default.nix deleted file mode 100644 index 26470b5..0000000 --- a/default.nix +++ /dev/null @@ -1 +0,0 @@ -import ./pkgs diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..4777cb3 --- /dev/null +++ b/flake.lock @@ -0,0 +1,41 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1641076644, + "narHash": "sha256-4x90qQM4wOfPAzdMnN1BnzVp7eO6wle+F5NmVkJ48qM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0fd74961da9fe2640ad2fbd960c3af08246e6749", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..30f1a38 --- /dev/null +++ b/flake.nix @@ -0,0 +1,13 @@ +{ + description = "Turris flake"; + + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachSystem flake-utils.lib.allSystems (system: rec { + packages = import ./pkgs { + nixlib = nixpkgs.lib; + nixpkgs = nixpkgs.legacyPackages.${system}; + }; + }); +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 576da5b..ea787f4 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,8 +1,8 @@ -{ nixpkgs ? import <nixpkgs> {}}: +{ nixlib, nixpkgs }: let pkgs = nixpkgs // turrispkgs; - callPackage = pkgs.lib.callPackageWith pkgs; + callPackage = nixlib.callPackageWith pkgs; turrispkgs = with pkgs; { bootstrapHook = callPackage ( |