From d51f4c78a0e1041903990a90fd0c82898479a0a8 Mon Sep 17 00:00:00 2001 From: Dave Gallant Date: Wed, 9 Oct 2024 13:19:39 -0400 Subject: [PATCH] Use mitmproxy cask for macos --- flake.lock | 6 +-- machines/hephaestus/configuration.nix | 77 +++++++++------------------ machines/zelus/configuration.nix | 1 + packages.nix | 15 ++---- 4 files changed, 31 insertions(+), 68 deletions(-) diff --git a/flake.lock b/flake.lock index e6e6827..aec9c0c 100644 --- a/flake.lock +++ b/flake.lock @@ -422,11 +422,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1728377658, - "narHash": "sha256-omXE+zNAIz++2sX5PG4AkkecXN66uu0JZJzjCTeT5o0=", + "lastModified": 1728409405, + "narHash": "sha256-kk530XBUGDpt0DQbyUb3yDpSddPqF9PA5KTo/nsmmg0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a2eacc0c62c0537bd1a7a60c1f91d1f3a59fd013", + "rev": "1366d1af8f58325602280e43ed6233849fb92216", "type": "github" }, "original": { diff --git a/machines/hephaestus/configuration.nix b/machines/hephaestus/configuration.nix index bf37efd..7b9d8e8 100644 --- a/machines/hephaestus/configuration.nix +++ b/machines/hephaestus/configuration.nix @@ -1,11 +1,4 @@ -{ - config, - lib, - modulesPath, - pkgs, - unstable, - ... -}: +{ config, lib, modulesPath, pkgs, unstable, ... }: let gnomeExtensions = with pkgs.gnomeExtensions; [ appindicator @@ -19,16 +12,17 @@ let tailscale-status tray-icons-reloaded ]; -in -{ +in { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; stylix = { enable = true; - base16Scheme = "${unstable.base16-schemes}/share/themes/tokyo-night-dark.yaml"; + base16Scheme = + "${unstable.base16-schemes}/share/themes/tokyo-night-dark.yaml"; image = pkgs.fetchurl { - url = "https://github.com/davegallant/nix-config/blob/main/nixos-wallpaper.png?raw=true"; + url = + "https://github.com/davegallant/nix-config/blob/main/nixos-wallpaper.png?raw=true"; sha256 = "Ztqn9+CHslr6wZdnOTeo/YNi/ICerpcFLyMArsZ/PIY="; }; polarity = "dark"; @@ -51,29 +45,18 @@ in }; }; - supportedFilesystems = [ - "ntfs" - "zfs" - ]; + supportedFilesystems = [ "ntfs" "zfs" ]; initrd = { - availableKernelModules = [ - "ahci" - "nvme" - "sd_mod" - "usb_storage" - "usbhid" - "xhci_pci" - ]; + availableKernelModules = + [ "ahci" "nvme" "sd_mod" "usb_storage" "usbhid" "xhci_pci" ]; luks.devices."root" = { allowDiscards = true; device = "/dev/disk/by-uuid/21cd166c-1528-49a4-b31b-0d408d48aa80"; preLVM = true; keyFile = "./keyfile0.bin"; }; - secrets = { - "keyfile0.bin" = "/etc/secrets/initrd/keyfile0.bin"; - }; + secrets = { "keyfile0.bin" = "/etc/secrets/initrd/keyfile0.bin"; }; }; }; @@ -82,8 +65,7 @@ in keyMap = "us"; }; - environment.systemPackages = - with pkgs; + environment.systemPackages = with pkgs; [ android-tools bitwarden @@ -104,6 +86,7 @@ in libation lm_sensors logseq + mitmproxy mullvad-vpn netdata nfs-utils @@ -130,8 +113,7 @@ in wine wine64 wireshark-qt - ] - ++ gnomeExtensions; + ] ++ gnomeExtensions; fileSystems = { "/" = { @@ -154,21 +136,20 @@ in device = "192.168.1.178:/volume1/Backups"; fsType = "nfs"; }; - "/mnt/zfs/backups" = - { device = "zpool/backups"; + "/mnt/zfs/backups" = { + device = "zpool/backups"; fsType = "zfs"; }; }; - swapDevices = [ { device = "/dev/disk/by-uuid/5d6d0388-2b15-4ff1-9f0f-391818a76090"; } ]; + swapDevices = + [{ device = "/dev/disk/by-uuid/5d6d0388-2b15-4ff1-9f0f-391818a76090"; }]; nixpkgs = { hostPlatform = "x86_64-linux"; config = { allowUnfree = true; - permittedInsecurePackages = [ - "electron-27.3.11" - ]; + permittedInsecurePackages = [ "electron-27.3.11" ]; }; }; @@ -176,9 +157,7 @@ in iproute2.enable = true; hostName = "hephaestus"; hostId = "0e8aad53"; - interfaces.enp34s0 = { - useDHCP = true; - }; + interfaces.enp34s0 = { useDHCP = true; }; firewall = { allowPing = false; enable = true; @@ -187,27 +166,18 @@ in }; }; - systemd.services = { - NetworkManager-wait-online.enable = false; - }; + systemd.services = { NetworkManager-wait-online.enable = false; }; system = { autoUpgrade.enable = true; stateVersion = "24.05"; }; - nix = { - extraOptions = "experimental-features = nix-command flakes"; - }; + nix = { extraOptions = "experimental-features = nix-command flakes"; }; users.users.dave = { isNormalUser = true; - extraGroups = [ - "docker" - "wheel" - "libvirtd" - "corectrl" - ]; + extraGroups = [ "docker" "wheel" "libvirtd" "corectrl" ]; shell = pkgs.zsh; }; @@ -222,7 +192,8 @@ in hardware = { opengl.enable = true; - cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + cpu.amd.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; pulseaudio.enable = true; # Vulkan opengl.driSupport = true; diff --git a/machines/zelus/configuration.nix b/machines/zelus/configuration.nix index f1b78f9..3071d58 100644 --- a/machines/zelus/configuration.nix +++ b/machines/zelus/configuration.nix @@ -91,6 +91,7 @@ in { "librewolf" "logseq" "lulu" + "mitmproxy" "notunes" "postman" "raycast" diff --git a/packages.nix b/packages.nix index 94025bb..c52b475 100644 --- a/packages.nix +++ b/packages.nix @@ -1,14 +1,6 @@ -{ - config, - lib, - pkgs, - unstable, - ... -}: -let - inherit (pkgs) stdenv; -in -{ +{ config, lib, pkgs, unstable, ... }: +let inherit (pkgs) stdenv; +in { environment.systemPackages = with pkgs; [ # essentials curl @@ -66,7 +58,6 @@ in # monitoring htop procs - mitmproxy # golang gofumpt