From 044061840e3c20413d2bc8a91b1d46756516584a Mon Sep 17 00:00:00 2001 From: CherryKitten Date: Sun, 24 Mar 2024 19:02:25 +0100 Subject: [PATCH] mew --- flake.nix | 102 +++++++++++++++++-------------- modules/common/security.nix | 3 + modules/nvim/default.nix | 2 +- modules/nvim/keymap.lua | 5 +- modules/nvim/plugins/conform.lua | 2 +- modules/users/sammy.nix | 2 +- 6 files changed, 65 insertions(+), 51 deletions(-) diff --git a/flake.nix b/flake.nix index 541ef9f..46ad1ba 100644 --- a/flake.nix +++ b/flake.nix @@ -8,57 +8,65 @@ }; }; - outputs = - inputs @ { self - , nixpkgs - , nixpkgs-unstable - , home-manager - , ... - }: - let - system = "x86_64-linux"; - in - { - formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; - colmena = { - meta = { - nixpkgs = import nixpkgs { - system = "x86_64-linux"; - overlays = [ ]; - }; - }; - - bengal = { name, nodes, pkgs, ... }: { - imports = [ - ./hosts/${name}/configuration.nix - ./modules/common - (import "${home-manager}/nixos") - ]; - - deployment = { - targetUser = "sammy"; - allowLocalDeployment = true; - }; - }; - - maine-coon = { name, nodes, pkgs, ... }: { - imports = [ - ./hosts/${name}/configuration.nix - ./modules/common - (import "${home-manager}/nixos") - ]; - deployment = { - targetHost = "maine-coon"; - allowLocalDeployment = true; - }; + outputs = inputs @ { + self, + nixpkgs, + nixpkgs-unstable, + home-manager, + ... + }: let + system = "x86_64-linux"; + in { + formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; + colmena = { + meta = { + nixpkgs = import nixpkgs { + system = "x86_64-linux"; + overlays = []; }; }; - nixosConfigurations.test = nixpkgs.lib.nixosSystem { - inherit system; - modules = [ - ./hosts/test-vm/configuration.nix + + bengal = { + name, + nodes, + pkgs, + ... + }: { + imports = [ + ./hosts/${name}/configuration.nix + ./modules/common (import "${home-manager}/nixos") ]; + + deployment = { + targetUser = "sammy"; + allowLocalDeployment = true; + }; + }; + + maine-coon = { + name, + nodes, + pkgs, + ... + }: { + imports = [ + ./hosts/${name}/configuration.nix + ./modules/common + (import "${home-manager}/nixos") + ]; + deployment = { + targetHost = "maine-coon"; + allowLocalDeployment = true; + }; }; }; + nixosConfigurations.test = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + ./hosts/test-vm/configuration.nix + (import "${home-manager}/nixos") + ]; + }; + }; } diff --git a/modules/common/security.nix b/modules/common/security.nix index f47b547..a3d7ff1 100644 --- a/modules/common/security.nix +++ b/modules/common/security.nix @@ -5,6 +5,9 @@ enable = true; banner = "nyanya :3"; logLevel = "VERBOSE"; + extraConfig = '' + StreamLocalBindUnlink yes + ''; settings = { PermitRootLogin = "no"; PasswordAuthentication = false; diff --git a/modules/nvim/default.nix b/modules/nvim/default.nix index 0fb2698..d21b22c 100644 --- a/modules/nvim/default.nix +++ b/modules/nvim/default.nix @@ -43,7 +43,7 @@ { plugin = catppuccin-nvim; - config = "colorscheme catppuccin"; + config = "colorscheme catppuccin-mocha"; } { diff --git a/modules/nvim/keymap.lua b/modules/nvim/keymap.lua index 960c5a4..7c871fb 100644 --- a/modules/nvim/keymap.lua +++ b/modules/nvim/keymap.lua @@ -37,6 +37,9 @@ map({ "i", "n" }, "", "noh", { desc = "Escape and clear hlsea -- save file map({ "i", "x", "n", "s" }, "", "w", { desc = "Save file" }) +-- quit all +map("n", "qq", "qa", { desc = "Quit all" }) + --keywordprg map("n", "K", "norm! K", { desc = "Keywordprg" }) @@ -89,6 +92,6 @@ map("n", "be", map({"n", "v"}, "cf", function() - require("conform").format() + require("conform").format({ async = true, lsp_fallback = true, range = range }) end, { desc = "Format Code" } ) diff --git a/modules/nvim/plugins/conform.lua b/modules/nvim/plugins/conform.lua index 6a4c4f6..0ce9e2a 100644 --- a/modules/nvim/plugins/conform.lua +++ b/modules/nvim/plugins/conform.lua @@ -8,5 +8,5 @@ require("conform").setup({ ["*"] = { "codespell" }, }, log_level = vim.log.levels.ERROR, - notify_on_error = true, + notify_on_error = true, }) diff --git a/modules/users/sammy.nix b/modules/users/sammy.nix index 629c782..748ace6 100644 --- a/modules/users/sammy.nix +++ b/modules/users/sammy.nix @@ -12,8 +12,8 @@ bat lsd gnupg - kitty tmux + colmena ]; programs = {