From 6f64608b0b1512f00c59455865c98f04a0fcf2e4 Mon Sep 17 00:00:00 2001 From: MoritzBoehme Date: Thu, 11 Nov 2021 18:34:54 +0100 Subject: [PATCH] nixpkgs-format all files --- flake.nix | 3 ++- modules/apps/kitty.nix | 6 +++--- modules/apps/rofi/default.nix | 9 +++++---- modules/apps/zathura.nix | 7 ++++--- modules/cachix.nix | 6 +++--- modules/cachix/nix-community.nix | 1 - modules/cli/git.nix | 9 +++++---- modules/cli/zsh.nix | 3 ++- modules/containers/media.nix | 3 ++- modules/desktop/polybar/default.nix | 9 +++++---- modules/editors/emacs.nix | 3 ++- modules/services/diskstation/default.nix | 16 +++++++++------- modules/services/kdeconnect.nix | 3 ++- modules/services/picom.nix | 7 ++++--- secrets/secrets.nix | 3 ++- 15 files changed, 50 insertions(+), 38 deletions(-) diff --git a/flake.nix b/flake.nix index 4f94a7a..516d483 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,8 @@ emacs-overlay.url = "github:nix-community/emacs-overlay"; - home-manager = { url = "github:nix-community/home-manager"; }; + home-manager.url = "github:nix-community/home-manager"; + picom = { url = "github:jonaburg/picom"; flake = false; diff --git a/modules/apps/kitty.nix b/modules/apps/kitty.nix index 1cb6d75..f61ea4b 100644 --- a/modules/apps/kitty.nix +++ b/modules/apps/kitty.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: -let - base = { +{ + home-manager.users.moritz = { programs.kitty = { enable = true; settings = { @@ -67,4 +67,4 @@ let }; }; }; -in { home-manager.users.moritz = { ... }: (base); } +} diff --git a/modules/apps/rofi/default.nix b/modules/apps/rofi/default.nix index 5a1a198..d01165a 100644 --- a/modules/apps/rofi/default.nix +++ b/modules/apps/rofi/default.nix @@ -1,7 +1,8 @@ { config, lib, pkgs, ... }: -let - base = (home: { +{ + home-manager.users.moritz = { + programs.rofi = { enable = true; package = pkgs.rofi.override { plugins = with pkgs; [ rofi-calc ]; }; @@ -15,5 +16,5 @@ let dmenu_command = rofi ''; }; - }); -in { home-manager.users.moritz = { ... }: (base "/home/moritz/"); } + }; +} diff --git a/modules/apps/zathura.nix b/modules/apps/zathura.nix index e87bbf4..77499f4 100644 --- a/modules/apps/zathura.nix +++ b/modules/apps/zathura.nix @@ -1,7 +1,8 @@ { config, lib, pkgs, ... }: -let - base = { +{ + home-manager.users.moritz = { + programs.zathura = { enable = true; options = { @@ -51,4 +52,4 @@ let }; }; }; -in { home-manager.users.moritz = { ... }: (base); } +} diff --git a/modules/cachix.nix b/modules/cachix.nix index 88b2f08..777f38f 100644 --- a/modules/cachix.nix +++ b/modules/cachix.nix @@ -1,4 +1,3 @@ - # WARN: this file will get overwritten by $ cachix use { pkgs, lib, ... }: @@ -7,7 +6,8 @@ let toImport = name: value: folder + ("/" + name); filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key; imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder)); -in { +in +{ inherit imports; - nix.binaryCaches = ["https://cache.nixos.org/"]; + nix.binaryCaches = [ "https://cache.nixos.org/" ]; } diff --git a/modules/cachix/nix-community.nix b/modules/cachix/nix-community.nix index 427a518..7e4be28 100644 --- a/modules/cachix/nix-community.nix +++ b/modules/cachix/nix-community.nix @@ -1,4 +1,3 @@ - { nix = { binaryCaches = [ diff --git a/modules/cli/git.nix b/modules/cli/git.nix index c6ce386..99ca6b3 100644 --- a/modules/cli/git.nix +++ b/modules/cli/git.nix @@ -1,7 +1,8 @@ { config, lib, pkgs, ... }: -let - base = (home: { +{ + home-manager.users.moritz = { + programs.git = { enable = true; userName = "MoritzBoehme"; @@ -9,5 +10,5 @@ let extraConfig = { init.defaultBranch = "main"; }; delta.enable = true; }; - }); -in { home-manager.users.moritz = { ... }: (base "/home/moritz"); } + }; +} diff --git a/modules/cli/zsh.nix b/modules/cli/zsh.nix index 7697b86..5976e13 100644 --- a/modules/cli/zsh.nix +++ b/modules/cli/zsh.nix @@ -36,7 +36,8 @@ let }; }; }); -in { +in +{ environment.pathsToLink = [ "/share/zsh" ]; home-manager.users.moritz = { ... }: (base "/home/moritz"); } diff --git a/modules/containers/media.nix b/modules/containers/media.nix index 2ac4ea2..795a926 100644 --- a/modules/containers/media.nix +++ b/modules/containers/media.nix @@ -5,7 +5,8 @@ let puid = "1000"; pgid = "100"; timeZone = "Europe/Berlin"; -in { +in +{ home-manager.users.moritz = { home.packages = with pkgs; [ docker-compose ]; home.file = { diff --git a/modules/desktop/polybar/default.nix b/modules/desktop/polybar/default.nix index 37ced76..260b4b1 100644 --- a/modules/desktop/polybar/default.nix +++ b/modules/desktop/polybar/default.nix @@ -1,7 +1,8 @@ { config, lib, pkgs, ... }: -let - base = { +{ + home-manager.users.moritz = { + services.polybar = { enable = true; package = pkgs.polybar.override { pulseSupport = true; }; @@ -9,10 +10,10 @@ let for m in $(polybar --list-monitors | ${pkgs.coreutils}/bin/cut -d":" -f1); do MONITOR=$m polybar --reload bottom & done - ''; + ''; config = ./config.ini; extraConfig = builtins.readFile ./modules.ini + builtins.readFile ./colors.ini; }; }; -in { home-manager.users.moritz = { ... }: (base); } +} diff --git a/modules/editors/emacs.nix b/modules/editors/emacs.nix index 8ce7f5c..6edb538 100644 --- a/modules/editors/emacs.nix +++ b/modules/editors/emacs.nix @@ -3,7 +3,8 @@ let emacs = with pkgs; ((emacsPackagesNgGen emacsGcc).emacsWithPackages (epkgs: [ epkgs.vterm ])); -in { +in +{ fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ]; home-manager.users.moritz = { diff --git a/modules/services/diskstation/default.nix b/modules/services/diskstation/default.nix index 21b0587..5e54602 100644 --- a/modules/services/diskstation/default.nix +++ b/modules/services/diskstation/default.nix @@ -25,14 +25,16 @@ fileSystems."/media/media" = { device = "//192.168.0.2/media"; fsType = "cifs"; - options = let - # this line prevents hanging on network split - automount_opts = - "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; + options = + let + # this line prevents hanging on network split + automount_opts = + "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; - in [ - "${automount_opts},credentials=/run/secrets/smbMedia,uid=1000,gid=100" - ]; + in + [ + "${automount_opts},credentials=/run/secrets/smbMedia,uid=1000,gid=100" + ]; }; # fileSystems."/media/diskstation" = { diff --git a/modules/services/kdeconnect.nix b/modules/services/kdeconnect.nix index d12b5d7..d8e9df7 100644 --- a/modules/services/kdeconnect.nix +++ b/modules/services/kdeconnect.nix @@ -4,7 +4,8 @@ let from = 1714; to = 1764; }; -in { +in +{ home-manager.users.moritz.services = { kdeconnect.enable = true; }; networking.firewall = { allowedTCPPortRanges = [ ports ]; diff --git a/modules/services/picom.nix b/modules/services/picom.nix index 2ca376e..35ba25c 100644 --- a/modules/services/picom.nix +++ b/modules/services/picom.nix @@ -1,7 +1,8 @@ { config, lib, pkgs, ... }: -let - base = { +{ + home-manager.users.moritz = { + services.picom = { enable = true; inactiveOpacity = "0.90"; @@ -48,4 +49,4 @@ let ''; }; }; -in { home-manager.users.moritz = { ... }: (base); } +} diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 07194fd..031eb03 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -8,7 +8,8 @@ let nixos-desktop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKl8gMhwSf1NsP5gp14xbbyjqQLZzcHLb/XKRMoHdXgI"; hosts = [ nixos-laptop nixos-desktop ]; -in { +in +{ "nordvpn.age".publicKeys = users ++ hosts; "davfs.age".publicKeys = users ++ hosts; "smbMoritz.age".publicKeys = users ++ hosts;