diff --git a/flake.lock b/flake.lock index eb94ec5..a9c157e 100644 --- a/flake.lock +++ b/flake.lock @@ -87,6 +87,28 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nixos-cosmic", + "nix-update", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-root": { "locked": { "lastModified": 1713493429, @@ -216,11 +238,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1724110726, - "narHash": "sha256-d4vqblq6e5LOowA6OBro3w0sLsT7HOUYBwV6Wa6zLS8=", + "lastModified": 1724614030, + "narHash": "sha256-B6zj13s17m+LeXW8MrN2wRH3gQuVuA6+3PaDdhenPW0=", "owner": "helix-editor", "repo": "helix", - "rev": "9e7c488ee33eaabab6ee7c3436f4c58b8c647b4f", + "rev": "af7a1fd20c0a2915e0dae1b5bea7cb6bde6c2746", "type": "github" }, "original": { @@ -236,11 +258,11 @@ ] }, "locked": { - "lastModified": 1723954948, - "narHash": "sha256-TViNzTQdc1BfUftqKTPePwDL0NqliTcX5GyDHM5IHQQ=", + "lastModified": 1724571060, + "narHash": "sha256-2imeYQr9eHrump44kCGdACJXCdjpHgaK9wSsHSl32FQ=", "owner": "n-hass", "repo": "home-manager", - "rev": "774b50e0b28c9654cfbcb78584ec4819629f6541", + "rev": "87d0708ccc4e4281b8e70b6144cb579228e21154", "type": "github" }, "original": { @@ -269,11 +291,11 @@ "lix": { "flake": false, "locked": { - "lastModified": 1724058824, - "narHash": "sha256-WkRs8plqBYxIgrcz1jenmxbcLVVpo9Z9Waot9qIlqmI=", - "rev": "e727dbc3a3d59d7742a24a2b394b63a04ecb4d24", + "lastModified": 1724816427, + "narHash": "sha256-j/ma58x680RD8k9YGDGgj6qx/3b2qaZOBdyr0My7ik0=", + "rev": "5d31e889d7f3310cb030e85adcfd3ce64846457d", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/e727dbc3a3d59d7742a24a2b394b63a04ecb4d24.tar.gz?rev=e727dbc3a3d59d7742a24a2b394b63a04ecb4d24" + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/5d31e889d7f3310cb030e85adcfd3ce64846457d.tar.gz?rev=5d31e889d7f3310cb030e85adcfd3ce64846457d" }, "original": { "type": "tarball", @@ -336,7 +358,7 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-BfajAWMhjTIrm1OsgFAIfsjGrAlZNiSZNFdNn/Nqk54=", + "narHash": "sha256-1ywc+oiC1ChEcMdWTDvJ+xIwvvdXII/ItbrxiCAIRek=", "path": "flakes/meat", "type": "path" }, @@ -347,14 +369,14 @@ }, "nh": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1723994268, - "narHash": "sha256-3nHuGGBTqUxy1g7sm+1zTNLxbz9fnMr1ZX9etCWlFG8=", + "lastModified": 1724689275, + "narHash": "sha256-wpxC7XiZ9maYZA4BSLKGXc+pn2fwaiq2Ybu5kNjl1ao=", "owner": "viperML", "repo": "nh", - "rev": "dd8bdc83cfd7d3a8c7167589a03577c21ea015d2", + "rev": "a922eada049854019c5d1bbc82383f7095773e5c", "type": "github" }, "original": { @@ -365,14 +387,14 @@ }, "nix-index-database": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1723950649, - "narHash": "sha256-dHMkGjwwCGj0c2MKyCjRXVBXq2Sz3TWbbM23AS7/5Hc=", + "lastModified": 1724576102, + "narHash": "sha256-uM7n5nNL6fmA0bwMJBNll11f4cMWOFa2Ni6F5KeIldM=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "392828aafbed62a6ea6ccab13728df2e67481805", + "rev": "e333d62b70b179da1dd78d94315e8a390f2d12e5", "type": "github" }, "original": { @@ -403,19 +425,42 @@ "type": "github" } }, + "nix-update": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "nixos-cosmic", + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1724271552, + "narHash": "sha256-xn0dC4M3mfItxP+s3/v3Hz/CSKp74VH/gMfufKxl9/4=", + "owner": "Mic92", + "repo": "nix-update", + "rev": "737121eccb67542e8c004c64da833fede2e80c64", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-update", + "type": "github" + } + }, "nixd": { "inputs": { "flake-parts": "flake-parts", "flake-root": "flake-root", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_7", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1724075735, - "narHash": "sha256-w9MlAKAdcfSR9t3oasYj8L+XJ3r81f8MWSw9e0NCPpk=", + "lastModified": 1724296831, + "narHash": "sha256-+X9cc5fNEUtp6e+EZ2d9tjfPiXVcqkddEz1T/C9H5sc=", "owner": "nix-community", "repo": "nixd", - "rev": "c37ef77223d819eb673b9be828a2450271e3f08a", + "rev": "f6ca74330b49c45f50cead6d0ac0469f8f830f88", "type": "github" }, "original": { @@ -427,16 +472,17 @@ "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_6", + "nix-update": "nix-update", + "nixpkgs": "nixpkgs_8", "nixpkgs-stable": "nixpkgs-stable_2", - "rust-overlay": "rust-overlay_2" + "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1724118408, - "narHash": "sha256-nSKfqpr8RZDWkWi0FfvVrabOmnryVxYDayMa3Hz847c=", + "lastModified": 1724808932, + "narHash": "sha256-LwaEiwEyftMnoKuMMo3dT9HxktY5zzKDctybxGnX+kY=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "04a0f18cf0a4f1499d8abec419bd92e87cb05157", + "rev": "305434fce8b341baa596d6a0d7ec7a3a8ac60893", "type": "github" }, "original": { @@ -512,11 +558,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1723938990, - "narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=", + "lastModified": 1724531977, + "narHash": "sha256-XROVLf9ti4rrNCFLr+DmXRZtPjCQTW4cYy59owTEmxk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890", + "rev": "2527da1ef492c495d5391f3bcf9c1dd9f4514e32", "type": "github" }, "original": { @@ -527,6 +573,35 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1724224976, + "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", + "path": "/nix/store/j8pbrsb3nybdap3hhg9kw0ffqd4rlbx6-source", + "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1718428119, + "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1722519197, "narHash": "sha256-VEdJmVU2eLFtLqCjTYJd1J7+Go8idAcZoT11IewFiRg=", @@ -542,13 +617,13 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_5": { "locked": { - "lastModified": 1723637854, - "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", + "lastModified": 1724224976, + "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", + "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", "type": "github" }, "original": { @@ -558,7 +633,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_6": { "locked": { "lastModified": 1681303793, "narHash": "sha256-JEdQHsYuCfRL2PICHlOiH/2ue3DwoxUX7DJ6zZxZXFk=", @@ -574,7 +649,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_7": { "locked": { "lastModified": 1714562304, "narHash": "sha256-Mr3U37Rh6tH0FbaDFu0aZDwk9mPAe7ASaqDOGgLqqLU=", @@ -590,13 +665,13 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_8": { "locked": { - "lastModified": 1723991338, - "narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=", + "lastModified": 1724479785, + "narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8a3354191c0d7144db9756a74755672387b702ba", + "rev": "d0e1602ddde669d5beb01aec49d71a51937ed7be", "type": "github" }, "original": { @@ -608,11 +683,11 @@ }, "nur": { "locked": { - "lastModified": 1724128467, - "narHash": "sha256-HvbHufNy0ReUiRLRRCRonKU/TP5cXBXSXvv3l0IjjLw=", + "lastModified": 1724817867, + "narHash": "sha256-p8aM1WJtFcFYNi2j7uJWrZGKKuurORoZRY53ueLz8qk=", "owner": "nix-community", "repo": "NUR", - "rev": "751dda87c6b234be9b5ae93c77fe04a125cfd8df", + "rev": "6f0c6f6946e4197e9bb278e2b72a1ce486ea6238", "type": "github" }, "original": { @@ -629,7 +704,7 @@ "flake-utils" ], "gitignore": "gitignore", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_6", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { @@ -697,6 +772,22 @@ } }, "rust-overlay_2": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1724466314, + "narHash": "sha256-ltKuK6shQ64uej1mYNtBsDYxttUNFiv9AcHqk0+0NQM=", + "path": "/nix/store/gsif96m93kai5bx7qi0v9f9451q1b1ai-source", + "rev": "2b5b3edd96ef336b00622dcabc13788fdef9e3ca", + "type": "path" + }, + "original": { + "id": "rust-overlay", + "type": "indirect" + } + }, + "rust-overlay_3": { "inputs": { "nixpkgs": [ "nixos-cosmic", @@ -704,11 +795,11 @@ ] }, "locked": { - "lastModified": 1724034091, - "narHash": "sha256-b1g7w0sw+MDAhUAeCoX1vlTghsqcDZkxr+k9OZmxPa8=", + "lastModified": 1724725307, + "narHash": "sha256-gnu8JrUFQoy7b927EPuwmWpvk8MSroFl07pplmVueYA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "c7d36e0947826e0751a5214ffe82533fbc909bc0", + "rev": "f56076b216c266cd855b0811ceb86802e834cdb9", "type": "github" }, "original": { @@ -718,15 +809,18 @@ } }, "src": { - "flake": false, + "inputs": { + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay_2" + }, "locked": { - "lastModified": 1, - "narHash": "sha256-+svCK6F/suBPZlpFhU+Tr62er7fIoCYLfF9nBjYQoog=", - "path": "src", + "lastModified": 1724817482, + "narHash": "sha256-ZVu7hWi8u8roZkHOeRAkDMkXlyIHvoQgb6UTUfP+xyk=", + "path": "/home/bolt/code/meat", "type": "path" }, "original": { - "path": "src", + "path": "/home/bolt/code/meat", "type": "path" } }, @@ -795,6 +889,28 @@ "repo": "treefmt-nix", "type": "github" } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "nixos-cosmic", + "nix-update", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719887753, + "narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flakes/meat/flake.lock b/flakes/meat/flake.lock index baf8145..3dfbca5 100644 --- a/flakes/meat/flake.lock +++ b/flakes/meat/flake.lock @@ -36,11 +36,11 @@ "lix": { "flake": false, "locked": { - "lastModified": 1724058824, - "narHash": "sha256-WkRs8plqBYxIgrcz1jenmxbcLVVpo9Z9Waot9qIlqmI=", - "rev": "e727dbc3a3d59d7742a24a2b394b63a04ecb4d24", + "lastModified": 1724816427, + "narHash": "sha256-j/ma58x680RD8k9YGDGgj6qx/3b2qaZOBdyr0My7ik0=", + "rev": "5d31e889d7f3310cb030e85adcfd3ce64846457d", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/e727dbc3a3d59d7742a24a2b394b63a04ecb4d24.tar.gz?rev=e727dbc3a3d59d7742a24a2b394b63a04ecb4d24" + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/5d31e889d7f3310cb030e85adcfd3ce64846457d.tar.gz?rev=5d31e889d7f3310cb030e85adcfd3ce64846457d" }, "original": { "type": "tarball", @@ -75,11 +75,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1723994268, - "narHash": "sha256-3nHuGGBTqUxy1g7sm+1zTNLxbz9fnMr1ZX9etCWlFG8=", + "lastModified": 1724689275, + "narHash": "sha256-wpxC7XiZ9maYZA4BSLKGXc+pn2fwaiq2Ybu5kNjl1ao=", "owner": "viperML", "repo": "nh", - "rev": "dd8bdc83cfd7d3a8c7167589a03577c21ea015d2", + "rev": "a922eada049854019c5d1bbc82383f7095773e5c", "type": "github" }, "original": { @@ -106,11 +106,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1723991338, - "narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=", + "lastModified": 1724479785, + "narHash": "sha256-pP3Azj5d6M5nmG68Fu4JqZmdGt4S4vqI5f8te+E/FTw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8a3354191c0d7144db9756a74755672387b702ba", + "rev": "d0e1602ddde669d5beb01aec49d71a51937ed7be", "type": "github" }, "original": { @@ -119,6 +119,35 @@ "type": "indirect" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1724224976, + "narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=", + "path": "/nix/store/j8pbrsb3nybdap3hhg9kw0ffqd4rlbx6-source", + "rev": "c374d94f1536013ca8e92341b540eba4c22f9c62", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1718428119, + "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "lix": "lix", @@ -128,16 +157,35 @@ "src": "src" } }, - "src": { - "flake": false, + "rust-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, "locked": { - "lastModified": 1, - "narHash": "sha256-+svCK6F/suBPZlpFhU+Tr62er7fIoCYLfF9nBjYQoog=", - "path": "src", + "lastModified": 1724466314, + "narHash": "sha256-ltKuK6shQ64uej1mYNtBsDYxttUNFiv9AcHqk0+0NQM=", + "path": "/nix/store/gsif96m93kai5bx7qi0v9f9451q1b1ai-source", + "rev": "2b5b3edd96ef336b00622dcabc13788fdef9e3ca", "type": "path" }, "original": { - "path": "src", + "id": "rust-overlay", + "type": "indirect" + } + }, + "src": { + "inputs": { + "nixpkgs": "nixpkgs_3", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1724817482, + "narHash": "sha256-ZVu7hWi8u8roZkHOeRAkDMkXlyIHvoQgb6UTUfP+xyk=", + "path": "/home/bolt/code/meat", + "type": "path" + }, + "original": { + "path": "/home/bolt/code/meat", "type": "path" } }, diff --git a/flakes/meat/flake.nix b/flakes/meat/flake.nix index 9bc6374..b3622c2 100644 --- a/flakes/meat/flake.nix +++ b/flakes/meat/flake.nix @@ -17,10 +17,7 @@ inputs.lix.follows = "lix"; }; - src = { - url = "path:src"; - flake = false; - }; + src.url = "path:/home/bolt/code/meat"; }; outputs = { @@ -31,52 +28,27 @@ src, ... }: let - supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; - - forAllSystems = nixpkgs.lib.genAttrs supportedSystems; - - nixpkgsFor = forAllSystems (system: - import nixpkgs { - inherit system; - overlays = [ - lix-module.overlays.default - nh.overlays.default - ]; - }); + pkgs = import nixpkgs { + overlays = [ + lix-module.overlays.default + nh.overlays.default + ]; + system = "x86_64-linux"; + }; in { - packages = forAllSystems (system: let - pkgs = nixpkgsFor.${system}; - in { - meat = pkgs.callPackage ./meat.nix { - inherit src; - }; - }); + # packages.meat = pkgs.callPackage ./meat.nix { + # inherit src; + # }; + packages.meat = src.packages.x86_64-linux.default; - defaultPackage = forAllSystems (system: self.packages.${system}.meat); + defaultPackage = self.packages.meat; - nixosModules.meat = { - pkgs, - config, - ... - }: { - options.programs.meat = with pkgs.lib; { - flake = mkOption { - type = with types; nullOr (either path str); - default = null; - description = "path to your system flake"; - }; - }; - config = { - environment.systemPackages = [self.defaultPackage.${pkgs.system}]; - environment.sessionVariables = let - cfg = config.programs.meat; - in { - FLAKE = - if (cfg.flake == null) - then throw "Please set the programs.meat.flake option to your system flake." - else config.programs.meat.flake; - }; - }; + overlays.meat = final: prev: { + meat = self.defaultPackage; + }; + + nixosModules.meat = import ./module.nix { + meatOverlay = self.overlays.meat; }; }; } diff --git a/flakes/meat/meat-module.nix b/flakes/meat/meat-module.nix new file mode 100644 index 0000000..076bd60 --- /dev/null +++ b/flakes/meat/meat-module.nix @@ -0,0 +1,28 @@ +{ + pkgs, + lib, + config, + ... +}: let + inherit (lib) mkEnableOption mkOption types; + cfg = config.programs.meat; +in { + options.programs.meat = { + enable = mkEnableOption "meat"; + flake = mkOption { + type = with types; nullOr (either path str); + default = null; + description = "path to your system flake"; + }; + }; + config = + lib.mkIf + cfg.enable + { + environment.systemPackages = [pkgs.meat]; + environment.sessionVariables.FLAKE = + if (cfg.flake == null) + then abort "Please set the programs.meat.flake option to your system flake." + else config.programs.meat.flake; + }; +} diff --git a/flakes/meat/module.nix b/flakes/meat/module.nix new file mode 100644 index 0000000..b4278c1 --- /dev/null +++ b/flakes/meat/module.nix @@ -0,0 +1,4 @@ +{meatOverlay}: { + imports = [./meat-module.nix]; + nixpkgs.overlays = [meatOverlay]; +} diff --git a/flakes/meat/src/meat b/flakes/meat/old/src/meat similarity index 78% rename from flakes/meat/src/meat rename to flakes/meat/old/src/meat index e2ba636..27ea39e 100755 --- a/flakes/meat/src/meat +++ b/flakes/meat/old/src/meat @@ -14,19 +14,28 @@ case $cmd in ;; fresh) + if [[ "$1" == "-a" ]]; then + shift + all=true + else + all=false + fi if [[ "${#@}" > 0 ]]; then for f in $@; do if [ -d "./flakes/$f" ]; then + printf "subflake: $f\n" nix flake update --flake "./flakes/$f" - nix flake update $@ fi done - else + elif $all; then + printf "updating all\n" for f in ./flakes/*; do + printf "subflake: $f\n" nix flake update --flake "$f" done - nix flake update fi + printf "updating system\n" + nix flake update ;; gut) diff --git a/home/home.nix b/home/home.nix index 6d97200..604de45 100644 --- a/home/home.nix +++ b/home/home.nix @@ -16,6 +16,7 @@ in { ./util/ez.nix ./util/flatpak.nix ./util/cosmic.nix + ./util/murex.nix # TODO use these options, write plugin pkgs, etc inputs.nix-index-database.hmModules.nix-index ]; diff --git a/home/util/murex.nix b/home/util/murex.nix new file mode 100644 index 0000000..c885e49 --- /dev/null +++ b/home/util/murex.nix @@ -0,0 +1,66 @@ +{ + lib, + pkgs, + config, + ... +}: let + inherit (lib) mkEnableOption mkOption mkIf types; + inherit (builtins) listToAttrs; + cfg = config.programs.murex; +in { + options.programs.murex = { + enable = mkEnableOption "murex shell"; + managePlugins = mkEnableOption "plugin management"; + plugins = mkOption { + type = with types; listOf package; + default = []; + }; + direnv = mkEnableOption "direnv integration"; + profile = mkOption { + type = types.str; + default = ""; + }; + preload = mkOption { + type = types.str; + default = ""; + }; + }; + config = { + home.file = + { + ".murex_preload" = { + text = cfg.preload; + enable = cfg.preload != ""; + }; + ".murex_profile" = { + text = + cfg.profile + ++ ( + if cfg.direnv + then '' + direnv hook murex -> source + '' + else "" + ); + enable = cfg.direnv || (cfg.profile != ""); + }; + ".murex_modules/packages.json" = { + text = builtins.toJSON (map (plugin: { + Protocol = "nix"; + URI = "https://none.thanks/managed.git"; + Package = plugin.pname; + }) + cfg.plugins); + enable = cfg.managePlugins && (cfg.plugins != []); + }; + } + // (mkIf cfg.managePlugins (listToAttrs (map (plugin: { + name = ".murex_modules/${plugin.pname}"; + value = { + recursive = true; + source = plugin; + }; + }) + cfg.plugins))); + }; +} diff --git a/system/modules/term.nix b/system/modules/term.nix index b19784b..db680e2 100644 --- a/system/modules/term.nix +++ b/system/modules/term.nix @@ -1,6 +1,17 @@ -{pkgs, ...}: { +{pkgs, ...}: let + murex = pkgs.murex.overrideAttrs { + passthru = { + shellPath = "/bin/murex"; + }; + }; +in { environment.pathsToLink = ["/share/zsh"]; programs.zsh.enable = true; + environment.systemPackages = [ + murex + ]; + # TODO change this when they fix the helix job control issue + # users.defaultUserShell = murex; users.defaultUserShell = pkgs.zsh; console = { font = "Lat2-Terminus16"; diff --git a/system/quiver.nix b/system/quiver.nix index 49cfc55..63cd71c 100644 --- a/system/quiver.nix +++ b/system/quiver.nix @@ -20,7 +20,10 @@ ]; }; - programs.meat.flake = "/home/bolt/.nix"; + programs.meat = { + enable = true; + flake = "/home/bolt/.nix"; + }; boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbcore" "sd_mod"]; boot.initrd.kernelModules = [];