From 7e219a4f793a8c1fbc4e4bb1291b560b3b477b0d Mon Sep 17 00:00:00 2001 From: Christoph Schmatzler Date: Wed, 13 Aug 2025 08:25:17 +0200 Subject: [PATCH] up --- flake.lock | 24 +++++++-------- flake.nix | 3 -- hosts/darwin/chidi/default.nix | 7 +++-- .../base/editors/neovim/default.nix | 2 ++ .../base/editors/neovim/mappings.nix | 8 +---- .../base/editors/neovim/plugins/blink-cmp.nix | 17 +++++++++++ .../base/editors/neovim/plugins/mini.nix | 6 ---- .../base/editors/neovim/plugins/oil.nix | 30 +++++++++++++++++++ modules/platform/darwin/default.nix | 1 + modules/platform/darwin/secrets.nix | 6 +--- 10 files changed, 68 insertions(+), 36 deletions(-) create mode 100644 modules/home-manager/base/editors/neovim/plugins/blink-cmp.nix create mode 100644 modules/home-manager/base/editors/neovim/plugins/oil.nix diff --git a/flake.lock b/flake.lock index 8e80881..36d821b 100644 --- a/flake.lock +++ b/flake.lock @@ -132,11 +132,11 @@ "homebrew-cask": { "flake": false, "locked": { - "lastModified": 1755005662, - "narHash": "sha256-dmjnhJI0OXUb5n+DSCHuliIoTY/rXogiCSh7VjfqIZM=", + "lastModified": 1755061279, + "narHash": "sha256-DRGrgAAcMPM83bfrp3/pMIw7D3JxdBPj/wjGfB2whs0=", "owner": "homebrew", "repo": "homebrew-cask", - "rev": "cc4b6a48a8bac59a91e4436740939b250823fd6c", + "rev": "bfac3b4fa44cedc18dbcc2bb1efd52e7a129fd8a", "type": "github" }, "original": { @@ -148,11 +148,11 @@ "homebrew-core": { "flake": false, "locked": { - "lastModified": 1755005479, - "narHash": "sha256-a9+YxRWv7rPP9ngi39PxGsLo+c/zqHbLOJJ1Y43YD0M=", + "lastModified": 1755063843, + "narHash": "sha256-h+EckB4MLcQFVgM9sgHAP+fuvmzJOhKAvHcE8Wt2dyg=", "owner": "homebrew", "repo": "homebrew-core", - "rev": "bccf5505eadeebe4195577c65b7b74564d23196b", + "rev": "d70d9dc733ea84f025ee1d40d24a40b861454887", "type": "github" }, "original": { @@ -240,11 +240,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1755005871, - "narHash": "sha256-qqhLstgA5OFjSUkY0DeQJDyU8Yd0b3PAmSbHz9/bE+M=", + "lastModified": 1755064407, + "narHash": "sha256-kx0aQ9wtm7966jTZXkFYMk+fcr3kZ+gjdULvRiIVxRQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3bf3ad936492401f45d6ca3109c3d24f4a8d356d", + "rev": "ecaec3fd41536abe3ee2a68f3ae0958036ce92cc", "type": "github" }, "original": { @@ -278,11 +278,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1754921951, - "narHash": "sha256-KY+/livAp6l3fI8SdNa+CLN/AA4Z038yL/pQL2PaW7g=", + "lastModified": 1755043294, + "narHash": "sha256-X5q/ztJ0PHScZGF88nD1EtY/x2Ob9Dtzj/PleOtjmQg=", "owner": "nix-community", "repo": "nixvim", - "rev": "7b53322d75a1c66f84fb145e4b5f0f411d9edc6b", + "rev": "1d4816820c8efb731a8b967581db916728fbd9e2", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 371cda2..2f56a63 100644 --- a/flake.nix +++ b/flake.nix @@ -33,7 +33,6 @@ flake-parts.lib.mkFlake {inherit inputs;} ( let constants = import ./lib/constants.nix; - hostMetadata = import ./hosts/metadata.nix; user = constants.user; darwinHosts = builtins.attrNames (builtins.readDir ./hosts/darwin); nixosHosts = builtins.attrNames (builtins.readDir ./hosts/nixos); @@ -51,7 +50,6 @@ inputs // { inherit user hostname constants; - hostMeta = hostMetadata.${hostname} or {}; }; modules = [ inputs.home-manager.darwinModules.home-manager @@ -82,7 +80,6 @@ inputs // { inherit user hostname constants; - hostMeta = hostMetadata.${hostname} or {}; }; modules = [ inputs.home-manager.nixosModules.home-manager diff --git a/hosts/darwin/chidi/default.nix b/hosts/darwin/chidi/default.nix index d598b9b..abf49f4 100644 --- a/hosts/darwin/chidi/default.nix +++ b/hosts/darwin/chidi/default.nix @@ -1,7 +1,6 @@ { pkgs, user, - hostMeta, ... }: { imports = [ @@ -12,8 +11,10 @@ networking.computerName = "Chidi"; home-manager.users.${user} = { - programs.git.userEmail = hostMeta.email; + programs.git.userEmail = "christoph@tuist.dev"; }; - environment.systemPackages = with pkgs; hostMeta.extraPackages; + environment.systemPackages = with pkgs; [ + slack + ]; } diff --git a/modules/home-manager/base/editors/neovim/default.nix b/modules/home-manager/base/editors/neovim/default.nix index ce7f2ea..0ae7f8d 100644 --- a/modules/home-manager/base/editors/neovim/default.nix +++ b/modules/home-manager/base/editors/neovim/default.nix @@ -4,7 +4,9 @@ ./mappings.nix ./options.nix ./plugins/conform.nix + ./plugins/blink-cmp.nix ./plugins/grug-far.nix + ./plugins/oil.nix ./plugins/lazygit.nix ./plugins/lsp.nix ./plugins/mini.nix diff --git a/modules/home-manager/base/editors/neovim/mappings.nix b/modules/home-manager/base/editors/neovim/mappings.nix index b525ec7..7495c7f 100644 --- a/modules/home-manager/base/editors/neovim/mappings.nix +++ b/modules/home-manager/base/editors/neovim/mappings.nix @@ -1,16 +1,10 @@ { programs.nixvim.keymaps = [ # e - explore/edit - { - mode = "n"; - key = "ed"; - action = ":lua require('mini.files').open()"; - options.desc = "Directory"; - } { mode = "n"; key = "ef"; - action = ":lua require('mini.files').open(vim.api.nvim_buf_get_name(0))"; + action = ":lua require('oil').open()"; options.desc = "File directory"; } { diff --git a/modules/home-manager/base/editors/neovim/plugins/blink-cmp.nix b/modules/home-manager/base/editors/neovim/plugins/blink-cmp.nix new file mode 100644 index 0000000..0a54073 --- /dev/null +++ b/modules/home-manager/base/editors/neovim/plugins/blink-cmp.nix @@ -0,0 +1,17 @@ +{ + programs.nixvim.plugins.blink-cmp = { + enable = true; + settings = { + signature.enabled = true; + completion = { + accept = { + auto_brackets = { + enabled = true; + semantic_token_resolution.enabled = false; + }; + }; + documentation.auto_show = true; + }; + }; + }; +} diff --git a/modules/home-manager/base/editors/neovim/plugins/mini.nix b/modules/home-manager/base/editors/neovim/plugins/mini.nix index 25f9b57..0a6fe04 100644 --- a/modules/home-manager/base/editors/neovim/plugins/mini.nix +++ b/modules/home-manager/base/editors/neovim/plugins/mini.nix @@ -123,14 +123,8 @@ ]; }; comment = {}; - completion = { - lsp_completion = { - source_func = "omnifunc"; - }; - }; diff = {}; extra = {}; - files = {}; git = {}; icons = {}; indentscope = {}; diff --git a/modules/home-manager/base/editors/neovim/plugins/oil.nix b/modules/home-manager/base/editors/neovim/plugins/oil.nix new file mode 100644 index 0000000..d8e284c --- /dev/null +++ b/modules/home-manager/base/editors/neovim/plugins/oil.nix @@ -0,0 +1,30 @@ +{ + programs.nixvim.plugins.oil = { + enable = true; + settings = { + columns = [ + "icon" + ]; + keymaps = { + "" = "actions.refresh"; + "qq" = "actions.close"; + }; + skip_confirm_for_simple_edits = true; + constrain_cursor = "editable"; + default_file_explorer = true; + view_options = { + show_hidden = true; + }; + win_options = { + concealcursor = "ncv"; + conceallevel = 3; + cursorcolumn = false; + foldcolumn = "0"; + list = false; + signcolumn = "no"; + spell = false; + wrap = false; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/platform/darwin/default.nix b/modules/platform/darwin/default.nix index 82a93d5..6afd342 100644 --- a/modules/platform/darwin/default.nix +++ b/modules/platform/darwin/default.nix @@ -37,6 +37,7 @@ }; home-manager = { + useGlobalPkgs = true; users.${user} = { pkgs, config, diff --git a/modules/platform/darwin/secrets.nix b/modules/platform/darwin/secrets.nix index a170409..19c10b5 100644 --- a/modules/platform/darwin/secrets.nix +++ b/modules/platform/darwin/secrets.nix @@ -1,5 +1 @@ -{user, ...}: { - age.identityPaths = [ - "/Users/${user}/.ssh/id_ed25519" - ]; -} +{user, ...}: {}