diff --git a/flake.lock b/flake.lock index 2430b8d..987a4a5 100644 --- a/flake.lock +++ b/flake.lock @@ -3,15 +3,16 @@ "Comment-nvim-src": { "flake": false, "locked": { - "lastModified": 1686546603, - "narHash": "sha256-XM9yhp+SGxfAOdN/eDunzM0TMoCJhVth3wpFKNCGf3g=", + "lastModified": 1681214440, + "narHash": "sha256-48hy+hiaDJLlgWqC7IeZI3dT+VwWkRo4atQbyPxu/ys=", "owner": "numToStr", "repo": "Comment.nvim", - "rev": "176e85eeb63f1a5970d6b88f1725039d85ca0055", + "rev": "e51f2b142d88bb666dcaa77d93a07f4b419aca70", "type": "github" }, "original": { "owner": "numToStr", + "ref": "v0.8.0", "repo": "Comment.nvim", "type": "github" } @@ -19,15 +20,16 @@ "bufferline-nvim-src": { "flake": false, "locked": { - "lastModified": 1687007546, - "narHash": "sha256-NRuk9RBj7etUv+2mBlJ3lTbJCRkYmluqZ5V2t78ile4=", + "lastModified": 1687763763, + "narHash": "sha256-wbOeylzjjScQXkrDbBU2HtrOZrp2YUK+wQ2aOkgxmRQ=", "owner": "akinsho", "repo": "bufferline.nvim", - "rev": "60734264a8655a7db3595159fb50076dc24c2f2c", + "rev": "bf2f6b7edd0abf6b0732f5e5c0a8f30e51611c75", "type": "github" }, "original": { "owner": "akinsho", + "ref": "v4.2.0", "repo": "bufferline.nvim", "type": "github" } @@ -371,15 +373,16 @@ "nvim-lspconfig-src": { "flake": false, "locked": { - "lastModified": 1687509658, - "narHash": "sha256-t3b57T/Pc0F+rLe954gNk7cfi0L76eTrDOfiNCt14Yo=", + "lastModified": 1675639052, + "narHash": "sha256-B8IgpypxzCACZ5VcqM6KiWyClaN+KrmemtkwMznmj5Y=", "owner": "neovim", "repo": "nvim-lspconfig", - "rev": "b6b34b9acf84949f0ac1c00747765e62b81fb38d", + "rev": "255e07ce2a05627d482d2de77308bba51b90470c", "type": "github" }, "original": { "owner": "neovim", + "ref": "v0.1.6", "repo": "nvim-lspconfig", "type": "github" } @@ -403,16 +406,16 @@ "nvim-treesitter-src": { "flake": false, "locked": { - "lastModified": 1677248832, - "narHash": "sha256-4TmtrufxjVpnSNfFpn6GQStEhq3KQb3JfmfMEJnSI8k=", + "lastModified": 1681121236, + "narHash": "sha256-iPsPDLhVKJ14iP1/2cCgcY9SCKK/DQz9Y0mQB1DqNiM=", "owner": "nvim-treesitter", "repo": "nvim-treesitter", - "rev": "b401b7423d18c78371c5ff1a5f8d3c14292b2047", + "rev": "cc360a9beb1b30d172438f640e2c3450358c4086", "type": "github" }, "original": { "owner": "nvim-treesitter", - "ref": "v0.8.5.2", + "ref": "v0.9.0", "repo": "nvim-treesitter", "type": "github" } @@ -500,15 +503,16 @@ "telescope-nvim-src": { "flake": false, "locked": { - "lastModified": 1687382735, - "narHash": "sha256-0wsj/v2ZoY8yFMENSB32WYJx8kHd+QtQHt9aHicZTM0=", + "lastModified": 1686302912, + "narHash": "sha256-fV3LLRwAPykVGc4ImOnUSP+WTrPp9Ad9OTfBJ6wqTMk=", "owner": "nvim-telescope", "repo": "telescope.nvim", - "rev": "ffe35cb433192fcb5080b557c1aef14d37092035", + "rev": "776b509f80dd49d8205b9b0d94485568236d1192", "type": "github" }, "original": { "owner": "nvim-telescope", + "ref": "0.1.2", "repo": "telescope.nvim", "type": "github" } @@ -532,15 +536,16 @@ "toggleterm-nvim-src": { "flake": false, "locked": { - "lastModified": 1685434137, - "narHash": "sha256-Qjhod1cmzAYuMl6Z0JlYtOq8CLdmQJ9esCwmynuzkYs=", + "lastModified": 1685434104, + "narHash": "sha256-oiCnBrvft6XxiQtQH8E4F842xhh348SaTpHzaeb+iDY=", "owner": "akinsho", "repo": "toggleterm.nvim", - "rev": "cf146a267a6a7db62b1e2aff40414b20081048a1", + "rev": "95204ece0f2a54c89c4395295432f9aeedca7b5f", "type": "github" }, "original": { "owner": "akinsho", + "ref": "v2.7.0", "repo": "toggleterm.nvim", "type": "github" } diff --git a/flake.nix b/flake.nix index e3df0ee..df2924c 100644 --- a/flake.nix +++ b/flake.nix @@ -58,7 +58,7 @@ # Neovim plugins nvim-lspconfig-src = { - url = "github:neovim/nvim-lspconfig"; + url = "github:neovim/nvim-lspconfig/v0.1.6"; flake = false; }; cmp-nvim-lsp-src = { @@ -70,15 +70,15 @@ flake = false; }; Comment-nvim-src = { - url = "github:numToStr/Comment.nvim"; + url = "github:numToStr/Comment.nvim/v0.8.0"; flake = false; }; nvim-treesitter-src = { - url = "github:nvim-treesitter/nvim-treesitter/v0.8.5.2"; + url = "github:nvim-treesitter/nvim-treesitter/v0.9.0"; flake = false; }; telescope-nvim-src = { - url = "github:nvim-telescope/telescope.nvim"; + url = "github:nvim-telescope/telescope.nvim/0.1.2"; flake = false; }; telescope-project-nvim-src = { @@ -86,11 +86,11 @@ flake = false; }; toggleterm-nvim-src = { - url = "github:akinsho/toggleterm.nvim"; + url = "github:akinsho/toggleterm.nvim/v2.7.0"; flake = false; }; bufferline-nvim-src = { - url = "github:akinsho/bufferline.nvim"; + url = "github:akinsho/bufferline.nvim/v4.2.0"; flake = false; }; nvim-tree-lua-src = { @@ -123,6 +123,7 @@ (import ./overlays/neovim-plugins.nix inputs) (import ./overlays/lib.nix) (import ./overlays/calibre-web.nix) + (import ./overlays/disko.nix inputs) ]; # System types to support. @@ -186,15 +187,7 @@ # Programs that can be run by calling this flake apps = forAllSystems (system: - let - pkgs = import nixpkgs { - inherit system; - overlays = overlays ++ [ - (final: prev: { - disko-packaged = inputs.disko.packages.${system}.disko; - }) - ]; - }; + let pkgs = import nixpkgs { inherit system overlays; }; in import ./apps { inherit pkgs; }); # Development environments @@ -207,23 +200,6 @@ buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ]; }; - # Used for cloud and systems development and administration - devops = pkgs.mkShell { - buildInputs = with pkgs; [ - git - terraform - consul - vault - awscli2 - google-cloud-sdk - ansible - kubectl - kubernetes-helm - kustomize - fluxcd - ]; - }; - }); # Templates for starting other projects quickly diff --git a/generators/staff/default.nix b/generators/staff/default.nix index f26632c..3888b28 100644 --- a/generators/staff/default.nix +++ b/generators/staff/default.nix @@ -3,9 +3,7 @@ { inputs, system, overlays, ... }: -with inputs; - -nixos-generators.nixosGenerate { +inputs.nixos-generators.nixosGenerate { inherit system; format = "install-iso"; modules = [{ diff --git a/hosts/flame/default.nix b/hosts/flame/default.nix index c846997..3d249eb 100644 --- a/hosts/flame/default.nix +++ b/hosts/flame/default.nix @@ -6,14 +6,12 @@ { inputs, globals, overlays, ... }: -with inputs; - -nixpkgs.lib.nixosSystem { +inputs.nixpkgs.lib.nixosSystem { system = "aarch64-linux"; specialArgs = { }; modules = [ (removeAttrs globals [ "mail.server" ]) - home-manager.nixosModules.home-manager + inputs.home-manager.nixosModules.home-manager ../../modules/common ../../modules/nixos { @@ -23,7 +21,7 @@ nixpkgs.lib.nixosSystem { server = true; networking.hostName = "flame"; - imports = [ (nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ]; + imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ]; fileSystems."/" = { diff --git a/hosts/hydra/default.nix b/hosts/hydra/default.nix index 97ac13c..aff2ba8 100644 --- a/hosts/hydra/default.nix +++ b/hosts/hydra/default.nix @@ -3,9 +3,7 @@ { inputs, globals, overlays, ... }: -with inputs; - -nixpkgs.lib.nixosSystem { +inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { }; modules = [ @@ -13,20 +11,18 @@ nixpkgs.lib.nixosSystem { ../../modules/nixos ../../modules/wsl globals - wsl.nixosModules.wsl - home-manager.nixosModules.home-manager + inputs.wsl.nixosModules.wsl + inputs.home-manager.nixosModules.home-manager { networking.hostName = "hydra"; nixpkgs.overlays = overlays; - # Set registry to flake packages, used for nix X commands - nix.registry.nixpkgs.flake = nixpkgs; identityFile = "/home/${globals.user}/.ssh/id_ed25519"; gui.enable = false; theme = { colors = (import ../../colorscheme/gruvbox).dark; dark = true; }; - passwordHash = nixpkgs.lib.fileContents ../../password.sha512; + passwordHash = inputs.nixpkgs.lib.fileContents ../../password.sha512; wsl = { enable = true; wslConf.automount.root = "/mnt"; diff --git a/hosts/lookingglass/default.nix b/hosts/lookingglass/default.nix index 8454e53..ea7df5c 100644 --- a/hosts/lookingglass/default.nix +++ b/hosts/lookingglass/default.nix @@ -3,9 +3,7 @@ { inputs, globals, overlays, ... }: -with inputs; - -darwin.lib.darwinSystem { +inputs.darwin.lib.darwinSystem { system = "x86_64-darwin"; specialArgs = { }; modules = [ @@ -16,9 +14,9 @@ darwin.lib.darwinSystem { gitName = "Noah-Masur_1701"; gitEmail = "${user}@take2games.com"; }) - home-manager.darwinModules.home-manager + inputs.home-manager.darwinModules.home-manager { - nixpkgs.overlays = [ firefox-darwin.overlay ] ++ overlays; + nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays; networking.hostName = "lookingglass"; identityFile = "/Users/Noah.Masur/.ssh/id_ed25519"; gui.enable = true; diff --git a/hosts/swan/default.nix b/hosts/swan/default.nix index 70f74e4..87ff2fd 100644 --- a/hosts/swan/default.nix +++ b/hosts/swan/default.nix @@ -3,15 +3,13 @@ { inputs, globals, overlays, ... }: -with inputs; - -nixpkgs.lib.nixosSystem { +inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { }; modules = [ globals - home-manager.nixosModules.home-manager - disko.nixosModules.disko + inputs.home-manager.nixosModules.home-manager + inputs.disko.nixosModules.disko ../../modules/common ../../modules/nixos { diff --git a/hosts/tempest/default.nix b/hosts/tempest/default.nix index c081c0d..fd00134 100644 --- a/hosts/tempest/default.nix +++ b/hosts/tempest/default.nix @@ -3,17 +3,15 @@ { inputs, globals, overlays, ... }: -with inputs; - -nixpkgs.lib.nixosSystem { +inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ globals - home-manager.nixosModules.home-manager + inputs.home-manager.nixosModules.home-manager ../../modules/common ../../modules/nixos { - nixpkgs.overlays = [ nur.overlay ] ++ overlays; + nixpkgs.overlays = overlays; # Hardware physical = true; @@ -55,7 +53,7 @@ nixpkgs.lib.nixosSystem { # Must be prepared ahead identityFile = "/home/${globals.user}/.ssh/id_ed25519"; - passwordHash = nixpkgs.lib.fileContents ../../password.sha512; + passwordHash = inputs.nixpkgs.lib.fileContents ../../password.sha512; # Theming gui.enable = true; @@ -63,8 +61,8 @@ nixpkgs.lib.nixosSystem { colors = (import ../../colorscheme/gruvbox-dark).dark; dark = true; }; - wallpaper = "${wallpapers}/gruvbox/road.jpg"; - gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark"; + wallpaper = "${inputs.wallpapers}/gruvbox/road.jpg"; + gtk.theme.name = inputs.nixpkgs.lib.mkDefault "Adwaita-dark"; # Programs and services charm.enable = true; diff --git a/modules/common/applications/kitty.nix b/modules/common/applications/kitty.nix index 6e22e04..ff69175 100644 --- a/modules/common/applications/kitty.nix +++ b/modules/common/applications/kitty.nix @@ -85,8 +85,7 @@ # Scrollback scrolling_lines = 10000; scrollback_pager_history_size = 10; # MB - scrollback_pager = '' - ${pkgs.neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -''; + scrollback_pager = "${pkgs.neovim}/bin/nvim -c 'normal G'"; # Window window_padding_width = 6; diff --git a/modules/common/neovim/config/syntax.nix b/modules/common/neovim/config/syntax.nix index 6cf4c42..56b8529 100644 --- a/modules/common/neovim/config/syntax.nix +++ b/modules/common/neovim/config/syntax.nix @@ -1,7 +1,17 @@ { pkgs, ... }: { plugins = [ - pkgs.vimPlugins.nvim-treesitter.withAllGrammars + (pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins: + with pkgs.tree-sitter-grammars; [ + tree-sitter-hcl + tree-sitter-python + tree-sitter-lua + tree-sitter-nix + tree-sitter-fish + tree-sitter-toml + tree-sitter-yaml + tree-sitter-json + ])) pkgs.vimPlugins.vim-matchup # Better % jumping in languages pkgs.vimPlugins.nginx-vim pkgs.vimPlugins.vim-helm diff --git a/modules/common/neovim/lua/settings.lua b/modules/common/neovim/lua/settings.lua index 48b6b57..85a865d 100644 --- a/modules/common/neovim/lua/settings.lua +++ b/modules/common/neovim/lua/settings.lua @@ -5,7 +5,7 @@ vim.filetype.add({ pattern = { [".*%.tfvars"] = "hcl", - -- [".*%.tf"] = "hcl", + [".*%.tf"] = "hcl", [".*%.rasi"] = "css", }, }) diff --git a/overlays/disko.nix b/overlays/disko.nix new file mode 100644 index 0000000..fe1d197 --- /dev/null +++ b/overlays/disko.nix @@ -0,0 +1,5 @@ +# Add disko to nixpkgs from its input flake + +inputs: _final: prev: { + disko = inputs.disko.packages.${prev.system}.disko; +}