From ee98e1582c086ca16160975c91eb39c44a85cf2e Mon Sep 17 00:00:00 2001 From: reo101 Date: Sun, 17 Mar 2024 23:43:11 +0200 Subject: [PATCH] feat(jeeves)!: spring updating More `wireguard` peers `nano` -> `neovim` for default available editor `samba` better names + symlink support More `opengl` packages for `Jellyfin` Add `home-assistant` (no config yet) --- .../x86_64-linux/jeeves/configuration.nix | 1 + .../x86_64-linux/jeeves/home-assistant.nix | 24 +++++++++++++++++++ .../nixos/x86_64-linux/jeeves/jellyfin.nix | 5 ++++ .../nixos/x86_64-linux/jeeves/network.nix | 3 +++ machines/nixos/x86_64-linux/jeeves/samba.nix | 9 +++++-- .../nixos/x86_64-linux/jeeves/wireguard.nix | 15 +++++++++++- modules/nixos/default-editor/default.nix | 9 +++++++ 7 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 machines/nixos/x86_64-linux/jeeves/home-assistant.nix create mode 100644 modules/nixos/default-editor/default.nix diff --git a/machines/nixos/x86_64-linux/jeeves/configuration.nix b/machines/nixos/x86_64-linux/jeeves/configuration.nix index 1c60e23..53c100d 100644 --- a/machines/nixos/x86_64-linux/jeeves/configuration.nix +++ b/machines/nixos/x86_64-linux/jeeves/configuration.nix @@ -10,6 +10,7 @@ ./wireguard.nix ./jellyfin.nix ./mindustry.nix + ./home-assistant.nix ./samba.nix ]; diff --git a/machines/nixos/x86_64-linux/jeeves/home-assistant.nix b/machines/nixos/x86_64-linux/jeeves/home-assistant.nix new file mode 100644 index 0000000..9d64ff9 --- /dev/null +++ b/machines/nixos/x86_64-linux/jeeves/home-assistant.nix @@ -0,0 +1,24 @@ +{ inputs, outputs, lib, pkgs, config, ... }: +{ + environment.systemPackages = with pkgs; [ + ]; + + nixpkgs.config.permittedInsecurePackages = [ + "openssl-1.1.1w" + ]; + + services.home-assistant = { + enable = true; + extraComponents = [ + # Components required to complete the onboarding + "esphome" + "met" + "radio_browser" + ]; + config = { + # Includes dependencies for a basic setup + # https://www.home-assistant.io/integrations/default_config/ + default_config = {}; + }; + }; +} diff --git a/machines/nixos/x86_64-linux/jeeves/jellyfin.nix b/machines/nixos/x86_64-linux/jeeves/jellyfin.nix index 1000edb..660f296 100644 --- a/machines/nixos/x86_64-linux/jeeves/jellyfin.nix +++ b/machines/nixos/x86_64-linux/jeeves/jellyfin.nix @@ -8,6 +8,11 @@ 127.0.0.1 jeeves ''; + hardware.opengl.extraPackages = with pkgs; [ + vaapiVdpau + libva1 + ]; + services = { transmission = { enable = true; diff --git a/machines/nixos/x86_64-linux/jeeves/network.nix b/machines/nixos/x86_64-linux/jeeves/network.nix index 139fd19..5e13c8f 100644 --- a/machines/nixos/x86_64-linux/jeeves/network.nix +++ b/machines/nixos/x86_64-linux/jeeves/network.nix @@ -3,6 +3,8 @@ environment.systemPackages = with pkgs; [ ]; + # networking.nftables.enable = true; + age.secrets."home.wifi.env" = { rekeyFile = "${inputs.self}/secrets/home/wifi/env.age"; }; @@ -31,6 +33,7 @@ networks."10-eth0" = { matchConfig.Name = "eth0"; networkConfig.DHCP = "yes"; + networkConfig.DHCPServer = "yes"; }; links."10-eth0" = { matchConfig.PermanentMACAddress = "04:7c:16:80:3c:2c"; diff --git a/machines/nixos/x86_64-linux/jeeves/samba.nix b/machines/nixos/x86_64-linux/jeeves/samba.nix index 125e383..4f1ae52 100644 --- a/machines/nixos/x86_64-linux/jeeves/samba.nix +++ b/machines/nixos/x86_64-linux/jeeves/samba.nix @@ -19,8 +19,8 @@ extraConfig = '' # Files workgroup = WORKGROUP - server string = smbnix - netbios name = smbnix + server string = Jeeves + netbios name = jeeves security = user #use sendfile = yes #max protocol = smb2 @@ -30,6 +30,9 @@ guest account = nobody map to guest = bad user + # Symlinks + allow insecure wide links = yes + # Printers load printers = yes printing = cups @@ -55,6 +58,8 @@ "directory mask" = "0755"; "force user" = "jeeves"; "force group" = "users"; + "follow symlinks" = "yes"; + "wide links" = "yes"; }; }; }; diff --git a/machines/nixos/x86_64-linux/jeeves/wireguard.nix b/machines/nixos/x86_64-linux/jeeves/wireguard.nix index d38fadf..0fd24ca 100644 --- a/machines/nixos/x86_64-linux/jeeves/wireguard.nix +++ b/machines/nixos/x86_64-linux/jeeves/wireguard.nix @@ -53,7 +53,6 @@ PublicKey = "+x4cKc16KxhW/M3wv64FU1J0AkiLyXT5Oar6I1n1xk4="; AllowedIPs = [ "10.100.0.3/32" - "192.168.1.123/32" "0.0.0.0/0" ]; }; @@ -71,6 +70,20 @@ "0.0.0.0/0" ]; }; + a41 = { + PublicKey = "/YEBfjDO+CfmYOKg9pO//ZAZQNutAS5z/Ggt2pX2gn0="; + AllowedIPs = [ + "10.100.0.6/32" + "0.0.0.0/0" + ]; + }; + t410 = { + PublicKey = "YSTgtHXcvbCwYrnBCNujsTkLy+umVZWLGECtV88NIW0="; + AllowedIPs = [ + "10.100.0.7/32" + "0.0.0.0/0" + ]; + }; }; }; }; diff --git a/modules/nixos/default-editor/default.nix b/modules/nixos/default-editor/default.nix new file mode 100644 index 0000000..40e0a58 --- /dev/null +++ b/modules/nixos/default-editor/default.nix @@ -0,0 +1,9 @@ +{ lib, pkgs, config, ... }: + +with lib; +let +in +{ + programs.nano.enable = false; + programs.neovim.enable = true; +}