diff --git a/flake.lock b/flake.lock index 6a18226..ab977c5 100644 --- a/flake.lock +++ b/flake.lock @@ -78,11 +78,11 @@ ] }, "locked": { - "lastModified": 1745502102, - "narHash": "sha256-LqhRwzvIVPEjH0TaPgwzqpyhW6DtCrvz7FnUJDoUZh8=", + "lastModified": 1745369821, + "narHash": "sha256-mi6cAjuBztm9gFfpiVo6mAn81cCID6nmDXh5Kmyjwyc=", "owner": "nix-community", "repo": "disko", - "rev": "ca27b88c88948d96feeee9ed814cbd34f53d0d70", + "rev": "c5140c6079ff690e85eac0b86e254de16a79a4b7", "type": "github" }, "original": { @@ -215,6 +215,63 @@ "type": "github" } }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -222,11 +279,11 @@ ] }, "locked": { - "lastModified": 1745494811, - "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", + "lastModified": 1745421701, + "narHash": "sha256-mZoVHMwj8uF1nnd8nHGzcTzTcVNApymIoo4NemJjnzU=", "owner": "nix-community", "repo": "home-manager", - "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", + "rev": "b7527e2daf755437a2948f09761a8ed07debd075", "type": "github" }, "original": { @@ -250,6 +307,60 @@ "type": "github" } }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737371634, + "narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.7", + "repo": "ixx", + "type": "github" + } + }, + "ixx_2": { + "inputs": { + "flake-utils": [ + "nuschtos", + "flake-utils" + ], + "nixpkgs": [ + "nuschtos", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737371634, + "narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.7", + "repo": "ixx", + "type": "github" + } + }, "nether": { "inputs": { "clan-core": "clan-core", @@ -288,11 +399,11 @@ "treefmt-nix": "treefmt-nix_3" }, "locked": { - "lastModified": 1745505025, - "narHash": "sha256-F9IekLaLYVG/UNUiaN194qu0n1pOgeqjGkD1l5OVEgM=", + "lastModified": 1745120626, + "narHash": "sha256-MqAi9oR5iaPbevV7B7WJWpFQaMloeHYQSX/lVL2XI7g=", "owner": "nix-community", "repo": "nixos-anywhere", - "rev": "edf1adb89307f921575b5fcd0c6bb4e684fbd38b", + "rev": "736734245b9d386d3323acc97f46f585ff273bae", "type": "github" }, "original": { @@ -334,11 +445,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1745503349, - "narHash": "sha256-bUGjvaPVsOfQeTz9/rLTNLDyqbzhl0CQtJJlhFPhIYw=", + "lastModified": 1745392233, + "narHash": "sha256-xmqG4MZArM1JNxPJ33s0MtuBzgnaCO9laARoU3AfP8E=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "f7bee55a5e551bd8e7b5b82c9bc559bc50d868d1", + "rev": "8bf8a2a0822365bd8f44fd1a19d7ed0a1d629d64", "type": "github" }, "original": { @@ -390,11 +501,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1745391562, - "narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=", + "lastModified": 1745234285, + "narHash": "sha256-GfpyMzxwkfgRVN0cTGQSkTC0OHhEkv3Jf6Tcjm//qZ0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7", + "rev": "c11863f1e964833214b767f4a369c6e6a7aba141", "type": "github" }, "original": { @@ -419,6 +530,73 @@ "type": "indirect" } }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts_4", + "nixpkgs": [ + "nixpkgs" + ], + "nuschtosSearch": "nuschtosSearch" + }, + "locked": { + "lastModified": 1745415369, + "narHash": "sha256-XcbDjFXADOGDRXq9da4gvlKBLuMdDQ32ZSem5kf9MmE=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "78f6ff036918dcb6369f8b48abcef6a8788096e8", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nuschtos": { + "inputs": { + "flake-utils": "flake-utils_2", + "ixx": "ixx_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745046075, + "narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=", + "owner": "NuschtOS", + "repo": "search", + "rev": "066afe8643274470f4a294442aadd988356a478f", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils", + "ixx": "ixx", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745046075, + "narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=", + "owner": "NuschtOS", + "repo": "search", + "rev": "066afe8643274470f4a294442aadd988356a478f", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, "root": { "inputs": { "disko": "disko", @@ -430,6 +608,8 @@ "nixos-facter-modules": "nixos-facter-modules_2", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", + "nixvim": "nixvim", + "nuschtos": "nuschtos", "snm": "snm", "sops-nix": "sops-nix_2", "srvos": "srvos" @@ -445,11 +625,11 @@ "nixpkgs-24_11": "nixpkgs-24_11" }, "locked": { - "lastModified": 1745416927, - "narHash": "sha256-jg725STLRgsIAgrvjbRJQEP0F0w+rmvDJ64EN65p6EI=", + "lastModified": 1745164839, + "narHash": "sha256-+0T3pBcl5BD3qHB2nGfwwnRhb4EeNlJEI0BUm5fXPmE=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "ab52efd622a9f7dca269a49edbbea6b6b7294f57", + "rev": "42651ce2d337921c99ae0c293ed9af49f7a89c6a", "type": "gitlab" }, "original": { @@ -539,6 +719,36 @@ "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" + } + }, + "systems_3": { + "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": [ diff --git a/flake.nix b/flake.nix index b72e86b..91c947e 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,14 @@ url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixvim = { + url = "github:nix-community/nixvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nuschtos = { + url = "github:NuschtOS/search"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # Packages firefox-addons = { @@ -58,6 +66,7 @@ pkgs' = system: nixpkgs.legacyPackages.${system}; in { + modules.default = import ./modules; nixosModules.default = import ./nixos-modules; homeManagerModules.default = import ./home-modules; nixosConfigurations = import ./systems { inherit self inputs nixpkgs; }; diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..1dde18d --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + imports = [ ./neovim ]; +} diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix new file mode 100644 index 0000000..14092a8 --- /dev/null +++ b/modules/neovim/default.nix @@ -0,0 +1,26 @@ +{ config, lib, ... }: + +let + cfg = config.jopejoe1.neovim; +in +{ + options.jopejoe1.neovim = { + enable = lib.mkEnableOption "Enable neovim"; + }; + + config = lib.mkIf cfg.enable { + programs.nixvim = { + enable = true; + viAlias = true; + vimAlias = true; + colorschemes.catppuccin = { + enable = true; + settings.flavour = "frappe"; + }; + plugins = { + treesitter.enable = true; + direnv.enable = true; + }; + }; + }; +} diff --git a/nixos-modules/default.nix b/nixos-modules/default.nix index 082a848..477ced8 100644 --- a/nixos-modules/default.nix +++ b/nixos-modules/default.nix @@ -25,6 +25,8 @@ self.inputs.disko.nixosModules.disko self.inputs.home-manager.nixosModules.home-manager self.inputs.sops-nix.nixosModules.sops + self.inputs.nixvim.nixosModules.nixvim self.inputs.nixos-facter-modules.nixosModules.facter + self.outputs.modules.default ]; } diff --git a/nixos-modules/doc/default.nix b/nixos-modules/doc/default.nix index 41936a1..da19376 100644 --- a/nixos-modules/doc/default.nix +++ b/nixos-modules/doc/default.nix @@ -27,7 +27,7 @@ in }; man = { enable = true; - generateCaches = false; + generateCaches = true; }; }; environment.systemPackages = with pkgs; [ diff --git a/nixos-modules/keyboard/default.nix b/nixos-modules/keyboard/default.nix index c1378f4..852759e 100644 --- a/nixos-modules/keyboard/default.nix +++ b/nixos-modules/keyboard/default.nix @@ -14,7 +14,7 @@ in layout = lib.mkOption { type = lib.types.str; default = "us"; - description = "Keyboard Layout."; + description = lib.mdDoc "Keyboard Layout."; }; }; diff --git a/systems/hetzner/nginx.nix b/systems/hetzner/nginx.nix index a89c405..cf2179a 100644 --- a/systems/hetzner/nginx.nix +++ b/systems/hetzner/nginx.nix @@ -66,6 +66,65 @@ locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}"; }; + "nix.missing.ninja" = { + forceSSL = true; + enableACME = true; + locations."/".root = self.inputs.nuschtos.packages.${pkgs.stdenv.system}.mkMultiSearch { + scopes = [ + { + modules = [ self.inputs.disko.nixosModules.default ]; + name = "Disko"; + specialArgs.modulesPath = pkgs.path + "/nixos/modules"; + urlPrefix = "https://github.com/nix-community/disko/blob/master/"; + } + { + modules = [ + self.inputs.snm.nixosModules.default + { + mailserver = { + fqdn = "mx.example.com"; + domains = [ "example.com" ]; + dmarcReporting = { + organizationName = "Example Corp"; + domain = "example.com"; + }; + }; + } + ]; + name = "Simple NixOS Mailserver"; + urlPrefix = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/blob/master/"; + } + { + optionsJSON = + (import "${self.inputs.nixpkgs}/nixos/release.nix" { }).options + /share/doc/nixos/options.json; + name = "NixOS"; + urlPrefix = "https://github.com/NixOS/nixpkgs/tree/master/"; + } + { + optionsJSON = + self.inputs.home-manager.packages.${pkgs.stdenv.system}.docs-html.passthru.home-manager-options.nixos + + /share/doc/nixos/options.json; + name = "Home Manager NixOS"; + urlPrefix = "https://github.com/nix-community/home-manager/tree/master/"; + } + { + optionsJSON = + self.inputs.home-manager.packages.${pkgs.stdenv.system}.docs-json + + /share/doc/home-manager/options.json; + optionsPrefix = "home-manager.users."; + name = "Home Manager"; + urlPrefix = "https://github.com/nix-community/home-manager/tree/master/"; + } + { + optionsJSON = + self.inputs.nixvim.packages.${pkgs.stdenv.system}.options-json + /share/doc/nixos/options.json; + optionsPrefix = "programs.nixvim"; + name = "NixVim"; + urlPrefix = "https://github.com/nix-community/nixvim/tree/main/"; + } + ]; + }; + }; "hetzner" = { forceSSL = false; enableACME = false; diff --git a/systems/omoikane/default.nix b/systems/omoikane/default.nix index 809509f..6799410 100644 --- a/systems/omoikane/default.nix +++ b/systems/omoikane/default.nix @@ -47,6 +47,7 @@ enable = true; layout = "us"; }; + neovim.enable = true; user = { jopejoe1.enable = true; root.enable = true;