diff --git a/flake.lock b/flake.lock index 2981bf6..a20bc0c 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1751685974, + "narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=", + "ref": "refs/heads/main", + "rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1", + "revCount": 92, + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + }, + "original": { + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + } + }, "flake-file": { "locked": { "lastModified": 1774666175, @@ -35,6 +51,27 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nvf", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -86,6 +123,43 @@ "type": "github" } }, + "mnw": { + "locked": { + "lastModified": 1770419553, + "narHash": "sha256-b1XqsH7AtVf2dXmq2iyRr2NC1yG7skY7Z6N2MpWHlK4=", + "owner": "Gerg-L", + "repo": "mnw", + "rev": "2aaffa8030d0b262176146adbb6b0e6374ce2957", + "type": "github" + }, + "original": { + "owner": "Gerg-L", + "repo": "mnw", + "type": "github" + } + }, + "ndg": { + "inputs": { + "nixpkgs": [ + "nvf", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768214250, + "narHash": "sha256-hnBZDQWUxJV3KbtvyGW5BKLO/fAwydrxm5WHCWMQTbw=", + "owner": "feel-co", + "repo": "ndg", + "rev": "a6bd3c1ce2668d096e4fdaaa03ad7f03ba1fbca8", + "type": "github" + }, + "original": { + "owner": "feel-co", + "ref": "refs/tags/v2.6.0", + "repo": "ndg", + "type": "github" + } + }, "nixgl": { "inputs": { "flake-utils": "flake-utils", @@ -168,6 +242,31 @@ "type": "github" } }, + "nvf": { + "inputs": { + "flake-compat": "flake-compat", + "flake-parts": "flake-parts_2", + "mnw": "mnw", + "ndg": "ndg", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_2" + }, + "locked": { + "lastModified": 1774736237, + "narHash": "sha256-uQ+Was7QP9Bupr0XZyZXOAD32Ox8z2mJnevT2FmDwS8=", + "owner": "notashelf", + "repo": "nvf", + "rev": "a0636d5c977743851c91d3c2e74bfac90be48835", + "type": "github" + }, + "original": { + "owner": "notashelf", + "repo": "nvf", + "type": "github" + } + }, "root": { "inputs": { "flake-file": "flake-file", @@ -180,6 +279,7 @@ "nixpkgs-lib": [ "nixpkgs" ], + "nvf": "nvf", "sops-nix": "sops-nix", "wrapper-modules": "wrapper-modules" } @@ -219,6 +319,21 @@ "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" + } + }, "wrapper-modules": { "inputs": { "nixpkgs": "nixpkgs_3" diff --git a/flake.nix b/flake.nix index 3dc09aa..f8497ed 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,10 @@ }; nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; nixpkgs-lib.follows = "nixpkgs"; + nvf = { + url = "github:notashelf/nvf"; + inputs.nixpkgs.follows = "nixpkgs"; + }; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/modules/hosts/john-pc/default.nix b/modules/hosts/john-pc/default.nix index 889f5a5..82b6235 100644 --- a/modules/hosts/john-pc/default.nix +++ b/modules/hosts/john-pc/default.nix @@ -35,6 +35,7 @@ in restic docker desktop + # neovim ]; # TODO: make this more restrictive, rather than allowing all unfree packages nixpkgs.config.allowUnfree = true; @@ -44,9 +45,10 @@ in home.username = "${username}"; home.homeDirectory = "/home/${username}"; - home.packages = [ - pkgs.nixos-rebuild + home.packages = with pkgs; [ + nixos-rebuild testPushCmd + inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.my-neovim ]; shell.program = "zsh"; diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix new file mode 100644 index 0000000..4176b19 --- /dev/null +++ b/modules/programs/neovim.nix @@ -0,0 +1,30 @@ +{ self, inputs, ... }: { + flake-file.inputs = { + nvf = { + url = "github:notashelf/nvf"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + perSystem = { system, pkgs, ... }: { + packages.my-neovim = (inputs.nvf.lib.neovimConfiguration { + inherit pkgs; + modules = [ + { + config.vim = { + # Enable custom theming options + theme.enable = true; + + # Enable Treesitter + treesitter.enable = true; + + # Other options will go here. Refer to the config + # reference in Appendix B of the nvf manual. + # ... + }; + } + ]; + }) + .neovim; + }; +} \ No newline at end of file