From 826e47ad69a20602451a3b6a5c9dc47566b6c9d8 Mon Sep 17 00:00:00 2001
From: Jonas Heinrich <onny@project-insanity.org>
Date: Sat, 11 Dec 2021 09:15:13 +0100
Subject: [PATCH] fix opensnitch

---
 configuration.nix | 65 +++++++++++++++++++++--------------------------
 home.nix          |  6 +++--
 sway.nix          |  9 ++++---
 3 files changed, 39 insertions(+), 41 deletions(-)

diff --git a/configuration.nix b/configuration.nix
index cc7d329..ac2bdd2 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -20,30 +20,30 @@ in
 {
 
   # FIXME
-  nixpkgs.config = {
-    packageOverrides = pkgs: rec {
-      nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
-        inherit pkgs;
-      };
-      unstable = import unstableTarball {
-        config = config.nixpkgs.config;
-      };
-    };
-    allowUnfree = true;
-    allowBroken = true; # FIXME For linux-libre
+  nixpkgs = {
+    overlays = [
+      (self: super: {
+        opensnitch = (import (builtins.fetchTarball {
+          url =
+            "https://github.com/onny/nixpkgs/archive/4d6cb6b4c8ebc35d848fe0ef5cda1ce5fcd6e072.tar.gz";
+          sha256 = "1ymfdil2z2q3sbdfgqhqn4wyz0p53q2ypj1bss8qgbmkilq1lxn4";
+        }) {}).opensnitch;
+      })
+    ];
+    config = {
+      packageOverrides = pkgs: rec {
+        nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
+         inherit pkgs;
+        };
+        unstable = import unstableTarball {
+          config = config.nixpkgs.config;
+       };
+     };
+     allowUnfree = true; # FIXME
+     allowBroken = true; # FIXME For linux-libre
+   };
   };
 
-  # FIXME
-  nixpkgs.overlays = [
-    (self: super: {
-      foo2zjs = (import (builtins.fetchTarball {
-        url =
-          "https://github.com/onny/nixpkgs/archive/foo2zjs.tar.gz";
-        sha256 = "0rwqfky4aar93w6q3q8gw75mpaiiiw2sg29qhdxs2qskdsy6blrz";
-      }) { config = { allowUnfree = true; }; }).foo2zjs;
-    })
-  ];
-
   imports =
     [
       ./hardware-configuration.nix
@@ -81,12 +81,12 @@ in
 
     # unsorted
     gnome3.gedit aria2 tcpdump btrfs-progs curl ffmpeg-full gnome3.vinagre
-    gnome3.nautilus gparted plowshare youtube-dl qt5.qtwayland samba cups sigil
+    gnome3.nautilus gparted plowshare qt5.qtwayland samba cups sigil yt-dlp
     virtmanager wireshark-cli valgrind wine-staging winetricks acpi pmutils
     pavucontrol bluez-tools udisks pv termite nextcloud-client grc time wcalc
     pciutils usbutils ghostscript bind nmap woeusb gnome3.gnome-boxes spice-gtk
     whois binutils-unwrapped bison flex graphicsmagick-imagemagick-compat
-    parallel curlftpfs filezilla dnsmasq libarchive testdisk libusbmuxd usbmuxd
+    parallel curlftpfs filezilla dnsmasq libarchive testdisk
     python39Packages.binwalk-full glib ifuse cifs-utils pinentry pinentry-gnome
     nix-index 
 
@@ -109,7 +109,7 @@ in
 
     # privacy
     zeronet torsocks electrum 
-    # tor-browser-bundle-bin # FIXME
+    tor-browser-bundle-bin # FIXME
 
     # security
     gnome-passwordsafe lynis gnupg
@@ -130,7 +130,7 @@ in
     gnome-builder heimdall gcc gnumake uwsgi vscodium nodejs  cargo gcolor3
     krankerl dep2nix go pkg-config dep git nix-review poedit yarn2nix yarn
     meson gettext wp-cli nodePackages.pnpm pmbootstrap checkra1n
-    nodePackages.hyperpotamus
+    nodePackages.hyperpotamus docker-compose
     (python3.withPackages (python-packages: with python-packages; [
       djangorestframework django pillow pip virtualenv bottle requests
       feedparser beautifulsoup4 PyRSS2Gen dateutil lxml netifaces dbus-python
@@ -148,8 +148,7 @@ in
     #iptables-nftables-compat
     iptables
     nur.repos.onny.librewolf-bin # FIXME
-    nur.repos.onny.snipping_tool # FIXME
-    # nur.repos.onny.smloadr # FIXME
+    nur.repos.onny.snipping_tool # FIXME convert to flake
     gnome3.adwaita-icon-theme # should be added as a dependency
     # for example for: foliate, fragments
     breeze-icons
@@ -238,13 +237,7 @@ in
 
     avahi.enable = true;
 
-    udev = {
-	packages = [ pkgs.android-udev-rules ];
-    	extraRules = ''
-SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="4141", GROUP="users", MODE="0660"
-SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1227", GROUP="users", MODE="0660"
-    	''; # Required for checkra1n iPhone
-    };
+    udev.packages = [ pkgs.android-udev-rules ];
 
     nfs.server.enable = true; # required for NFS client
 
@@ -265,7 +258,7 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1227", GROUP="user
     printing =  {
       enable = true;
       drivers = with pkgs; [
-        foo2zjs # dell 1250c
+        foo2zjs # dell 1250c # FIXME
       ];
     };
 
diff --git a/home.nix b/home.nix
index c5b796f..d639d74 100644
--- a/home.nix
+++ b/home.nix
@@ -7,12 +7,15 @@ in
 
   imports =
     [
-      "${builtins.fetchTarball https://github.com/rycee/home-manager/archive/release-21.11.tar.gz}/nixos"
+      /home/onny/projects/home-manager/nixos # FIXME
+      #"${builtins.fetchTarball https://github.com/rycee/home-manager/archive/release-21.11.tar.gz}/nixos"
     ];
 
   home-manager = {
     users.onny = {
 
+      services.opensnitch-ui.enable = true;
+
       programs = {
 
         git = {
@@ -122,7 +125,6 @@ in
             { command = "firefox"; }
             { command = "signal-desktop --enable-features=UseOzonePlatform·--ozone-platform=wayland"; }
             { command = "waybar"; }
-            { command = "opensnitch-ui"; }
             { command = "mako"; }
           ];
           bars = [];
diff --git a/sway.nix b/sway.nix
index 8e237a9..f11a49e 100644
--- a/sway.nix
+++ b/sway.nix
@@ -24,12 +24,15 @@
     };
   };
 
+  location = {
+    provider = "manual";
+    latitude = 49.0;
+    longitude = 8.4;
+  };
+
   services.redshift = {
     enable = true;
     package = pkgs.redshift-wlr;
-    provider = "manual";
-    latitude = "49";
-    longitude = "8.4";
   };
 
 }
-- 
GitLab