From 14eb501ad84a7c11048443a41c6d3f686f9fdfc1 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 22 Mar 2024 10:08:58 +0000 Subject: [PATCH 1/4] Firefox start on blank page instead of a homepage --- hosts/Ronin/configuration.nix | 7 +------ hosts/Scorch/configuration.nix | 7 +------ system/firefox.nix | 3 +-- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/hosts/Ronin/configuration.nix b/hosts/Ronin/configuration.nix index 620f50a3..3e2b7b42 100644 --- a/hosts/Ronin/configuration.nix +++ b/hosts/Ronin/configuration.nix @@ -1,8 +1,4 @@ -{ - lib, - pkgs, - ... -}: { +{pkgs, ...}: { # Setup keyfile boot.initrd.secrets = {"/crypto_keyfile.bin" = null;}; @@ -17,5 +13,4 @@ systemPackages = with pkgs; [openfortivpn samba]; }; services.ollama.enable = true; - programs.firefox.policies.Homepage.URL = lib.mkForce "https://nucleus.ukaea.uk"; } diff --git a/hosts/Scorch/configuration.nix b/hosts/Scorch/configuration.nix index ccaa1c88..f89629fd 100644 --- a/hosts/Scorch/configuration.nix +++ b/hosts/Scorch/configuration.nix @@ -1,8 +1,4 @@ -{ - lib, - pkgs, - ... -}: { +{pkgs, ...}: { boot.loader.efi.efiSysMountPoint = "/boot/efi"; # Setup keyfile @@ -19,5 +15,4 @@ systemPackages = with pkgs; [openfortivpn samba]; }; services.ollama.enable = true; - programs.firefox.policies.Homepage.URL = lib.mkForce "https://nucleus.ukaea.uk"; } diff --git a/system/firefox.nix b/system/firefox.nix index d06d5e6d..1f189871 100644 --- a/system/firefox.nix +++ b/system/firefox.nix @@ -75,9 +75,8 @@ }; HardwareAcceleration = true; Homepage = { - URL = "https://nixos.wiki"; Locked = true; - StartPage = "homepage-locked"; + StartPage = "none"; }; ManagedBookmarks = [ # TODO update these From 26c55eab5cb7aea72b41d9b766dad8312a9c0c5c Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 22 Mar 2024 14:43:17 +0000 Subject: [PATCH 2/4] Add a default ruff.toml config file --- home/prog/default.nix | 1 + home/prog/ruff.toml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 home/prog/ruff.toml diff --git a/home/prog/default.nix b/home/prog/default.nix index 103c88a2..11c28fe1 100644 --- a/home/prog/default.nix +++ b/home/prog/default.nix @@ -1,4 +1,5 @@ {pkgs, ...}: { + xdg.configFile."ruff/pyproject.toml".source = ./ruff.toml; home.packages = with pkgs; [ # Nix nil diff --git a/home/prog/ruff.toml b/home/prog/ruff.toml new file mode 100644 index 00000000..0b4ae990 --- /dev/null +++ b/home/prog/ruff.toml @@ -0,0 +1,33 @@ +[lint] +select = [ + "F", "E4", "E7", "E9", # Defaults + "W", # pycodestyle warnings + "B", # Flake8 bugbear rules + "PD", # Pandas vet rules + "NPY", # NumPy specific rules + "RUF", # Ruff specific rules + "E1", # pycodestyle indentation rules + "E501", # Line too long + "C901", # Complex structure + "I001", # Import block un-sorted / un-formatted +] +ignore = [ + "W191", # Ignore due to conflict with ruff formatter + "E111", # Ignore due to conflict with ruff formatter + "E114", # Ignore due to conflict with ruff formatter + "E117", # Ignore due to conflict with ruff formatter + "D206", # Ignore due to conflict with ruff formatter + "D300", # Ignore due to conflict with ruff formatter + "Q000", # Ignore due to conflict with ruff formatter + "Q001", # Ignore due to conflict with ruff formatter + "Q002", # Ignore due to conflict with ruff formatter + "Q003", # Ignore due to conflict with ruff formatter + "COM812", # Ignore due to conflict with ruff formatter + "COM819", # Ignore due to conflict with ruff formatter + "ISC001", # Ignore due to conflict with ruff formatter + "ISC002", # Ignore due to conflict with ruff formatter +] +unfixable = ["B", "W", "E1", "C901" ""] + +[format] +docstring-code-format = true From 75e5c6e66313199adff55d2d41ae986131e416f6 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 22 Mar 2024 15:39:04 +0000 Subject: [PATCH 3/4] Update some ruff rules --- home/prog/ruff.toml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/home/prog/ruff.toml b/home/prog/ruff.toml index 0b4ae990..85b2505f 100644 --- a/home/prog/ruff.toml +++ b/home/prog/ruff.toml @@ -6,10 +6,14 @@ select = [ "PD", # Pandas vet rules "NPY", # NumPy specific rules "RUF", # Ruff specific rules - "E1", # pycodestyle indentation rules + "PERF1", "PERF2", # Performance lints from Perflint + "E101", # Mixed spaces and tabs "E501", # Line too long "C901", # Complex structure "I001", # Import block un-sorted / un-formatted + "I002", # Missing required import + "N804", # First argument of class method should be cls + "N805" # First argument of method should be self ] ignore = [ "W191", # Ignore due to conflict with ruff formatter @@ -25,9 +29,9 @@ ignore = [ "COM812", # Ignore due to conflict with ruff formatter "COM819", # Ignore due to conflict with ruff formatter "ISC001", # Ignore due to conflict with ruff formatter - "ISC002", # Ignore due to conflict with ruff formatter + "ISC002" # Ignore due to conflict with ruff formatter ] -unfixable = ["B", "W", "E1", "C901" ""] +unfixable = ["W", "B", "PD", "NPY", "RUF", "E101", "E501", "C901", "I001", "I002"] [format] docstring-code-format = true From f650f0d467d3656e3ef053efdfeb26ba8846ad47 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 22 Mar 2024 16:19:08 +0000 Subject: [PATCH 4/4] Revert "Disable VPN for Vanguard" This reverts commit ffa1afeb052b5696cf79a0846d14228c9a2e88be. --- hosts/Vanguard/configuration.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hosts/Vanguard/configuration.nix b/hosts/Vanguard/configuration.nix index 9ff7aadc..cd927cf3 100644 --- a/hosts/Vanguard/configuration.nix +++ b/hosts/Vanguard/configuration.nix @@ -11,4 +11,20 @@ hardware.opengl.extraPackages = with pkgs; [amdvlk rocmPackages.clr.icd]; hardware.opengl.extraPackages32 = [pkgs.driversi686Linux.amdvlk]; services.ollama.enable = true; + networking.wg-quick.interfaces = { + protonvpn = { + address = ["10.2.0.2/32"]; + dns = ["10.2.0.1"]; + privateKeyFile = "/root/wireguard-keys/privatekey"; + peers = [ + { + publicKey = "ic5vxFWQEX5lRVwgx2vfE1xYKXQuwQi1TGDSkR0fsEY="; + # presharedKeyFile = "/root/wireguard-keys/preshared_from_peer0_key"; + allowedIPs = ["0.0.0.0/0"]; + endpoint = "146.70.96.66:51820"; + persistentKeepalive = 25; + } + ]; + }; + }; }