diff --git a/flake.lock b/flake.lock index b214fcd..d57eb91 100644 --- a/flake.lock +++ b/flake.lock @@ -15,6 +15,98 @@ "type": "github" } }, + "devshell": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722113426, + "narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=", + "owner": "numtide", + "repo": "devshell", + "rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-compat": { + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -33,6 +125,24 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "flakey-profile": { "locked": { "lastModified": 1712898590, @@ -48,6 +158,84 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nixvim", + "nixvim", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1725513492, + "narHash": "sha256-tyMUA6NgJSvvQuzB7A1Sf8+0XCHyfSPRx/b00o6K0uo=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "7570de7b9b504cfe92025dd1be797bf546f66528", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_2": { + "inputs": { + "nixpkgs": [ + "nixvim", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -69,6 +257,28 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726357542, + "narHash": "sha256-p4OrJL2weh0TRtaeu1fmNYP6+TOp/W2qdaIJxxQay4c=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "e524c57b1fa55d6ca9d8354c6ce1e538d2a1f47f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "lix": { "flake": false, "locked": { @@ -104,6 +314,28 @@ "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726188813, + "narHash": "sha256-Vop/VRi6uCiScg/Ic+YlwsdIrLabWUJc57dNczp0eBc=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "21fe31f26473c180390cfa81e3ea81aca0204c80", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1724531977, @@ -120,7 +352,35 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + } + }, "nixpkgs-stable": { + "locked": { + "lastModified": 1720386169, + "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { "locked": { "lastModified": 1721524707, "narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=", @@ -136,12 +396,152 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1726243404, + "narHash": "sha256-sjiGsMh+1cWXb53Tecsm4skyFNag33GPbVgCdfj3n9I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "345c263f2f53a3710abe117f28a5cb86d0ba4059", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1726243404, + "narHash": "sha256-sjiGsMh+1cWXb53Tecsm4skyFNag33GPbVgCdfj3n9I=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "345c263f2f53a3710abe117f28a5cb86d0ba4059", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1719082008, + "narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9693852a2070b398ee123a329e68f0dab5526681", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_2", + "nixvim": "nixvim_2", + "pre-commit-hooks": "pre-commit-hooks" + }, + "locked": { + "lastModified": 1726559945, + "narHash": "sha256-CD5+cNvQuPB/E7tzVMcr9+yB18UmXBClmeJemgzxIk0=", + "ref": "refs/heads/main", + "rev": "66fbca65de0a4725a35a327b28f88d792329c636", + "revCount": 104, + "type": "git", + "url": "https://codeberg.org/landervdb/nixvim.git" + }, + "original": { + "type": "git", + "url": "https://codeberg.org/landervdb/nixvim.git" + } + }, + "nixvim_2": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts_2", + "git-hooks": "git-hooks", + "home-manager": "home-manager_2", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs_3", + "nuschtosSearch": "nuschtosSearch", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1726441328, + "narHash": "sha256-WGZuGGjWq4Rac3MwdnXaojvTOMo2HjqXEWughqCYMAk=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "95b322a5220744a5cac725e62fa4e612851edbc2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726392886, + "narHash": "sha256-9RtOuG7V8KG8IU8nZje5EQ1WSM/inr7+zb3tAgTiHDM=", + "owner": "NuschtOS", + "repo": "search", + "rev": "97d34b70deed4878fcb2449ac89dab717d72efa1", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_2", + "gitignore": "gitignore_2", + "nixpkgs": "nixpkgs_4", + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1725513492, + "narHash": "sha256-tyMUA6NgJSvvQuzB7A1Sf8+0XCHyfSPRx/b00o6K0uo=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "7570de7b9b504cfe92025dd1be797bf546f66528", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "catppuccin": "catppuccin", "home-manager": "home-manager", "lix-module": "lix-module", "nixpkgs": "nixpkgs", + "nixvim": "nixvim", "sops-nix": "sops-nix" } }, @@ -150,7 +550,7 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { "lastModified": 1723501126, @@ -180,6 +580,43 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1725271838, + "narHash": "sha256-VcqxWT0O/gMaeWTTjf1r4MOyG49NaNxW4GHTO3xuThE=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "9fb342d14b69aefdf46187f6bb80a4a0d97007cd", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 05cff27..db627b8 100644 --- a/flake.nix +++ b/flake.nix @@ -15,13 +15,15 @@ url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - + # theme catppuccin.url = "github:catppuccin/nix"; # Home manager home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + nixvim.url = "git+https://codeberg.org/landervdb/nixvim.git"; }; outputs = { @@ -33,10 +35,10 @@ in { nixosConfigurations = { wodan = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs outputs; }; + specialArgs = {inherit inputs outputs;}; modules = [ - ./hosts/wodan - ]; + ./hosts/wodan + ]; }; }; }; diff --git a/home/lander/features/cli/default.nix b/home/lander/features/cli/default.nix index 439aa6a..3204232 100644 --- a/home/lander/features/cli/default.nix +++ b/home/lander/features/cli/default.nix @@ -7,7 +7,6 @@ ./bat.nix ./btop.nix ./starship.nix - ./vim.nix ./zsh.nix ]; diff --git a/home/lander/features/cli/vim.nix b/home/lander/features/cli/vim.nix deleted file mode 100644 index fc2891a..0000000 --- a/home/lander/features/cli/vim.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ pkgs, ... }: -{ - programs.neovim = { - enable = true; - package = pkgs.neovim-unwrapped; - catppuccin.enable = true; - viAlias = true; - vimAlias = true; - vimdiffAlias = true; - - extraLuaConfig = '' - vim.opt.autochdir = true - vim.opt.backup = false - - vim.opt.autoindent = true - vim.opt.cindent = true - vim.opt.smartindent = true - - vim.opt.expandtab = true - vim.opt.shiftwidth = 2 - vim.opt.smarttab = true - vim.opt.softtabstop = 2 - vim.opt.tabstop = 2 - - vim.opt.backspace = "indent,eol,start" - vim.g.mapleader = ';' - vim.g.maplocalleader = ';' - - vim.opt.hlsearch = true - vim.opt.ignorecase = true - vim.opt.showmatch = true - - vim.opt.number = true - vim.opt.background = dark - vim.opt.termguicolors = true - - function map(mode, lhs, rhs, opts) - local options = {noremap = true, silent = true} - if opts then - options = vim.tbl_extend("force", options, opts) - end - vim.keymap.set(mode, lhs, rhs, options) - end - - map('n', 't', ':ToggleTerm' ) - map('i', '', '' ) - map('t', '', '' ) - map('n', 'p', ':NvimTreeToggle' ) - map('n', '', ':NvimTreeToggle' ) - map('n', 'ff', ':Telescope find_files') - map('n', 'fg', ':Telescope live_grep' ) - map('n', 'fb', ':Telescope buffers' ) - map('n', 'fh', ':Telescope help_tags' ) - map('n', 'fo', ':Telescope vim_options' ) - - vim.cmd.colorscheme "catppuccin" - ''; - - plugins = with pkgs.vimPlugins; [ - nvim-web-devicons - telescope-nvim - vim-nix - vim-visual-multi - { - plugin = nvim-comment; - type = "lua"; - config = '' - require('nvim_comment').setup() - ''; - } - { - plugin = nvim-tree-lua; - type = "lua"; - config = '' - require('nvim-tree').setup({ update_cwd = true }) - ''; - } - { - plugin = lightline-vim; - type = "viml"; - config = '' - let g:lightline = {'colorscheme': 'catppuccin'} - ''; - } - ]; - }; -} diff --git a/home/lander/global/default.nix b/home/lander/global/default.nix index 7988af7..7a82e26 100644 --- a/home/lander/global/default.nix +++ b/home/lander/global/default.nix @@ -1,14 +1,10 @@ { inputs, - lib, - config, pkgs, ... -}: -let - theme = import ../../../lib/theme { inherit pkgs; }; -in -{ +}: let + theme = import ../../../lib/theme {inherit pkgs;}; +in { imports = [ inputs.catppuccin.homeManagerModules.catppuccin @@ -37,6 +33,7 @@ in home.packages = with pkgs; [ sops + inputs.nixvim.packages.x86_64-linux.default ]; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion