From 90eb0c61afca667dc45b2564c5e2515657824d2e Mon Sep 17 00:00:00 2001 From: catvayor Date: Fri, 24 May 2024 13:32:41 +0200 Subject: [PATCH] ~ --- machines/kat-r86s/configuration.nix | 7 ++-- machines/kat-r86s/router.nix | 56 ++++++++++++++--------------- modules/neovim/nvimrc | 3 ++ modules/ssh.nix | 10 ++++-- modules/zsh.nix | 6 ++++ 5 files changed, 50 insertions(+), 32 deletions(-) diff --git a/machines/kat-r86s/configuration.nix b/machines/kat-r86s/configuration.nix index 4beddba..1a2a0b2 100644 --- a/machines/kat-r86s/configuration.nix +++ b/machines/kat-r86s/configuration.nix @@ -18,7 +18,7 @@ boot.supportedFilesystems = [ "bcachefs" ]; boot.kernelPackages = pkgs.linuxPackages_latest; - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. time.timeZone = "Europe/Paris"; # Configure network proxy if necessary @@ -116,9 +116,12 @@ }; }; streamConfig = '' + upstream kat-virt { + server 192.168.122.2:22; + } server { listen 22000; - proxy_pass 192.168.122.2:22; + proxy_pass kat-virt; } ''; }; diff --git a/machines/kat-r86s/router.nix b/machines/kat-r86s/router.nix index e45656c..b61ee50 100644 --- a/machines/kat-r86s/router.nix +++ b/machines/kat-r86s/router.nix @@ -7,36 +7,36 @@ { boot.kernel.sysctl."net.ipv4.ip_forward" = true; - # networking.nat = { - # enable = true; - # internalInterfaces = [ "enp2s0" ]; - # externalInterface = "enp1s0"; - # }; - networking.interfaces.enp2s0 = { - useDHCP = false; - ipv4.addresses = [ - { - address = "192.168.42.1"; - prefixLength = 24; - } - ]; - }; + # networking.nat = { + # enable = true; + # internalInterfaces = [ "vlan-thurne" ]; + # externalInterface = "enp1s0"; + # }; + # networking.interfaces.enp2s0 = { + # useDHCP = false; + # ipv4.addresses = [ + # { + # address = "192.168.42.1"; + # prefixLength = 24; + # } + # ]; + # }; - # networking.interfaces.enp3s0 = { - # useDHCP = false; - # ipv4.addresses = [{ address = "192.168.222.1"; prefixLength = 24; }]; - # ipv6.addresses = [{ address = "fd26:baf9:d250:8000::ffff"; prefixLength = 64; }]; - # }; +# networking.useDHCP = false; + networking.interfaces.enp3s0.useDHCP = lib.mkForce false; + networking.interfaces.enp2s0.useDHCP = lib.mkForce false; + networking.interfaces.enp1s0.useDHCP = lib.mkForce true; + networking.useNetworkd = true; - services.dnsmasq = { - enable = true; - settings = { - interface = [ "vlan-admin" ]; - bind-dynamic = true; - dhcp-option = "3,0.0.0.0"; - dhcp-range = "192.168.222.100,192.168.222.254,255.255.255.0,infinite"; - }; - }; +# services.dnsmasq = { +# enable = true; +# settings = { +# interface = [ "vlan-admin" ]; +# bind-dynamic = true; +# dhcp-option = "3,0.0.0.0"; +# dhcp-range = "192.168.222.100,192.168.222.254,255.255.255.0,infinite"; +# }; +# }; systemd.network = { enable = true; diff --git a/modules/neovim/nvimrc b/modules/neovim/nvimrc index c84e09a..a71231c 100644 --- a/modules/neovim/nvimrc +++ b/modules/neovim/nvimrc @@ -127,6 +127,9 @@ autocmd InsertLeave * set relativenumber! map :set number! map :set relativenumber! +colorscheme vim +set notermguicolors + hi Normal guifg=cyan guibg=black hi NonText guifg=yellow guibg=#303030 hi comment guifg=green diff --git a/modules/ssh.nix b/modules/ssh.nix index a2cdfdd..147ad7d 100644 --- a/modules/ssh.nix +++ b/modules/ssh.nix @@ -48,9 +48,15 @@ proxyJump = "sas.ens"; }; - "jourdan01.dgn" = { + "netcore02.dgn" = { user = "root"; - hostname = "192.168.42.6"; + hostname = "fd26:baf9:d250:8000::1001"; + proxyJump = "r86s.kat"; + identityFile = "~/.ssh/juniper"; + }; + "netaccess01.dgn" = { + user = "root"; + hostname = "fd26:baf9:d250:8000::2001"; proxyJump = "r86s.kat"; identityFile = "~/.ssh/juniper"; }; diff --git a/modules/zsh.nix b/modules/zsh.nix index fc2d5e6..170b939 100644 --- a/modules/zsh.nix +++ b/modules/zsh.nix @@ -51,5 +51,11 @@ enableZshIntegration = true; settings.battery.disabled = true; }; + + direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + }; }; }