From 38d50cb04d9a54793149c9c6559bd26da33db69d Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Wed, 9 Jun 2021 10:05:51 +0200 Subject: [PATCH 1/3] nixpkgs-fmt run --- nixos/configuration.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index dbd93ba..467f8e1 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -5,7 +5,7 @@ { config, pkgs, ... }: let - unstable = import {}; + unstable = import { }; in { @@ -95,8 +95,8 @@ in # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; - networking.firewall.allowedTCPPortRanges = [ { from = 1714; to = 1764; } ]; - networking.firewall.allowedUDPPortRanges = [ { from = 1714; to = 1764; } ]; # for KDE connect + networking.firewall.allowedTCPPortRanges = [{ from = 1714; to = 1764; }]; + networking.firewall.allowedUDPPortRanges = [{ from = 1714; to = 1764; }]; # for KDE connect # Or disable the firewall altogether. # networking.firewall.enable = false; @@ -207,12 +207,12 @@ in # declarative containers containers = { - # hash2PubSim = import ./Hash2PubTestbed.nix - # { - # inherit pkgs config; - # experimentUid = config.users.users.spiollinux.uid; - # projectDir = "/home/spiollinux/Seafile/Studium/Semester11/INF-PM-FP-ANW"; - # }; + # hash2PubSim = import ./Hash2PubTestbed.nix + # { + # inherit pkgs config; + # experimentUid = config.users.users.spiollinux.uid; + # projectDir = "/home/spiollinux/Seafile/Studium/Semester11/INF-PM-FP-ANW"; + # }; }; # stop NetworkManager from managing virtual interfaces From 62935211c56cde470ef1b79c6f93fd5f758bb60d Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Wed, 9 Jun 2021 10:06:20 +0200 Subject: [PATCH 2/3] enable wireshark GUI --- nixos/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 467f8e1..0d00b59 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -78,6 +78,7 @@ in programs.wireshark = { enable = true; + package = pkgs.wireshark; }; programs.adb.enable = true; From 36001254bfd1847fc4328d22020cdd71ba344611 Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Wed, 9 Jun 2021 10:07:03 +0200 Subject: [PATCH 3/3] script to DNS-block certain sites as a measure against me procrastinating too much --- nixos/configuration.nix | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 0d00b59..fd0cbd2 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -181,9 +181,36 @@ in services.smartd = { enable = true; - devices = [ { device = "/dev/sda"; } { device = "/dev/sdb"; } ]; + devices = [{ device = "/dev/sda"; } { device = "/dev/sdb"; }]; }; + # block certain sites to prevent procrastination + systemd.services.procrastinationstop = { + serviceConfig.Type = "oneshot"; + wantedBy = [ ]; + script = '' + ln -sf ${pkgs.writeText "blockedHosts" '' + ::1 twitter.com + 127.0.0.1 twitter.com + ::1 api.twitter.com + 127.0.0.1 api.twitter.com + ::1 toot.matereal.eu + 127.0.0.1 toot.matereal.eu + ::1 tagesschau.de + 127.0.0.1 tagesschau.de + ::1 dnn.de + 127.0.0.1 dnn.de + ''} /etc/hosts + ''; + }; + + systemd.services.procrastinationstart = { + serviceConfig.Type = "oneshot"; + wantedBy = [ ]; + script = '' + ln -sf /etc/static/hosts /etc/hosts + ''; + }; fonts = { fontDir.enable = true;