diff --git a/flake.lock b/flake.lock index 9e5a19a..a56da47 100644 --- a/flake.lock +++ b/flake.lock @@ -748,22 +748,6 @@ "type": "github" } }, - "nixpkgs_4": { - "locked": { - "lastModified": 1702151865, - "narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "666fc80e7b2afb570462423cb0e1cf1a3a34fedd", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat", @@ -823,8 +807,7 @@ "quickshell": "quickshell", "schizofox": "schizofox", "spicetify-nix": "spicetify-nix", - "split-monitor-workspaces": "split-monitor-workspaces", - "wrapper-manager": "wrapper-manager" + "split-monitor-workspaces": "split-monitor-workspaces" } }, "rust-overlay": { @@ -999,24 +982,6 @@ "type": "github" } }, - "wrapper-manager": { - "inputs": { - "nixpkgs": "nixpkgs_4" - }, - "locked": { - "lastModified": 1724503599, - "narHash": "sha256-WVhNq3QjnG/2mi772CkTxZCQcomKV5S03TbQKwe1Kj4=", - "owner": "viperML", - "repo": "wrapper-manager", - "rev": "c936f9203217e654a6074d206505c16432edbc70", - "type": "github" - }, - "original": { - "owner": "viperML", - "repo": "wrapper-manager", - "type": "github" - } - }, "xdph": { "inputs": { "hyprland-protocols": [ diff --git a/flake.nix b/flake.nix index 33f451f..99c3aa9 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,9 @@ ]; flake = { formatter.x86_64-linux = pkgs.alejandra; + nixosModules = { + shell = import ./modules/shell; + }; }; }; inputs = { @@ -68,8 +71,6 @@ url = "github:gerg-l/spicetify-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - # Wrapper-manager for safely wrapping some packages. - wrapper-manager.url = "github:viperML/wrapper-manager"; quickshell = { url = "git+https://git.outfoxxed.me/outfoxxed/quickshell"; diff --git a/modules/programs/editors/helix/module.nix b/modules/programs/editors/helix/module.nix index 425a6d0..e6b1286 100644 --- a/modules/programs/editors/helix/module.nix +++ b/modules/programs/editors/helix/module.nix @@ -1,20 +1,42 @@ { config, + inputs', lib, - self', pkgs, ... }: let cfg = config.modules.system.programs.editors.helix; inherit (config.modules.other.system) username; inherit (lib) mkIf getExe; + inherit (inputs'.helix.packages) helix; + wrapped-helix = pkgs.symlinkJoin { + name = "helix-wrapped"; + paths = with pkgs; [ + helix + + # C/C++ + clang-tools + + # Markdown + marksman + + # Nix + nil + lldb_19 + # Bash + bash-language-server + + # Shell + shellcheck + ]; + }; in { imports = [./languages.nix]; config = mkIf cfg.enable { home-manager.users.${username} = { programs.helix = { enable = true; - package = self'.packages.helix; + package = wrapped-helix; settings = { theme = "catppuccin_mocha"; diff --git a/parts/pkgs/extraPackages/fish/packages.nix b/modules/shell/packages.nix similarity index 100% rename from parts/pkgs/extraPackages/fish/packages.nix rename to modules/shell/packages.nix diff --git a/parts/default.nix b/parts/default.nix index 9ff38e1..0f4c6c0 100644 --- a/parts/default.nix +++ b/parts/default.nix @@ -1,9 +1,7 @@ { imports = [ - # ./fmt.nix ./shell.nix ./templates ./lib - ./pkgs ]; } diff --git a/parts/pkgs/default.nix b/parts/pkgs/default.nix deleted file mode 100644 index 88caa9d..0000000 --- a/parts/pkgs/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - inputs, - inputs', - ... -}: { - # NOTE: We use flake-parts' easyOverlay module to extend our default packages with some extra packages I want to have. - # - imports = [inputs.flake-parts.flakeModules.easyOverlay]; - perSystem = { - config, - lib, - inputs', - pkgs, - ... - }: { - # Attributes to add to overlays.default. - # The overlays.default overlay will re-evaluate perSystem with the “prev” (or “super”) overlay argument value - # as the pkgs module argument. The easyOverlay module also adds the final module argument, for the result of applying the overlay. - - # When not in an overlay, final defaults to pkgs plus the generated overlay. - # This requires Nixpkgs to be re-evaluated, which is more expensive than setting - # pkgs to a Nixpkgs that already includes the necessary overlays that are required - # for the flake itself. - overlayAttrs = config.packages; - - packages = { - fish = import ./extraPackages/fish {inherit inputs lib pkgs;}; - helix = import ./extraPackages/helix-wrapped.nix {inherit inputs inputs' lib pkgs;}; - }; - }; -} diff --git a/parts/pkgs/extraPackages/fish/default.nix b/parts/pkgs/extraPackages/fish/default.nix deleted file mode 100644 index d0ffb7b..0000000 --- a/parts/pkgs/extraPackages/fish/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - inputs, - lib, - pkgs, - ... -}: let - inherit (lib) concatStringsSep mapAttrsToList; - aliases = import ./aliases.nix {inherit pkgs;}; - - aliasesAsString = - concatStringsSep "\n" - (mapAttrsToList (k: v: "alias ${k}=\"${v}\"") aliases); - - packages = import ./packages.nix {inherit pkgs;}; - - fish-wrapped = inputs.wrapper-manager.lib.build { - inherit pkgs; - modules = [ - { - wrappers.fish-wrapped = { - basePackage = pkgs.fish; - pathAdd = packages; - flags = [ - ]; - }; - } - ]; - }; -in - fish-wrapped diff --git a/parts/pkgs/extraPackages/helix-wrapped.nix b/parts/pkgs/extraPackages/helix-wrapped.nix deleted file mode 100644 index 839579d..0000000 --- a/parts/pkgs/extraPackages/helix-wrapped.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - inputs', - inputs, - lib, - pkgs, - ... -}: let - helix-wrapped = inputs.wrapper-manager.lib.build { - inherit pkgs; - modules = [ - { - wrappers.nushell-wrapped = { - basePackage = inputs'.helix.packages.default; - pathAdd = with pkgs; [ - # C/C++ - clang-tools - - # Markdown - marksman - - # Nix - nil - lldb_19 - # Bash - bash-language-server - - # Shell - shellcheck - ]; - }; - } - ]; - }; -in - helix-wrapped