Adding lorri

This commit is contained in:
Martin Potier 2019-05-16 14:36:58 +03:00
parent 20f765fd80
commit 80053766bd
No known key found for this signature in database
GPG key ID: D4DD957DBA4AD89E
2 changed files with 26 additions and 54 deletions

View file

@ -1,58 +1,7 @@
{ {
nixpkgs.overlays = [ (import ./pkgs) ]; nixpkgs.overlays = [ (import ./pkgs) ];
# Block Spotify Ads (this breaks home-manager) imports = [
# networking.extraHosts = '' ./modules/lorri.nix
# 127.0.0.1 media-match.com ];
# 127.0.0.1 adclick.g.doublecklick.net
# 127.0.0.1 http://www.googleadservices.com
# 127.0.0.1 open.spotify.com
# 127.0.0.1 pagead2.googlesyndication.com
# 127.0.0.1 desktop.spotify.com
# 127.0.0.1 googleads.g.doubleclick.net
# 127.0.0.1 pubads.g.doubleclick.net
# 127.0.0.1 securepubads.g.doubleclick.net
# 127.0.0.1 audio2.spotify.com
# 127.0.0.1 http://audio2.spotify.com
# 127.0.0.1 http://www.audio2.spotify.com
# 127.0.0.1 http://www.omaze.com
# 127.0.0.1 omaze.com
# 127.0.0.1 bounceexchange.com
# 127.0.0.1 core.insightexpressai.com
# 127.0.0.1 content.bitsontherun.com
# 127.0.0.1 s0.2mdn.net
# 127.0.0.1 v.jwpcdn.com
# 127.0.0.1 d2gi7ultltnc2u.cloudfront.net
# 127.0.0.1 crashdump.spotify.com
# 127.0.0.1 adeventtracker.spotify.com
# 127.0.0.1 log.spotify.com
# 127.0.0.1 analytics.spotify.com
# 127.0.0.1 ads-fa.spotify.com
# 127.0.0.1 cs283.wpc.teliasoneracdn.net
# 127.0.0.1 audio-ec.spotify.com
# 127.0.0.1 cs126.wpc.teliasoneracdn.net
# 127.0.0.1 heads-ec.spotify.com
# 127.0.0.1 u.scdn.co
# 127.0.0.1 cs126.wpc.edgecastcdn.net
# 127.0.0.1 pagead46.l.doubleclick.net
# 127.0.0.1 pagead.l.doubleclick.net
# 127.0.0.1 video-ad-stats.googlesyndication.com
# 127.0.0.1 pagead-googlehosted.l.google.com
# 127.0.0.1 partnerad.l.doubleclick.net
# 127.0.0.1 prod.spotify.map.fastlylb.net
# 127.0.0.1 adserver.adtechus.com
# 127.0.0.1 na.gmtdmp.com
# 127.0.0.1 anycast.pixel.adsafeprotected.com
# 127.0.0.1 ads.pubmatic.com
# 127.0.0.1 idsync-ext.rlcdn.com
# 127.0.0.1 http://www.googletagservices.com
# 127.0.0.1 sto3.spotify.com
# 127.0.0.1 spclient.wg.spotify.com
# 127.0.0.1 d361oi6ppvq2ym.cloudfront.net
# 127.0.0.1 gads.pubmatic.com
# 127.0.0.1 ads-west-colo.adsymptotic.com
# 127.0.0.1 geo3.ggpht.com
# 127.0.0.1 showads33000.pubmatic.com
# 127.0.0.1 spclient.wg.spotify.com
# '';
} }

23
modules/lorri.nix Normal file
View file

@ -0,0 +1,23 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.services.lorri;
lorri-src = fetchTarball https://github.com/target/lorri/archive/master.tar.gz;
in
{
imports = mkIf cfg.enable [
https://raw.githubusercontent.com/target/lorri/master/direnv/nixos.nix
];
options.services.lorri = {
enable = mkEnableOption "Lorri user service";
};
config = mkIf cfg.enable {
environment.systemPackages = [
(pkgs.callPackage lorri-src {})
];
};
}