From 463759c7ef52753bf871269a011083293c1b9ea6 Mon Sep 17 00:00:00 2001 From: Matthew Ess Date: Wed, 5 May 2021 11:21:02 -0400 Subject: [PATCH] Ch-ch-ch-ch-changes --- cachix/fenix.nix | 12 +++++++++ cachix/ghcide-nix.nix | 8 ------ cachix/hercules-ci.nix | 8 ------ cachix/iohk.nix | 7 ----- cachix/miso-haskell.nix | 8 ------ cachix/neovim-nightly.nix | 8 ------ cachix/nix-community.nix | 12 +++++++++ cachix/nix-tools.nix | 7 ----- cachix/pynchon.nix | 7 ----- cachix/todo-cli.nix | 7 ----- hm-configs/files-all.nix | 2 +- hm-configs/files.nix | 1 + hm-configs/fish.nix | 21 ++++++++------- hm-configs/i3.nix | 8 +++--- machines/nixpad/configuration.nix | 7 +++++ machines/vostok-1/configuration.nix | 9 ------- profiles/common.nix | 1 + profiles/graphical.nix | 1 - profiles/laptop.nix | 6 +++-- profiles/local.nix | 17 +++++++++--- services/vpn.nix | 5 +++- users/mat-hm-laptop.nix | 36 ++++++++++++++++++-------- users/mat-hm.nix | 40 ++++++++++++++++++++++------- 23 files changed, 129 insertions(+), 109 deletions(-) create mode 100644 cachix/fenix.nix delete mode 100644 cachix/ghcide-nix.nix delete mode 100644 cachix/hercules-ci.nix delete mode 100644 cachix/iohk.nix delete mode 100644 cachix/miso-haskell.nix delete mode 100644 cachix/neovim-nightly.nix create mode 100644 cachix/nix-community.nix delete mode 100644 cachix/nix-tools.nix delete mode 100644 cachix/pynchon.nix delete mode 100644 cachix/todo-cli.nix delete mode 100644 machines/vostok-1/configuration.nix diff --git a/cachix/fenix.nix b/cachix/fenix.nix new file mode 100644 index 0000000..4ebc9c6 --- /dev/null +++ b/cachix/fenix.nix @@ -0,0 +1,12 @@ + +{ + nix = { + binaryCaches = [ + "https://fenix.cachix.org" + ]; + binaryCachePublicKeys = [ + "fenix.cachix.org-1:SVfCRUmFZ8kdAjJKShEYoyWHb/M0pxVkCjGXsFDHLk4=" + ]; + }; +} + \ No newline at end of file diff --git a/cachix/ghcide-nix.nix b/cachix/ghcide-nix.nix deleted file mode 100644 index 5fa74de..0000000 --- a/cachix/ghcide-nix.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - nix = { - binaryCaches = [ "https://ghcide-nix.cachix.org" ]; - binaryCachePublicKeys = [ - "ghcide-nix.cachix.org-1:ibAY5FD+XWLzbLr8fxK6n8fL9zZe7jS+gYeyxyWYK5c=" - ]; - }; -} diff --git a/cachix/hercules-ci.nix b/cachix/hercules-ci.nix deleted file mode 100644 index 5fa4f78..0000000 --- a/cachix/hercules-ci.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - nix = { - binaryCaches = [ "https://hercules-ci.cachix.org" ]; - binaryCachePublicKeys = [ - "hercules-ci.cachix.org-1:ZZeDl9Va+xe9j+KqdzoBZMFJHVQ42Uu/c/1/KMC5Lw0=" - ]; - }; -} diff --git a/cachix/iohk.nix b/cachix/iohk.nix deleted file mode 100644 index e59b919..0000000 --- a/cachix/iohk.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - nix = { - binaryCaches = [ "https://iohk.cachix.org" ]; - binaryCachePublicKeys = - [ "iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo=" ]; - }; -} diff --git a/cachix/miso-haskell.nix b/cachix/miso-haskell.nix deleted file mode 100644 index c4698d3..0000000 --- a/cachix/miso-haskell.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - nix = { - binaryCaches = [ "https://miso-haskell.cachix.org" ]; - binaryCachePublicKeys = [ - "miso-haskell.cachix.org-1:6N2DooyFlZOHUfJtAx1Q09H0P5XXYzoxxQYiwn6W1e8=" - ]; - }; -} diff --git a/cachix/neovim-nightly.nix b/cachix/neovim-nightly.nix deleted file mode 100644 index 8f1e534..0000000 --- a/cachix/neovim-nightly.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - nix = { - binaryCaches = [ "https://neovim-nightly.cachix.org" ]; - binaryCachePublicKeys = [ - "neovim-nightly.cachix.org-1:feIoInHRevVEplgdZvQDjhp11kYASYCE2NGY9hNrwxY=" - ]; - }; -} diff --git a/cachix/nix-community.nix b/cachix/nix-community.nix new file mode 100644 index 0000000..885d38b --- /dev/null +++ b/cachix/nix-community.nix @@ -0,0 +1,12 @@ + +{ + nix = { + binaryCaches = [ + "https://nix-community.cachix.org" + ]; + binaryCachePublicKeys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + }; +} + \ No newline at end of file diff --git a/cachix/nix-tools.nix b/cachix/nix-tools.nix deleted file mode 100644 index a043afe..0000000 --- a/cachix/nix-tools.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - nix = { - binaryCaches = [ "https://nix-tools.cachix.org" ]; - binaryCachePublicKeys = - [ "nix-tools.cachix.org-1:ebBEBZLogLxcCvipq2MTvuHlP7ZRdkazFSQsbs0Px1A=" ]; - }; -} diff --git a/cachix/pynchon.nix b/cachix/pynchon.nix deleted file mode 100644 index e9bc374..0000000 --- a/cachix/pynchon.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - nix = { - binaryCaches = [ "https://pynchon.cachix.org" ]; - binaryCachePublicKeys = - [ "pynchon.cachix.org-1:9Cj9t6FxSOQKMkjdd12Q2n7djp8CYBx+J2bIwzwaW+8=" ]; - }; -} diff --git a/cachix/todo-cli.nix b/cachix/todo-cli.nix deleted file mode 100644 index 7e76971..0000000 --- a/cachix/todo-cli.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - nix = { - binaryCaches = [ "https://todo-cli.cachix.org" ]; - binaryCachePublicKeys = - [ "todo-cli.cachix.org-1:4nlgpKFUyaacIwtthY7DJtdvudzZRS5uDu+41xiXFys=" ]; - }; -} diff --git a/hm-configs/files-all.nix b/hm-configs/files-all.nix index 7113832..1927fe4 100644 --- a/hm-configs/files-all.nix +++ b/hm-configs/files-all.nix @@ -17,7 +17,7 @@ matthewess/fish-autovenv ''; ".config/fish/completions/pijul.fish".source = ../assets/pijul.fish; - ".config/fish/completions/systemctl.fish".source = ../assets/systemctl.fish; + # ".config/fish/completions/systemctl.fish".source = ../assets/systemctl.fish; ".config/fish/functions/colortest.fish".source = ../assets/colortest.fish; ".config/fish/functions/mkdcd.fish".text = '' function mkdcd -a target diff --git a/hm-configs/files.nix b/hm-configs/files.nix index be18d33..62e9c29 100644 --- a/hm-configs/files.nix +++ b/hm-configs/files.nix @@ -13,6 +13,7 @@ font_family Fira Code Regular bold_font Fira Code Bold font_size 15.0 + clipboard_control write-clipboard write-primary no-append include ./theme.conf ''; ".config/kitty/theme.conf".source = ../assets/kitty-theme.conf; diff --git a/hm-configs/fish.nix b/hm-configs/fish.nix index 31a4c70..d1d4787 100644 --- a/hm-configs/fish.nix +++ b/hm-configs/fish.nix @@ -17,22 +17,25 @@ alias bigscreen="xrandr --output eDP1 --off --output HDMI2 --auto" alias smallscreen="xrandr --output eDP1 --auto --output HDMI2 --off" - function tmux-ssh -a user -a host + function tmux-ssh -a user -a host -a no_local + if test -z "$no_local" + set host "$host.local" + end set target "$user@$host" - set session "$user-$host" + set session_host (string replace . - "$host" --all) + set session "$user-$session_host" env TERM=tmux-256color ssh $target -t "tmux -2 attach -t $session || tmux -2 new -s $session" end - alias pi="tmux-ssh pi pi" - alias mir="tmux-ssh mat mir" - alias drop=mir - alias soviet="tmux-ssh mat soviet" - alias gagarin="tmux-ssh mat gagarin" - alias yuri=gagarin - alias gaga=gagarin + alias pi="tmux-ssh pi pi y" + alias yuri="tmux-ssh root gagarin" + alias tmssh="tmux-ssh mat" + alias soviet="tmssh soviet y" alias wifi="nmcli r w off; nmcli r w on" alias nixops=~/dev/nixops/result/bin/nixops + + kitty + complete setup fish | source ''; } diff --git a/hm-configs/i3.nix b/hm-configs/i3.nix index e32b534..0cb0585 100644 --- a/hm-configs/i3.nix +++ b/hm-configs/i3.nix @@ -104,6 +104,8 @@ { class = "Firefox"; } { class = "(?i)castor"; } { class = "(?i)lagrange"; } + { title = "Enpass Assistant"; } + { class = "(?i)Vivaldi"; } ]; "2: devel" = [ { class = "(?i)kitty"; } @@ -121,14 +123,14 @@ }; }; extraConfig = '' - exec --no-startup-id firefox + exec --no-startup-id vivaldi exec --no-startup-id kitty exec --no-startup-id Enpass exec --no-startup-id deluged - exec --no-startup-id mullvad-vpn + # exec --no-startup-id mullvad-vpn # exec --no-startup-id slack # exec --no-startup-id nheko # exec --no-startup-id Discord - for_window [class="Firefox"] focus + for_window [class="Vivaldi"] focus ''; } diff --git a/machines/nixpad/configuration.nix b/machines/nixpad/configuration.nix index 0568d2a..e0002ee 100644 --- a/machines/nixpad/configuration.nix +++ b/machines/nixpad/configuration.nix @@ -32,6 +32,13 @@ }; }; + nix = { + package = pkgs.nixFlakes; + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; + # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you diff --git a/machines/vostok-1/configuration.nix b/machines/vostok-1/configuration.nix deleted file mode 100644 index 43a7c5b..0000000 --- a/machines/vostok-1/configuration.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ - - ../profiles/server.nix - ]; - -} diff --git a/profiles/common.nix b/profiles/common.nix index 01999e7..68b1797 100644 --- a/profiles/common.nix +++ b/profiles/common.nix @@ -17,6 +17,7 @@ fish git htop + ripgrep tmux tree unzip diff --git a/profiles/graphical.nix b/profiles/graphical.nix index 0a3e855..5906671 100644 --- a/profiles/graphical.nix +++ b/profiles/graphical.nix @@ -14,7 +14,6 @@ }; services = { - clipmenu.enable = true; geoclue2.enable = true; gvfs.enable = true; xserver = { diff --git a/profiles/laptop.nix b/profiles/laptop.nix index 16e057a..62631ef 100644 --- a/profiles/laptop.nix +++ b/profiles/laptop.nix @@ -14,8 +14,10 @@ # Enable touchpad support. libinput = { enable = true; - naturalScrolling = true; - disableWhileTyping = true; + touchpad = { + naturalScrolling = true; + disableWhileTyping = false; + }; }; }; }; diff --git a/profiles/local.nix b/profiles/local.nix index 1723c62..fbb51d6 100644 --- a/profiles/local.nix +++ b/profiles/local.nix @@ -1,7 +1,16 @@ -{ config, ... }: { +{ config, ... }: + +let local = name: [ "${name}" "${name}.local" ]; + +in { networking.hosts = { - "192.168.1.246" = [ "gagarin.local" ]; - "192.168.1.250" = [ "vostok-1.local" ]; - "192.168.1.165" = [ "pi.hole" ]; + "192.168.1.99" = [ "pi.hole" ]; + "192.168.1.98" = local "gagarin"; + "192.168.1.10" = local "gemini"; + "192.168.1.11" = local "deluge"; + "192.168.1.12" = local "jackett"; + "192.168.1.13" = local "sonarr"; + "192.168.1.14" = local "radarr"; + "192.168.1.15" = local "plex"; }; } diff --git a/services/vpn.nix b/services/vpn.nix index 5f4e802..7d4e9d1 100644 --- a/services/vpn.nix +++ b/services/vpn.nix @@ -1,4 +1,7 @@ { config, pkgs, lib, ... }: { networking.wireguard.enable = true; - services.mullvad-vpn.enable = true; + # services.mullvad-vpn.enable = true; + networking.wg-quick.interfaces = { + wg-mullvad = import ./mullvad.secret.nix; + }; } diff --git a/users/mat-hm-laptop.nix b/users/mat-hm-laptop.nix index c76c8f0..fff927e 100644 --- a/users/mat-hm-laptop.nix +++ b/users/mat-hm-laptop.nix @@ -8,38 +8,48 @@ in { home-manager.users.mat = { pkgs, lib, ... }: { home = { sessionVariables = { - BROWSER = "firefox"; + BROWSER = "vivaldi"; TERMINAL = "kitty"; + CM_LAUNCHER = "rofi"; }; packages = with pkgs; [ # command line utilities asuka bottom + dbus du-dust fzy httpie imagemagick jq + mdcat + neofetch procs unrar + wireguard-tools # graphical applications deluge discord - (dunst.override { dunstify = true; }) + dunst + element-desktop enpass - fractal - firefox kitty + lagrange + # mullvad-vpn + okular signal-desktop slack - # steam + steam + steam-run-native + vivaldi + vivaldi-ffmpeg-codecs + # vivaldi-widevine vlc xfce.thunar xfce.thunar-archive-plugin # graphical utilities clipmenu clipnotify - dmenu # needed for clipmenu gnome3.gnome-disk-utility i3status-rust libappindicator @@ -47,6 +57,7 @@ in { lxappearance rofi xclip + xdg-dbus-proxy ]; file = import ../hm-configs/files.nix; }; @@ -61,9 +72,10 @@ in { }; }; feh.enable = true; - firefox.enable = true; + firefox.enable = false; fish = import ../hm-configs/fish.nix { inherit pkgs; }; + go.enable = false; jq.enable = true; rofi = { enable = true; @@ -75,12 +87,11 @@ in { ssh = { enable = true; matchBlocks = { - "pi".hostname = "192.168.1.165"; + "pi".hostname = "192.168.1.99"; "gagarin" = { - hostname = "192.168.1.246"; + hostname = "gagarin.local"; forwardAgent = true; }; - "mir".hostname = "138.197.58.58"; "soviet".hostname = "soviet.circumlunar.space"; }; }; @@ -91,7 +102,12 @@ in { enable = true; provider = "geoclue2"; }; + dunst = import ../hm-configs/dunst.nix; + clipmenu.enable = true; + # disabled in favor of flakes + lorri.enable = false; }; + xdg = { mime.enable = true; }; xsession = { enable = true; scriptPath = ".hm-xsession"; diff --git a/users/mat-hm.nix b/users/mat-hm.nix index f53d32f..57f4a57 100644 --- a/users/mat-hm.nix +++ b/users/mat-hm.nix @@ -10,20 +10,20 @@ in { home-manager.users.mat = { pkgs, ... }: { home = { - sessionVariables = { EDITOR = "vim"; }; + sessionVariables = { EDITOR = "nvim"; }; packages = with pkgs; [ # nix utilities cachix niv nixfmt nix-prefetch-git - fish-foreign-env + fishPlugins.foreign-env # command line utils - ripgrep + dnsutils + fd rlwrap tealdeer pijul - mullvad-vpn ]; file = import ../hm-configs/files-all.nix; }; @@ -32,7 +32,10 @@ in { bat.enable = true; broot.enable = true; command-not-found.enable = true; - direnv.enable = true; + direnv = { + enable = true; + enableNixDirenvIntegration = true; + }; fish = { enable = true; @@ -88,10 +91,32 @@ in { highlightBaseName = true; }; + kakoune = { + enable = false; + config = { + numberLines = { + enable = true; + highlightCursor = true; + relative = true; + }; + ui = { + enableMouse = true; + assistant = "cat"; + }; + wrapLines = { + enable = true; + indent = true; + marker = "⏎"; + word = true; + }; + }; + }; + keychain = { enable = true; + extraFlags = [ "--quiet" "--nogui" ]; enableFishIntegration = true; - enableXsessionIntegration = true; + enableXsessionIntegration = false; }; man.enable = true; @@ -121,8 +146,5 @@ in { ''; }; }; - - services = { lorri.enable = true; }; - }; }