diff options
| -rw-r--r-- | flake.lock | 18 | ||||
| -rw-r--r-- | flake.nix | 47 | ||||
| -rw-r--r-- | pkgs/static/gitignore/default.nix | 1 |
3 files changed, 42 insertions, 24 deletions
@@ -136,11 +136,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1693028636, - "narHash": "sha256-WOG42JO/yyvgYK3jQktDEy2qtZI7R+s3Lo4Y9gBr6XM=", + "lastModified": 1693060755, + "narHash": "sha256-KNsbfqewEziFJEpPR0qvVz4rx0x6QXxw1CcunRhlFdk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e61ea96d43505ba0d2c066134eb9d67cadfddce7", + "rev": "c66ccfa00c643751da2fd9290e096ceaa30493fc", "type": "github" }, "original": { @@ -202,11 +202,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1692808169, - "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", + "lastModified": 1693060755, + "narHash": "sha256-KNsbfqewEziFJEpPR0qvVz4rx0x6QXxw1CcunRhlFdk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9201b5ff357e781bf014d0330d18555695df7ba8", + "rev": "c66ccfa00c643751da2fd9290e096ceaa30493fc", "type": "github" }, "original": { @@ -216,11 +216,11 @@ }, "nur": { "locked": { - "lastModified": 1692895597, - "narHash": "sha256-DqrtJx1N69km/PqtBb0OVubu7ORtmvQJILSNlVwfMgU=", + "lastModified": 1693136796, + "narHash": "sha256-JXSewQ7qKBN4D8MMpnAarASnSAravfbETEwxDDi8on8=", "owner": "nix-community", "repo": "NUR", - "rev": "48fce8d1a2576b92d067e7ffd05d60c12ab6eaa0", + "rev": "33b4841fe111b93d6a67e0585f6d60b4621e0ae7", "type": "github" }, "original": { @@ -25,7 +25,18 @@ devenvModules.personal = import ./modules/devenv; nixosModules.personal = import ./modules/nixos; homeModules.personal = import ./modules/home-manager; - overlays.personal = self.overlays.default; + overlays.personal = _: super: let + my-packages = import ./pkgs super; + in { + inherit + (super.lib.recursiveUpdate super { + personal = my-packages; + lib.personal = my-packages.lib; + }) + personal + lib + ; + }; lib = import ./lib; @@ -53,28 +64,34 @@ pkgs, lib, ... - }: { + }: let + flatten = let + aux = path: attrs: + if lib.isAttrs attrs && ! lib.isDerivation attrs + then lib.foldlAttrs (prev: name: value: prev // aux (path ++ [name]) value) {} attrs + else + ( + if lib.isDerivation attrs + then {"${lib.concatStringsSep "_" path}" = attrs;} + else {} + ); + in + aux []; + in { _module.args.pkgs = import nixpkgs { inherit system; - overlays = [nur.overlay]; + overlays = [nur.overlay self.overlays.personal]; config = {}; }; - overlayAttrs = { - inherit - (lib.recursiveUpdate pkgs { - personal = config.packages; - lib.personal = config.packages.lib; - }) - personal - lib - ; - }; - packages = import ./pkgs pkgs; + packages = flatten pkgs.personal; devenv.shells.default = { imports = [self.devenvModules.personal]; - languages.nix.enable = true; + languages.nix = { + enable = true; + packaging.enable = true; + }; }; }; }; diff --git a/pkgs/static/gitignore/default.nix b/pkgs/static/gitignore/default.nix index 67dd28a..94b3702 100644 --- a/pkgs/static/gitignore/default.nix +++ b/pkgs/static/gitignore/default.nix @@ -22,6 +22,7 @@ stdenvNoCC.mkDerivation { do echo "### $(basename "$file" .gitignore)" >> $out cat "$file" >> $out + echo >> $out done substituteInPlace $out ${lib.concatStringsSep " " (builtins.map (line: "--replace ${lib.escapeShellArg "# ${line}"} ${lib.escapeShellArg line}") toUncomment)} ''; |
