diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/flake.nix b/flake.nix index 030fbe2..cad6ed4 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,6 @@ { inputs = { nixpkgs.url = "git+ssh://git@github.com/nixos/nixpkgs.git?shallow=1&ref=nixos-24.11"; - nixpkgs2.url = "git+ssh://git@github.com/nixos/nixpkgs.git?shallow=1&ref=nixos-24.11"; nixpkgs-unstable.url = "git+https://github.com/nixos/nixpkgs?ref=nixpkgs-unstable"; # nix darwin version must match nixpkgs version: @@ -37,7 +36,6 @@ { self, nixpkgs, # packages - nixpkgs2, # packages2 nixpkgs-unstable, # unstable branch darwin, # darwin related stuff deploy-rs, # deploy the hosts @@ -58,22 +56,17 @@ # flake.nix/output/packages (if there are any) and returning an attribute set # of their packages (if the template has one or more) template-packages = - templ: - (builtins.mapAttrs ( - name: value: - (((import ./nix/templates/${name}/flake.nix).outputs) { - inherit flake-utils; - - # need to provide nixpkgs WITHOUT the overlay for the packages defined in the template applied - nixpkgs = nixpkgs; - }).packages or { } - ) templ); + builtins.mapAttrs (name: value: + (((import ./nix/templates/${name}/flake.nix).outputs) + { inherit nixpkgs flake-utils; }) + .packages or { } + ); # apply the above function to the templates templates = template-packages self.templates; # Merge template packages into root packages with template prefix - mergedTemplatePackages = + merged-template-packages = system: let lib = nixpkgs.lib; @@ -257,7 +250,7 @@ in # take all the packages exposed from templates and add them to # the packages exposed by this flake - mergedTemplatePackages system + merged-template-packages system // { inherit (pkgs) vokobe r2wars-web remarvin; } @@ -276,14 +269,11 @@ description = "A basic ctf env with pwn, rev, ... tools"; path = ./nix/templates/ctf; welcomeText = '' - # A basic CTF env - ## Intended usage - The intended usage of this flake is... - - ## More info - - [Rust language](https://www.rust-lang.org/) - - [Rust on the NixOS Wiki](https://nixos.wiki/wiki/Rust) - - ... + # CTF flake template + + Run `nix develop` to get a shell with pwntools, pwndbg, pycryptodome, ... + + Add packages in the flake as you like. ''; }; goapp = { |