diff --git a/flake.lock b/flake.lock index 046f65f..4656012 100644 --- a/flake.lock +++ b/flake.lock @@ -90,6 +90,27 @@ "type": "github" } }, + "devshell": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728330715, + "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", + "owner": "numtide", + "repo": "devshell", + "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "ez-configs": { "inputs": { "flake-parts": [ @@ -129,6 +150,36 @@ "type": "github" } }, + "flake-compat_2": { + "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_3": { + "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" @@ -147,6 +198,27 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems_2" @@ -183,6 +255,55 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat_3", + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729104314, + "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "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" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -204,6 +325,28 @@ "type": "github" } }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726989464, + "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.05", + "repo": "home-manager", + "type": "github" + } + }, "libcamera-src": { "flake": false, "locked": { @@ -283,6 +426,27 @@ "type": "github" } }, + "nix-darwin_2": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728901530, + "narHash": "sha256-I9Qd0LnAsEGHtKE9+uVR0iDFmsijWSy7GT0g3jihG4Q=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "a60ac02f9466f85f092e576fd8364dfc4406b5a6", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, "nix-github-actions": { "inputs": { "nixpkgs": [ @@ -396,11 +560,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1727335715, - "narHash": "sha256-1uw3y94dA4l22LkqHRIsb7qr3rV5XdxQFqctINfx8Cc=", + "lastModified": 1729658218, + "narHash": "sha256-9Rg+AqLqvqqJniP/OQB3GtgXoAd8IlazsHp97va042Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "28b5b8af91ffd2623e995e20aee56510db49001a", + "rev": "dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a", "type": "github" }, "original": { @@ -410,6 +574,34 @@ "type": "github" } }, + "nixvim": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat_2", + "flake-parts": "flake-parts_2", + "git-hooks": "git-hooks", + "home-manager": "home-manager_2", + "nix-darwin": "nix-darwin_2", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1729100089, + "narHash": "sha256-B44+e/cYjrzgaDvCNz9TyHQy0q9Q6WaDISV57jxejJ8=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "341dbb1b5867adb95d75e6dabef6627eb0eae38e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "nixos-24.05", + "repo": "nixvim", + "type": "github" + } + }, "poetry2nix": { "inputs": { "flake-utils": [ @@ -481,6 +673,7 @@ "nixpkgs": "nixpkgs", "nixpkgs-darwin": "nixpkgs-darwin", "nixpkgs-unstable": "nixpkgs-unstable", + "nixvim": "nixvim", "raspberry-pi-nix": "raspberry-pi-nix" } }, @@ -667,6 +860,27 @@ "type": "github" } }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729242555, + "narHash": "sha256-6jWSWxv2crIXmYSEb3LEVsFkCkyVHNllk61X4uhqfCs=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "d986489c1c757f6921a48c1439f19bfb9b8ecab5", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "u-boot-src": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 74454d2..2426f15 100644 --- a/flake.nix +++ b/flake.nix @@ -35,9 +35,11 @@ nix-index-database.url = "github:nix-community/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; + + nixvim = { url = "github:nix-community/nixvim/nixos-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = inputs@{ self, flake-parts, ... }: + outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } { imports = [ inputs.ez-configs.flakeModule diff --git a/home-configurations/peteresselius.nix b/home-configurations/peteresselius.nix index b07d577..0f0f1ff 100644 --- a/home-configurations/peteresselius.nix +++ b/home-configurations/peteresselius.nix @@ -35,6 +35,7 @@ in minio = true; task = true; trino = true; + google-cloud = true; }; programs.fish.shellInit = '' diff --git a/home-modules/default.nix b/home-modules/default.nix index 8dce722..70e8f46 100644 --- a/home-modules/default.nix +++ b/home-modules/default.nix @@ -6,6 +6,7 @@ ezModules.agenix ezModules.terminal ezModules.nix + ezModules.neovim ]; inherit (osConfig) context; diff --git a/home-modules/neovim.nix b/home-modules/neovim.nix new file mode 100755 index 0000000..9c25bd9 --- /dev/null +++ b/home-modules/neovim.nix @@ -0,0 +1,45 @@ +{ inputs, ... }: + +{ + imports = [ inputs.nixvim.homeManagerModules.nixvim ]; + + programs.nixvim = { + enable = true; + + vimAlias = true; + + opts = { + number = true; + shiftwidth = 2; + }; + + plugins = { + airline.enable = true; + + bufferline.enable = true; + + telescope.enable = true; + + treesitter.enable = true; + + lsp = { + enable = true; + + servers = { + nixd.enable = true; + }; + }; + + cmp = { + enable = true; + autoEnableSources = true; + settings.sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "buffer"; } + ]; + }; + }; + colorschemes.vscode.enable = true; + }; +} diff --git a/home-modules/profiles/tools/work.nix b/home-modules/profiles/tools/work.nix index 4744f35..3d31623 100644 --- a/home-modules/profiles/tools/work.nix +++ b/home-modules/profiles/tools/work.nix @@ -11,6 +11,7 @@ in minio = lib.mkEnableOption "Install minio packages"; task = lib.mkEnableOption "Install task tab completion"; trino = lib.mkEnableOption "Install trino packages"; + google-cloud = lib.mkEnableOption "Install google cloud packages"; }; config = mkMerge [ @@ -72,5 +73,11 @@ in trino-cli ]; }) + + (mkIf cfg.google-cloud { + home.packages = with pkgs; [ + google-cloud-sdk + ]; + }) ]; } diff --git a/nixos-configurations/vm.nix b/nixos-configurations/vm.nix index 08f91a2..3ebce3a 100644 --- a/nixos-configurations/vm.nix +++ b/nixos-configurations/vm.nix @@ -13,4 +13,11 @@ ezModules.sshd ezModules.user-peteresselius ]; + + programs.nix-ld.enable = true; + nix.settings.extra-sandbox-paths = [ "/lib" ]; + boot.binfmt.emulatedSystems = ["x86_64-linux"]; + nix.settings.sandbox = "relaxed"; + + virtualisation.docker.enable = true; } diff --git a/nixos-modules/user-peteresselius.nix b/nixos-modules/user-peteresselius.nix index b6478e8..f80089a 100644 --- a/nixos-modules/user-peteresselius.nix +++ b/nixos-modules/user-peteresselius.nix @@ -4,7 +4,7 @@ users.users.peteresselius = { isNormalUser = true; description = "Peter Esselius"; - extraGroups = [ "wheel" ]; + extraGroups = [ "wheel" "docker" ]; shell = pkgs.fish; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFMdasDSm/XlOpv15asMENnQ/E9W9rXExBcUAVd/G6Mo"