From 27ebd92fa200ae0f9a5ba1e7250380f1f6955b04 Mon Sep 17 00:00:00 2001 From: Tristan Druyen Date: Thu, 5 Oct 2023 13:07:09 +0200 Subject: [PATCH] Add nix-ld & envfs - nix-ld enables running unpatched binaries, see https://github.com/Mic92/nix-ld#usage for details - envfs enables running standart #!/usr/bin/shebang scripts through nix magic --- configuration.nix | 2 + flake.lock | 94 +++++++++++++++++++++++++++++++++++++++-------- flake.nix | 14 ++++++- 3 files changed, 93 insertions(+), 17 deletions(-) diff --git a/configuration.nix b/configuration.nix index cc3b7e3..8281383 100644 --- a/configuration.nix +++ b/configuration.nix @@ -184,6 +184,8 @@ wget ]; + programs.nix-ld.dev.enable = true; + programs.command-not-found.enable = false; programs.nix-index-database.comma.enable = true; programs.dconf.enable = true; diff --git a/flake.lock b/flake.lock index 9ef004f..787232c 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1696266752, - "narHash": "sha256-wJnMDFM21+xXdsXSs6pXMElbv4YfqmQslcPApRuaYKs=", + "lastModified": 1696468923, + "narHash": "sha256-qSM7NKgf8LcZ5hjKHZ8ANFI8+LQivvAypbhJHBJmYFM=", "owner": "nix-community", "repo": "disko", - "rev": "646ee25c25fffee122a66282861f5f56ad3e0fd9", + "rev": "cde886a1c97ef2399b4f91409db045785020291f", "type": "github" }, "original": { @@ -29,11 +29,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1696410469, - "narHash": "sha256-N8gQTrqQVW+d3bUcWKkfKPKvctMH3SzkzkFtysruPc4=", + "lastModified": 1696501026, + "narHash": "sha256-hC+GuCi3HfuOoubS7gMPr2xHCBN33N07QfkFFEbhr8M=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "61ba9eca21db0a7e8a6471d11f3f6f74b79a70ba", + "rev": "5eba7d96a70b1aad7918b07a4f6563362a8255b7", "type": "github" }, "original": { @@ -42,6 +42,27 @@ "type": "github" } }, + "envfs": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1695079619, + "narHash": "sha256-GFBzUelGFyiJ+TpRsKU5Hl6UOpq/BEoDjS4Q07hABs8=", + "owner": "Mic92", + "repo": "envfs", + "rev": "41c183cea42976aa98b26fe5456308b20b75c645", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "envfs", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -74,6 +95,27 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "envfs", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1673362319, + "narHash": "sha256-Pjp45Vnj7S/b3BRpZEVfdu8sqqA6nvVjvYu59okhOyI=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "82c16f1682cf50c01cb0280b38a1eed202b3fe9f", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -170,6 +212,26 @@ "type": "github" } }, + "nix-ld": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1686849676, + "narHash": "sha256-+z9t7BLugZO1WhyYEq6FI38TMh2EwfgfAv3RDFSjwtc=", + "owner": "Mic92", + "repo": "nix-ld", + "rev": "3abd605e56b5b34ec630bb10ba85f98c93cc05b2", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-ld", + "type": "github" + } + }, "nix-wallpaper": { "inputs": { "flake-utils": "flake-utils_2", @@ -194,11 +256,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1696323343, - "narHash": "sha256-u7WLUrh5eb+6SBYwtkaGL2ryHpLcHzmLml+a+VqKJWE=", + "lastModified": 1696374741, + "narHash": "sha256-gt8B3G0ryizT9HSB4cCO8QoxdbsHnrQH+/BdKxOwqF0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3b79cc4bcd9c09b5aa68ea1957c25e437dc6bc58", + "rev": "8a4c17493e5c39769f79117937c79e1c88de6729", "type": "github" }, "original": { @@ -210,11 +272,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1696323343, - "narHash": "sha256-u7WLUrh5eb+6SBYwtkaGL2ryHpLcHzmLml+a+VqKJWE=", + "lastModified": 1696374741, + "narHash": "sha256-gt8B3G0ryizT9HSB4cCO8QoxdbsHnrQH+/BdKxOwqF0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3b79cc4bcd9c09b5aa68ea1957c25e437dc6bc58", + "rev": "8a4c17493e5c39769f79117937c79e1c88de6729", "type": "github" }, "original": { @@ -258,11 +320,11 @@ }, "nur": { "locked": { - "lastModified": 1696421792, - "narHash": "sha256-fhx7rQoL0rbupNRcNbTQSOxJ7sU6vpug+og2f9z1FDw=", + "lastModified": 1696499135, + "narHash": "sha256-/TcM0bZ+/FYJD5EEgdDC7JIYsf8TUp7GWryTcgBitrw=", "owner": "nix-community", "repo": "NUR", - "rev": "4ca4be389a0c04cf9b41a554f9d3b3cea7a5b68a", + "rev": "ef0505cd640f2db6565ad8231ab087cd17da7baa", "type": "github" }, "original": { @@ -326,8 +388,10 @@ "inputs": { "disko": "disko", "emacs-overlay": "emacs-overlay", + "envfs": "envfs", "home-manager": "home-manager", "nix-index-database": "nix-index-database", + "nix-ld": "nix-ld", "nix-wallpaper": "nix-wallpaper", "nixpkgs": "nixpkgs", "nur": "nur", diff --git a/flake.nix b/flake.nix index abbb6f1..12eeaa9 100644 --- a/flake.nix +++ b/flake.nix @@ -46,6 +46,14 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; + envfs = { + url = "github:Mic92/envfs"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nix-ld = { + url = "github:Mic92/nix-ld"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = inputs: let @@ -86,10 +94,12 @@ ./users.nix ./disko.nix inputs.disko.nixosModules.disko + inputs.envfs.nixosModules.envfs inputs.home-manager.nixosModules.home-manager - inputs.tuxedo-nixos.nixosModules.default - inputs.nur.nixosModules.nur inputs.nix-index-database.nixosModules.nix-index + inputs.nix-ld.nixosModules.nix-ld + inputs.nur.nixosModules.nur + inputs.tuxedo-nixos.nixosModules.default { _module.args.customPkgs = customPkgs; _module.args.inputs = inputs;