From 53f9ff37302cd3d366cd1e4820c956f28a386720 Mon Sep 17 00:00:00 2001 From: kat witch Date: Mon, 26 Apr 2021 01:30:25 +0100 Subject: [PATCH] project-wide: nixdirfmt --- hosts/athame/nixos/default.nix | 16 +++++++--------- hosts/dummy/nixos/default.nix | 7 +++---- hosts/samhain/nixos/default.nix | 12 ++++-------- hosts/samhain/nixos/torrenting.nix | 4 ++-- hosts/yule/nixos/default.nix | 17 +++++++---------- modules/nixos/default.nix | 7 +++---- nixos.nix | 12 ++++++------ pkgs/default.nix | 24 ++++++++++++------------ pkgs/ff-sponsorblock/default.nix | 24 +++++++++++++----------- private | 2 +- profiles/gui/home/mpv.nix | 13 +++++++------ services/nginx.nix | 11 +++++------ 12 files changed, 70 insertions(+), 79 deletions(-) diff --git a/hosts/athame/nixos/default.nix b/hosts/athame/nixos/default.nix index 2bd84663..fe51bd6a 100644 --- a/hosts/athame/nixos/default.nix +++ b/hosts/athame/nixos/default.nix @@ -62,15 +62,13 @@ aaaa.address = config.hexchen.network.address; }; - hexchen.network = { - enable = true; - pubkey = "55e3f29c252d16e73ac849a6039824f94df1dee670c030b9e29f90584f935575"; - # if server, enable this and set endpoint: - listen.enable = false; - listen.endpoints = [ - "tcp://0.0.0.0:0" - ]; - }; + hexchen.network = { + enable = true; + pubkey = "55e3f29c252d16e73ac849a6039824f94df1dee670c030b9e29f90584f935575"; + # if server, enable this and set endpoint: + listen.enable = false; + listen.endpoints = [ "tcp://0.0.0.0:0" ]; + }; system.stateVersion = "20.09"; } diff --git a/hosts/dummy/nixos/default.nix b/hosts/dummy/nixos/default.nix index d5cc8a5a..e2d571c3 100644 --- a/hosts/dummy/nixos/default.nix +++ b/hosts/dummy/nixos/default.nix @@ -3,10 +3,9 @@ with lib; let - hexchen = (import sources.nix-hexchen) {}; - hexYgg = filterAttrs (_: c: c.enable) ( - mapAttrs (_: host: host.config.hexchen.network) hexchen.hosts - ); + hexchen = (import sources.nix-hexchen) { }; + hexYgg = filterAttrs (_: c: c.enable) + (mapAttrs (_: host: host.config.hexchen.network) hexchen.hosts); in { # stuff so dummy host is buildable (you probably don't want/need this???) # but idk your config sooooo diff --git a/hosts/samhain/nixos/default.nix b/hosts/samhain/nixos/default.nix index 1a698296..ce2b2ae0 100644 --- a/hosts/samhain/nixos/default.nix +++ b/hosts/samhain/nixos/default.nix @@ -3,10 +3,9 @@ with lib; let - hexchen = (import sources.nix-hexchen) {}; - hexYgg = filterAttrs (_: c: c.enable) ( - mapAttrs (_: host: host.config.hexchen.network) hexchen.hosts - ); + hexchen = (import sources.nix-hexchen) { }; + hexYgg = filterAttrs (_: c: c.enable) + (mapAttrs (_: host: host.config.hexchen.network) hexchen.hosts); in { imports = [ ./hw.nix @@ -38,7 +37,6 @@ in { value.shellCommand = "bitw get infra/hexdns-dynamic -f hostname"; }; - security.acme.certs."samhain.net.kittywit.ch" = { domain = "samhain.net.kittywit.ch"; dnsProvider = "rfc2136"; @@ -121,9 +119,7 @@ in { pubkey = "a7110d0a1dc9ec963d6eb37bb6922838b8088b53932eae727a9136482ce45d47"; # if server, enable this and set endpoint: listen.enable = false; - listen.endpoints = [ - "tcp://0.0.0.0:0" - ]; + listen.endpoints = [ "tcp://0.0.0.0:0" ]; }; deploy.tf.dns.records.kittywitch_net_samhain = { diff --git a/hosts/samhain/nixos/torrenting.nix b/hosts/samhain/nixos/torrenting.nix index 7304cc3e..d64fdf36 100644 --- a/hosts/samhain/nixos/torrenting.nix +++ b/hosts/samhain/nixos/torrenting.nix @@ -75,11 +75,11 @@ useACMEHost = "samhain.net.kittywit.ch"; forceSSL = true; locations = { - "/" = { + "/" = { root = "/mnt/zraw/media/"; extraConfig = "autoindex on;"; }; - "/transmission" = { + "/transmission" = { proxyPass = "http://[::1]:9091"; extraConfig = "proxy_pass_header X-Transmission-Session-Id;"; }; diff --git a/hosts/yule/nixos/default.nix b/hosts/yule/nixos/default.nix index 3e120898..f5f25b10 100644 --- a/hosts/yule/nixos/default.nix +++ b/hosts/yule/nixos/default.nix @@ -25,15 +25,13 @@ networking.interfaces.wlp2s0.useDHCP = true; networking.networkmanager.enable = true; - hexchen.network = { - enable = true; - pubkey = "9779fd6b5bdba6b9e0f53c96e141f4b11ce5ef749d1b9e77a759a3fdbd33a653"; - # if server, enable this and set endpoint: - listen.enable = false; - listen.endpoints = [ - "tcp://0.0.0.0:0" - ]; - }; + hexchen.network = { + enable = true; + pubkey = "9779fd6b5bdba6b9e0f53c96e141f4b11ce5ef749d1b9e77a759a3fdbd33a653"; + # if server, enable this and set endpoint: + listen.enable = false; + listen.endpoints = [ "tcp://0.0.0.0:0" ]; + }; deploy.tf.dns.records.kittywitch_net_yule = { tld = "kittywit.ch."; @@ -41,7 +39,6 @@ aaaa.address = config.hexchen.network.address; }; - system.stateVersion = "20.09"; } diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 81e403ab..011d577f 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1,7 +1,6 @@ { sources, lib, ... }: -let - hexchen = (import sources.nix-hexchen) {}; +let hexchen = (import sources.nix-hexchen) { }; in { imports = [ ./deploy @@ -12,6 +11,6 @@ in { ]; # stubs for hexchens modules, until more generalized - options.hexchen.dns = lib.mkOption {}; - options.hexchen.deploy = lib.mkOption {}; + options.hexchen.dns = lib.mkOption { }; + options.hexchen.deploy = lib.mkOption { }; } diff --git a/nixos.nix b/nixos.nix index 710b951a..bd5a04be 100644 --- a/nixos.nix +++ b/nixos.nix @@ -2,12 +2,12 @@ { - imports = [ - (import (./hosts + "/${hostName}/nixos")) - ./profiles/common/nixos.nix - ] ++ lib.optional (builtins.pathExists ./private/hosts) (import (./private/hosts + "/${hostName}/nixos")) - ++ lib.optional (builtins.pathExists ./private/profile) ./private/profile/nixos; - + imports = + [ (import (./hosts + "/${hostName}/nixos")) ./profiles/common/nixos.nix ] + ++ lib.optional (builtins.pathExists ./private/hosts) + (import (./private/hosts + "/${hostName}/nixos")) + ++ lib.optional (builtins.pathExists ./private/profile) + ./private/profile/nixos; options = { deploy.profile.kat = lib.mkEnableOption "uhh meow"; diff --git a/pkgs/default.nix b/pkgs/default.nix index 540d513e..0586ca85 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -30,23 +30,23 @@ let screenstub = unstable.callPackage ./screenstub { }; - buildFirefoxXpiAddon = { pname, version, addonId, url, sha256, meta, ... }: + buildFirefoxXpiAddon = { pname, version, addonId, url, sha256, meta, ... }: pkgs.stdenv.mkDerivation { - name = "${pname}-${version}"; + name = "${pname}-${version}"; - inherit meta; + inherit meta; - src = builtins.fetchurl { inherit url sha256; }; + src = builtins.fetchurl { inherit url sha256; }; - preferLocalBuild = true; - allowSubstitutes = false; + preferLocalBuild = true; + allowSubstitutes = false; - buildCommand = '' - dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" - mkdir -p "$dst" - install -v -m644 "$src" "$dst/${addonId}.xpi" - ''; - }; + buildCommand = '' + dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" + mkdir -p "$dst" + install -v -m644 "$src" "$dst/${addonId}.xpi" + ''; + }; ff-sponsorblock = super.callPackage ./ff-sponsorblock { }; diff --git a/pkgs/ff-sponsorblock/default.nix b/pkgs/ff-sponsorblock/default.nix index 48d9d968..718d3032 100644 --- a/pkgs/ff-sponsorblock/default.nix +++ b/pkgs/ff-sponsorblock/default.nix @@ -1,16 +1,18 @@ { lib, buildFirefoxXpiAddon, ... }: buildFirefoxXpiAddon { - pname = "ff-sponsorblock"; - version = "2.0.13.1"; - sha256 = "0lq47xnpqqfa8md6l4f0rxxz1cz7hihv5grpqh3vdbvnsc90i6f9"; - addonId = "{99e84f4-839b-4494-b4ad-12ab59c51fbd}"; - url = "https://addons.mozilla.org/firefox/downloads/file/3748692/sponsorblock_skip_sponsorships_on_youtube-2.0.13.1-an+fx.xpi"; + pname = "ff-sponsorblock"; + version = "2.0.13.1"; + sha256 = "0lq47xnpqqfa8md6l4f0rxxz1cz7hihv5grpqh3vdbvnsc90i6f9"; + addonId = "{99e84f4-839b-4494-b4ad-12ab59c51fbd}"; + url = + "https://addons.mozilla.org/firefox/downloads/file/3748692/sponsorblock_skip_sponsorships_on_youtube-2.0.13.1-an+fx.xpi"; - meta = with lib; { - homepage = "https://sponsor.ajay.app/"; - description = "Easily skip YouTube video sponsors. When you visit a YouTube video, the extension will check the database for reported sponsors and automatically skip known sponsors. You can also report sponsors in videos."; - license = licenses.gpl3; - platforms = platforms.all; - }; + meta = with lib; { + homepage = "https://sponsor.ajay.app/"; + description = + "Easily skip YouTube video sponsors. When you visit a YouTube video, the extension will check the database for reported sponsors and automatically skip known sponsors. You can also report sponsors in videos."; + license = licenses.gpl3; + platforms = platforms.all; + }; } diff --git a/private b/private index 2cad6718..664922fd 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 2cad6718e6c0ac9d4feef604dfa77e95f4dbcdbe +Subproject commit 664922fd71af79ee0a985e678b63eed8a22e343b diff --git a/profiles/gui/home/mpv.nix b/profiles/gui/home/mpv.nix index a4ee3bd7..2633dae6 100644 --- a/profiles/gui/home/mpv.nix +++ b/profiles/gui/home/mpv.nix @@ -14,11 +14,12 @@ hwdec = "auto"; demuxer-max-bytes = "2000MiB"; demuxer-max-back-bytes = "250MiB"; - osd-scale-by-window = false; - osd-bar-h = 2.5; # 3.125 default - osd-border-size = 2; # font border pixels, default 3 - term-osd-bar = true; - script-opts = lib.concatStringsSep "," (lib.mapAttrsToList (k: v: "${k}=${toString v}") { + osd-scale-by-window = false; + osd-bar-h = 2.5; # 3.125 default + osd-border-size = 2; # font border pixels, default 3 + term-osd-bar = true; + script-opts = lib.concatStringsSep "," + (lib.mapAttrsToList (k: v: "${k}=${toString v}") { osc-layout = "slimbox"; osc-vidscale = "no"; osc-deadzonesize = 0.75; @@ -30,8 +31,8 @@ osc-seekbarkeyframes = "no"; osc-seekrangestyle = "slider"; }); - }; }; + }; programs.syncplay = { enable = false; diff --git a/services/nginx.nix b/services/nginx.nix index 57484f93..1cd61c9c 100644 --- a/services/nginx.nix +++ b/services/nginx.nix @@ -2,15 +2,14 @@ { secrets.files.dns_creds = { - text = '' - RFC2136_NAMESERVER='ns1.as207960.net' - RFC2136_TSIG_ALGORITHM='hmac-sha512.' - RFC2136_TSIG_KEY='${tf.variables.glauca_key.ref}' - RFC2136_TSIG_SECRET='${tf.variables.glauca_secret.ref}' + text = '' + RFC2136_NAMESERVER='ns1.as207960.net' + RFC2136_TSIG_ALGORITHM='hmac-sha512.' + RFC2136_TSIG_KEY='${tf.variables.glauca_key.ref}' + RFC2136_TSIG_SECRET='${tf.variables.glauca_secret.ref}' ''; }; - services.nginx = { enable = true; recommendedGzipSettings = true;