diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-09 12:35:44 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-09 12:54:51 +0100 |
commit | 2122a01f99c6da466b8f0f55c965c11a9043d117 (patch) | |
tree | 6c1697afc30a5bb72635bda7db9b5610386a5b71 /flake | |
parent | fix(pkgs/stamp): Fallback to `dot-license` (diff) | |
download | nixos-config-2122a01f99c6da466b8f0f55c965c11a9043d117.tar.gz nixos-config-2122a01f99c6da466b8f0f55c965c11a9043d117.zip |
refactor(modules/legacy/conf/nvim): Move to `by-name`
Diffstat (limited to 'flake')
-rw-r--r-- | flake/nixosConfigurations/common.nix | 10 | ||||
-rw-r--r-- | flake/packages/default.nix | 83 |
2 files changed, 53 insertions, 40 deletions
diff --git a/flake/nixosConfigurations/common.nix b/flake/nixosConfigurations/common.nix index 68758bb6..d4660ef7 100644 --- a/flake/nixosConfigurations/common.nix +++ b/flake/nixosConfigurations/common.nix @@ -1,6 +1,10 @@ # This file contains common configuration applied to every host. # It should only `enable` options defined in the `modules` directory. -{config, ...}: { +{ + config, + pkgs, + ... +}: { soispha = { boot.enable = true; cleanup.enable = true; @@ -79,6 +83,10 @@ }; programs = { + nvim = { + enable = true; + shell = pkgs.zsh; + }; atuin.enable = true; git.enable = true; imv.enable = true; diff --git a/flake/packages/default.nix b/flake/packages/default.nix index d4258bfa..125bf888 100644 --- a/flake/packages/default.nix +++ b/flake/packages/default.nix @@ -14,45 +14,50 @@ inherit (import ./merge.nix {inherit lib;}) merge; output = import ../../bootstrap {inherit pkgs sysLib;}; - nvim = - builtins.mapAttrs ( - name: value: let - nvim_config = - import ../../modules/home.legacy/conf/nvim/default.nix - build_args; - build_args = let - inherit (value._module.args) pkgs; - inherit (pkgs) lib; - in { - inherit pkgs pkgsStable lib; - nixosConfig = value.config; - config = value.config.home-manager.users.soispha; - }; - - resolve_imports = attrs: - merge (builtins.map (v: import v build_args) - attrs.imports); - - resolve_imports' = attrs: - if builtins.any (n: n == "imports") (builtins.attrNames attrs) - then - resolve_imports' (merge [ - (resolve_imports attrs) - (builtins.removeAttrs - attrs - ["imports"]) - ]) - else attrs; - - complete_config = resolve_imports' nvim_config; - in - nixVim.legacyPackages."${system}".makeNixvim - ( - builtins.removeAttrs - complete_config.programs.nixvim ["enable"] - ) - ) - self.nixosConfigurations; + # FIXME: Do what the trace says. <2024-11-09> + nvim = builtins.trace "nvim build currently broken, using default" { + tiamat = pkgs.neovim; + apzu = + pkgs.neovim; + }; + # builtins.mapAttrs ( + # name: value: let + # nvim_config = + # import ../../modules/home.legacy/conf/nvim/default.nix + # build_args; + # build_args = let + # inherit (value._module.args) pkgs; + # inherit (pkgs) lib; + # in { + # inherit pkgs pkgsStable lib; + # nixosConfig = value.config; + # config = value.config.home-manager.users.soispha; + # }; + # + # resolve_imports = attrs: + # merge (builtins.map (v: import v build_args) + # attrs.imports); + # + # resolve_imports' = attrs: + # if builtins.any (n: n == "imports") (builtins.attrNames attrs) + # then + # resolve_imports' (merge [ + # (resolve_imports attrs) + # (builtins.removeAttrs + # attrs + # ["imports"]) + # ]) + # else attrs; + # + # complete_config = resolve_imports' nvim_config; + # in + # nixVim.legacyPackages."${system}".makeNixvim + # ( + # builtins.removeAttrs + # complete_config.programs.nixvim ["enable"] + # ) + # ) + # self.nixosConfigurations; output_neovim = lib.attrsets.mapAttrs' (name: value: lib.attrsets.nameValuePair "nvim_${name}" value) nvim; |