From f3e22a2c9470da81821ecdf1f0ed54a0d0c90a56 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 22 Jul 2024 11:16:24 +0200 Subject: [PATCH 01/12] feat: adds `iamb` --- modules/home/packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/packages.nix b/modules/home/packages.nix index 9cf040b..370b0aa 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -28,6 +28,7 @@ wineWowPackages.wayland element-desktop-wayland tut + iamb spotify thunderbird neofetch From 0d1622b65ed118c673b7ae53d7c689216038b762 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 22 Jul 2024 11:16:41 +0200 Subject: [PATCH 02/12] fix: comply with new nixos thingies --- modules/core/yubikey.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/yubikey.nix b/modules/core/yubikey.nix index 8908c68..4beff35 100644 --- a/modules/core/yubikey.nix +++ b/modules/core/yubikey.nix @@ -7,7 +7,7 @@ security.pam = { u2f = { enable = true; - cue = true; + settings.cue = true; control = "sufficient"; }; From 1b79aa0860a876cb07baace473ef5af54a703cc9 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 22 Jul 2024 11:17:32 +0200 Subject: [PATCH 03/12] feat: adds back stuff i didnt need on server --- modules/core/default.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/core/default.nix b/modules/core/default.nix index b7b9e22..428978e 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -1,19 +1,19 @@ { ... }: { imports = - # [(import ./bootloader.nix)] - [(import ./hardware.nix)] - # ++ [(import ./xserver.nix)] + [(import ./bootloader.nix)] + ++ [(import ./hardware.nix)] + ++ [(import ./xserver.nix)] ++ [(import ./network.nix)] - # ++ [(import ./pipewire.nix)] + ++ [(import ./pipewire.nix)] ++ [(import ./program.nix)] ++ [(import ./sshd.nix)] ++ [(import ./security.nix)] ++ [(import ./services.nix)] ++ [(import ./system.nix)] - ++ [(import ./user.nix)]; - # ++ [(import ./bluetooth.nix)] - # ++ [(import ./yubikey.nix)] - # ++ [(import ./steam.nix)] - # ++ [(import ./wayland.nix)]; + ++ [(import ./user.nix)] + ++ [(import ./bluetooth.nix)] + ++ [(import ./yubikey.nix)] + ++ [(import ./steam.nix)] + ++ [(import ./wayland.nix)]; } From c39b27c44047c3e07477e9bd5359d9f1c3910d97 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 22 Jul 2024 14:14:44 +0200 Subject: [PATCH 04/12] feat: adds translate cli --- modules/home/packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/packages.nix b/modules/home/packages.nix index 370b0aa..94cf843 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -1,6 +1,7 @@ { inputs, pkgs, ... }: { home.packages = with pkgs; [ + translate-shell # Google Translate but in the CLI wireguard-tools # VPN connections openresolv # required for wireguard-tools pwgen From 2b6b4b716026e8aaa561d3bcaccfd75e123ccf5e Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 22 Jul 2024 14:44:12 +0200 Subject: [PATCH 05/12] feat: adds `neovim`? --- modules/home/packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/packages.nix b/modules/home/packages.nix index 94cf843..a7c3076 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -59,5 +59,6 @@ xdg-utils xxd inputs.alejandra.defaultPackage.${system} + inputs.nixvim.defaultPackage.${system} ]; } From 14fccf2a7eab40aa9bccfb4f06522eed60b47e97 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 22 Jul 2024 14:44:20 +0200 Subject: [PATCH 06/12] feat: adds `neovim` to violet too --- modules/home/packages.violet.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/packages.violet.nix b/modules/home/packages.violet.nix index 883cada..8baf09f 100644 --- a/modules/home/packages.violet.nix +++ b/modules/home/packages.violet.nix @@ -29,5 +29,6 @@ wget xxd inputs.alejandra.defaultPackage.${system} + inputs.nixvim.defaultPackage.${system} ]; } From c75f5c129afc51a39659214b615c6a63690f45e0 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 22 Jul 2024 14:44:26 +0200 Subject: [PATCH 07/12] feat: adds `neovim` to flake --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index da203c2..a4028e6 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,8 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nur.url = "github:nix-community/NUR"; + + nixvim.url = "github:ahwxorg/nixvim-config"; hypr-contrib.url = "github:hyprwm/contrib"; hyprpicker.url = "github:hyprwm/hyprpicker"; From 0afd4f29235d3f4fa8210c4c370a5632b1e1a3b2 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 22 Jul 2024 14:45:44 +0200 Subject: [PATCH 08/12] feat: disable `neovim` from within the repo itself --- modules/home/nvim.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/nvim.nix b/modules/home/nvim.nix index 8c526a9..e0b493f 100644 --- a/modules/home/nvim.nix +++ b/modules/home/nvim.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { programs.neovim = { - enable = true; - vimAlias = true; + enable = false; + vimAlias = false; }; } From 09a24240491da6096922fccc0fef9bf70a9823b2 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 22 Jul 2024 14:47:05 +0200 Subject: [PATCH 09/12] flake: update --- flake.lock | 322 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 322 insertions(+) diff --git a/flake.lock b/flake.lock index 48e23e4..07ab8da 100644 --- a/flake.lock +++ b/flake.lock @@ -97,6 +97,29 @@ "type": "github" } }, + "devshell": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717408969, + "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", + "owner": "numtide", + "repo": "devshell", + "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "fenix": { "inputs": { "nixpkgs": [ @@ -119,6 +142,20 @@ "type": "github" } }, + "flake-compat": { + "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-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -137,6 +174,64 @@ "type": "github" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "flakeCompat": { "flake": false, "locked": { @@ -153,6 +248,62 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": [ + "nixvim", + "nixvim", + "flake-compat" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1720524665, + "narHash": "sha256-ni/87oHPZm6Gv0ECYxr1f6uxB0UKBWJ6HvS7lwLU6oY=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "8d6a17d0cdf411c55f12602624df6368ad86fac1", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixvim", + "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": [ @@ -194,6 +345,28 @@ "type": "github" } }, + "home-manager_3": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1720734513, + "narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "90ae324e2c56af10f20549ab72014804a3064c7f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "hypr-contrib": { "inputs": { "nixpkgs": "nixpkgs_2" @@ -411,6 +584,28 @@ "url": "https://iceshrimp.dev/iceshrimp/packaging" } }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1720845312, + "narHash": "sha256-yPhAsJTpyoIPQZJGC8Fw8W2lAXyhLoTn+HP20bmfkfk=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "5ce8503cf402cf76b203eba4b7e402bea8e44abc", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, "nix-gaming": { "inputs": { "flake-parts": "flake-parts", @@ -458,6 +653,18 @@ "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" } }, + "nixpkgs-lib_2": { + "locked": { + "lastModified": 1719876945, + "narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1712163089, @@ -538,6 +745,83 @@ "type": "github" } }, + "nixpkgs_7": { + "locked": { + "lastModified": 1721379653, + "narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1720768451, + "narHash": "sha256-EYekUHJE2gxeo2pM/zM9Wlqw1Uw2XTJXOSAO79ksc4Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_7", + "nixvim": "nixvim_2" + }, + "locked": { + "lastModified": 1721648522, + "narHash": "sha256-G5s2VV9tVMaqI7Bgqf4DWPzImqwHBqWi6XeJsPipM38=", + "owner": "ahwxorg", + "repo": "nixvim-config", + "rev": "9cacf44f8915fd4d1e8107a16afac3ceaae63b84", + "type": "github" + }, + "original": { + "owner": "ahwxorg", + "repo": "nixvim-config", + "type": "github" + } + }, + "nixvim_2": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts_3", + "git-hooks": "git-hooks", + "home-manager": "home-manager_3", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs_8", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1721592379, + "narHash": "sha256-pJzkjy4+sM9+5IfrZMTWAiB0m/m4eiV4fmnqxtVNonI=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "d2f733efb4962903b77af330c4c03a63f2f72968", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, "nur": { "locked": { "lastModified": 1721032588, @@ -566,6 +850,7 @@ "iceshrimp": "iceshrimp", "nix-gaming": "nix-gaming", "nixpkgs": "nixpkgs_6", + "nixvim": "nixvim", "nur": "nur" } }, @@ -616,6 +901,43 @@ "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": [ + "nixvim", + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1720818892, + "narHash": "sha256-f52x9srIcqQm1Df3T+xYR5P6VfdnDFa2vkkcLhlTp6U=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "5b002f8a53ed04c1a4177e7b00809d57bd2c696f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "xdph": { "inputs": { "hyprland-protocols": "hyprland-protocols", From 102157ec5be4c86499f364a1a90fdf22ac8c6f3a Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 22 Jul 2024 15:10:02 +0200 Subject: [PATCH 10/12] fix: use correct syntax --- modules/home/packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/packages.nix b/modules/home/packages.nix index a7c3076..9dd43da 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -59,6 +59,6 @@ xdg-utils xxd inputs.alejandra.defaultPackage.${system} - inputs.nixvim.defaultPackage.${system} + inputs.nixvim.packages.${pkgs.system}.default ]; } From 9cbf9cd8628edb4d8ea29b886023104c568f9d6a Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 22 Jul 2024 15:19:52 +0200 Subject: [PATCH 11/12] feat: remove `nvim` to `nix run` etc --- modules/home/zsh.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix index ad797d6..c6f462d 100644 --- a/modules/home/zsh.nix +++ b/modules/home/zsh.nix @@ -54,7 +54,8 @@ yt-dlp-audio = "yt-dlp -f 'ba' -x --audio-format mp3"; open = "xdg-open"; tree = "eza --icons --tree --group-directories-first"; - nvim = "nix run /home/liv/Development/nixvim --"; + # nvim = "nix run /home/liv/Development/nixvim --"; + vim = "nvim"; doas = "sudo"; # NixOS From 1e5f68b267f3ee318bb21d8ef96e31dae6da2f3c Mon Sep 17 00:00:00 2001 From: Ahwx Date: Fri, 26 Jul 2024 14:02:03 +0200 Subject: [PATCH 12/12] feat: adds older zsh thingies --- modules/home/zsh.nix | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix index c6f462d..2c54dc8 100644 --- a/modules/home/zsh.nix +++ b/modules/home/zsh.nix @@ -25,6 +25,72 @@ HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE = 1; }; + initExtra = '' + autoload -U add-zsh-hook + autoload -U compinit + zmodload zsh/complist + autoload -U edit-command-line + zmodload zsh/zpty + # Corrections + setopt correct + + # History stuff + setopt append_history + setopt inc_append_history + setopt share_history + setopt extended_history + setopt hist_reduce_blanks + setopt hist_ignore_space + + # Disable annoying beep + setopt no_beep + # Fix comments + setopt interactive_comments + + bindkey '^[[H' beginning-of-line # Home + bindkey '^[[F' end-of-line # End + bindkey "^[[1;5C" forward-word # Ctrl+Right + bindkey "^[[1;5D" backward-word # Ctrl+Left + # Menu selection + bindkey -M menuselect '^@' accept-and-infer-next-history # Ctrl+Space + # Make Alt-Backspace delete till ~!#$%^&*(){}[]<>?+; the way OMZ does + backward-delete-word-but-better () { + local WORDCHARS='~!#$%^&*(){}[]<>?+;' + zle backward-delete-word + } + zle -N backward-delete-word-but-better + + bindkey '\e^?' backward-delete-word-but-better + + # Completions + # + # Cache so it's a bit quicker + zstyle ':completion:*' use-cache on + zstyle ':completion:*' cache-path "$XDG_CACHE_HOME/zsh/.zcompcache" + # File list like ls -l + zstyle ':completion:*' file-list all + # Glorious menu + zstyle ':completion:*' menu select + # Always tab complete + zstyle ':completion:*' insert-tab false + # Comments + zstyle ':completion:*' verbose yes + # Tab key behaviour + zstyle ':autocomplete:tab:*' widget-style menu-complete + # Make set // to be / instead of default /*/ + zstyle ':completion:*' squeeze-slashes true + # Complete options + zstyle ':completion:*' complete-options true + # Complete partial words (such as 3912 > _DSC3912.JPG) + zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + # Move around completion menu with Vi keys + bindkey -M menuselect 'h' vi-backward-char + bindkey -M menuselect 'k' vi-up-line-or-history + bindkey -M menuselect 'j' vi-down-line-or-history + bindkey -M menuselect 'l' vi-forward-char + + ''; + # setOptions = [ # # Corrections # "CORRECT"