From 848de7051abbce570a538169da0578c60ffe281d Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Fri, 16 Apr 2021 21:50:10 -0400 Subject: [PATCH] block social media --- features/block-socialmedia.nix | 23 +++++++++++++++++++++++ flake.lock | 8 ++++---- flake.nix | 3 ++- home.nix | 1 - 4 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 features/block-socialmedia.nix diff --git a/features/block-socialmedia.nix b/features/block-socialmedia.nix new file mode 100644 index 0000000..e22a4ba --- /dev/null +++ b/features/block-socialmedia.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: + +{ + networking.extraHosts = + '' + 127.0.0.1 reddit.com + 127.0.0.1 www.reddit.com + 127.0.0.1 old.reddit.com + 127.0.0.1 www.old.reddit.com + + 127.0.0.1 news.ycombinator.com + 127.0.0.1 hckrnews.com + + 127.0.0.1 lobste.rs + 127.0.0.1 www.lobste.rs + + 127.0.0.1 twitter.com + 127.0.0.1 www.twitter.com + + 127.0.0.1 facebook.com + 127.0.0.1 www.facebook.com + ''; +} diff --git a/flake.lock b/flake.lock index d2e99f7..b8afed0 100644 --- a/flake.lock +++ b/flake.lock @@ -167,17 +167,17 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1618343055, - "narHash": "sha256-yux3woyNtMt6ynYRq7+DYe19CC+SoI/LJW+zSJd0UOs=", + "lastModified": 1618447066, + "narHash": "sha256-2f9ydxgdW2igSIe1vmV8buTEpAVQPVhV+OxvlFRTA+Y=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e019872af81e4013fd518fcacfba74b1de21a50e", + "rev": "dcdf30a78a523296b5f9d44fb67afac485b64737", "type": "github" }, "original": { "owner": "nixos", "repo": "nixpkgs", - "rev": "e019872af81e4013fd518fcacfba74b1de21a50e", + "rev": "dcdf30a78a523296b5f9d44fb67afac485b64737", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 2854ab7..7e28301 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,7 @@ # https://status.nixos.org/ # # This ensures that we always use the official # cache. - nixpkgs.url = "github:nixos/nixpkgs/e019872af81e4013fd518fcacfba74b1de21a50e"; + nixpkgs.url = "github:nixos/nixpkgs/dcdf30a78a523296b5f9d44fb67afac485b64737"; nixos-hardware.url = github:NixOS/nixos-hardware/master; home-manager.url = "github:nix-community/home-manager"; @@ -62,6 +62,7 @@ ./hosts/x1c7.nix [ inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-7th-gen + ./features/block-socialmedia.nix ]; }; } diff --git a/home.nix b/home.nix index e433446..8ba18c2 100644 --- a/home.nix +++ b/home.nix @@ -19,7 +19,6 @@ in tig gh procs # no more: ps -ef | grep - ytop tealdeer # ^ easy to forget these; write SRS? ];