From e9f7ec570d36919881e76aeb73d9a5926058b2b5 Mon Sep 17 00:00:00 2001 From: kat witch Date: Fri, 30 Apr 2021 20:36:36 +0100 Subject: [PATCH] project-wide: nixdirfmt --- default.nix | 5 ++- pkgs/default.nix | 12 ++++--- profiles/gui/home/firefox/userChrome.css.nix | 20 +++++------ profiles/gui/home/kitty.nix | 8 +++-- profiles/gui/home/obs.nix | 4 +-- profiles/gui/home/syncplay.nix | 6 ++-- profiles/sway/home/mako.nix | 8 +++-- profiles/sway/home/sway.nix | 36 +++++++++++--------- profiles/sway/home/waybar/default.nix | 8 +++-- services/calendar.nix | 28 +++++++-------- 10 files changed, 77 insertions(+), 58 deletions(-) diff --git a/default.nix b/default.nix index 65cf4936..b626d3de 100644 --- a/default.nix +++ b/default.nix @@ -1,7 +1,10 @@ rec { sources = import ./nix/sources.nix; pkgs = import ./pkgs { inherit sources; }; - witch = import ./lib/witch.nix { inherit pkgs; lib = pkgs.lib; }; + witch = import ./lib/witch.nix { + inherit pkgs; + lib = pkgs.lib; + }; profiles = witch.modList { modulesDir = ./profiles; defaultFile = "nixos.nix"; diff --git a/pkgs/default.nix b/pkgs/default.nix index bb7e60f2..f3f1b672 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -5,10 +5,11 @@ let overlay = self: super: rec { - dino = super.callPackage "${sources.qyliss-nixlib}/overlays/patches/dino" { - inherit (super) dino; - }; - + dino = + super.callPackage "${sources.qyliss-nixlib}/overlays/patches/dino" { + inherit (super) dino; + }; + discord = super.discord.override { nss = self.nss; }; ncmpcpp = super.ncmpcpp.override { @@ -50,7 +51,8 @@ let obs-studio = super.obs-studio.override { pipewireSupport = true; }; - hextorgba = (import ../lib/colorhelpers.nix { inherit (super) lib; }).hextorgba; + hextorgba = + (import ../lib/colorhelpers.nix { inherit (super) lib; }).hextorgba; ff-sponsorblock = self.callPackage ./ff-sponsorblock { }; diff --git a/profiles/gui/home/firefox/userChrome.css.nix b/profiles/gui/home/firefox/userChrome.css.nix index 279b6123..0727b067 100644 --- a/profiles/gui/home/firefox/userChrome.css.nix +++ b/profiles/gui/home/firefox/userChrome.css.nix @@ -1,15 +1,15 @@ { profile }: '' -#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items { - opacity: 0; - pointer-events: none; -} -#main-window:not([tabsintitlebar="true"]) #TabsToolbar { - visibility: collapse !important; -} + #main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items { + opacity: 0; + pointer-events: none; + } + #main-window:not([tabsintitlebar="true"]) #TabsToolbar { + visibility: collapse !important; + } -#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { - display: none; -} + #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { + display: none; + } '' diff --git a/profiles/gui/home/kitty.nix b/profiles/gui/home/kitty.nix index 0db98535..9a0025b2 100644 --- a/profiles/gui/home/kitty.nix +++ b/profiles/gui/home/kitty.nix @@ -1,10 +1,14 @@ { config, lib, pkgs, witch, ... }: -let witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") config.lib.arc.base16.schemeForAlias.default; witch.style.font = { +let + witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") + config.lib.arc.base16.schemeForAlias.default; + witch.style.font = { name = "FantasqueSansMono Nerd Font"; size = "10"; size_css = "14px"; - }; in { + }; +in { programs.kitty = { enable = true; font.name = witch.style.font.name; diff --git a/profiles/gui/home/obs.nix b/profiles/gui/home/obs.nix index cc25e037..01b973cf 100644 --- a/profiles/gui/home/obs.nix +++ b/profiles/gui/home/obs.nix @@ -6,7 +6,5 @@ plugins = [ pkgs.obs-wlrobs ]; }; - programs.zsh.shellAliases = { - obs="env QT_QPA_PLATFORM=xcb obs"; - }; + programs.zsh.shellAliases = { obs = "env QT_QPA_PLATFORM=xcb obs"; }; } diff --git a/profiles/gui/home/syncplay.nix b/profiles/gui/home/syncplay.nix index 32c015e9..f6406bca 100644 --- a/profiles/gui/home/syncplay.nix +++ b/profiles/gui/home/syncplay.nix @@ -1,13 +1,15 @@ { config, ... }: { - + programs.syncplay = { enable = true; username = "kat"; defaultRoom = "lounge"; server = { host = "sync.kittywit.ch"; }; - playerArgs = [ "--ytdl-format=bestvideo[height<=1080]+bestaudio/best[height<=1080]/bestvideo+bestaudio/best" ]; + playerArgs = [ + "--ytdl-format=bestvideo[height<=1080]+bestaudio/best[height<=1080]/bestvideo+bestaudio/best" + ]; # gui = false; config = { client_settings = { diff --git a/profiles/sway/home/mako.nix b/profiles/sway/home/mako.nix index b6cac99c..90313d66 100644 --- a/profiles/sway/home/mako.nix +++ b/profiles/sway/home/mako.nix @@ -1,10 +1,14 @@ { config, pkgs, lib, witch, ... }: -let witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") config.lib.arc.base16.schemeForAlias.default; witch.style.font = { +let + witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") + config.lib.arc.base16.schemeForAlias.default; + witch.style.font = { name = "FantasqueSansMono Nerd Font"; size = "10"; size_css = "14px"; - }; in { + }; +in { systemd.user.services = { mako = { Unit = { diff --git a/profiles/sway/home/sway.nix b/profiles/sway/home/sway.nix index 34a43b4a..19861f35 100644 --- a/profiles/sway/home/sway.nix +++ b/profiles/sway/home/sway.nix @@ -1,10 +1,14 @@ { config, pkgs, lib, witch, ... }: -let witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") config.lib.arc.base16.schemeForAlias.default; witch.style.font = { +let + witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") + config.lib.arc.base16.schemeForAlias.default; + witch.style.font = { name = "FantasqueSansMono Nerd Font"; size = "10"; size_css = "14px"; - }; in { + }; +in { home.sessionVariables = { MOZ_ENABLE_WAYLAND = 1; XDG_CURRENT_DESKTOP = "sway"; @@ -12,21 +16,21 @@ let witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb} }; home.packages = with pkgs; [ grim slurp wl-clipboard jq ]; - - systemd.user.services.i3gopher = { - Unit = { - Description = "i3 focus history"; - After = ["sway-session.target"]; - PartOf = ["graphical-session.target"]; - }; - Service = { - Type = "exec"; - Restart = "on-failure"; - StandardOutput = "null"; - ExecStart = "${pkgs.i3gopher}/bin/i3gopher"; - }; - Install.WantedBy = ["sway-session.target"]; + + systemd.user.services.i3gopher = { + Unit = { + Description = "i3 focus history"; + After = [ "sway-session.target" ]; + PartOf = [ "graphical-session.target" ]; }; + Service = { + Type = "exec"; + Restart = "on-failure"; + StandardOutput = "null"; + ExecStart = "${pkgs.i3gopher}/bin/i3gopher"; + }; + Install.WantedBy = [ "sway-session.target" ]; + }; programs.zsh.profileExtra = '' # If running from tty1 start sway diff --git a/profiles/sway/home/waybar/default.nix b/profiles/sway/home/waybar/default.nix index a936e8f4..c7950c24 100644 --- a/profiles/sway/home/waybar/default.nix +++ b/profiles/sway/home/waybar/default.nix @@ -1,10 +1,14 @@ { config, lib, pkgs, witch, ... }: -let witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") config.lib.arc.base16.schemeForAlias.default; witch.style.font = { +let + witch.style.base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") + config.lib.arc.base16.schemeForAlias.default; + witch.style.font = { name = "FantasqueSansMono Nerd Font"; size = "10"; size_css = "14px"; - }; in { + }; +in { config = lib.mkIf config.deploy.profile.sway { programs.waybar = { enable = true; diff --git a/services/calendar.nix b/services/calendar.nix index 57420fa3..2b7f203d 100644 --- a/services/calendar.nix +++ b/services/calendar.nix @@ -5,10 +5,8 @@ with lib; let mailAccounts = config.mailserver.loginAccounts; htpasswd = pkgs.writeText "radicale.users" (concatStrings - (flip mapAttrsToList mailAccounts (mail: user: - mail + ":" + user.hashedPassword + "\n" - )) - ); + (flip mapAttrsToList mailAccounts + (mail: user: mail + ":" + user.hashedPassword + "\n"))); in { services.radicale = { @@ -22,19 +20,19 @@ in { }; services.nginx.virtualHosts = { - "cal.kittywit.ch" = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://localhost:5232/"; - extraConfig = '' - proxy_set_header X-Script-Name /; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass_header Authorization; - ''; - }; + "cal.kittywit.ch" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:5232/"; + extraConfig = '' + proxy_set_header X-Script-Name /; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass_header Authorization; + ''; }; }; + }; deploy.tf.dns.records.kittywitch_cal = { tld = "kittywit.ch.";