From 692ef91ba914e6ed411c8ef67fb3b0aadd1e171a Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Sat, 20 Apr 2024 19:00:09 +0200 Subject: [PATCH] Improve the formatting --- hosts/common.nix | 10 +++++++-- hosts/seb-desktop/hardware.nix | 19 +++++++++++++--- hosts/seb-laptop/hardware.nix | 12 ++++++---- modules/home/de/default.nix | 1 - modules/home/de/tray.nix | 26 ++++++++++----------- modules/home/de/waybar.nix | 41 +++++++++++++++++++++++++++++----- modules/home/git.nix | 4 +--- modules/home/shell/default.nix | 1 - modules/home/ssh-client.nix | 1 + modules/system/boot-loader.nix | 7 +++++- modules/system/syncthing.nix | 5 ++++- modules/system/wlan.nix | 6 ++--- users/seb/default.nix | 7 +++++- users/seb/home.nix | 7 +++++- 14 files changed, 107 insertions(+), 40 deletions(-) diff --git a/hosts/common.nix b/hosts/common.nix index 0dfab4e..aeae008 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -4,10 +4,16 @@ system.stateVersion = "23.11"; nix.settings = { - experimental-features = ["nix-command" "flakes"]; + experimental-features = [ + "nix-command" + "flakes" + ]; auto-optimise-store = true; warn-dirty = false; - trusted-users = ["root" "@wheel"]; + trusted-users = [ + "root" + "@wheel" + ]; substituters = ["https://hyprland.cachix.org"]; trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; diff --git a/hosts/seb-desktop/hardware.nix b/hosts/seb-desktop/hardware.nix index 4d2a640..305fc22 100644 --- a/hosts/seb-desktop/hardware.nix +++ b/hosts/seb-desktop/hardware.nix @@ -11,8 +11,18 @@ ]; hardware.enableRedistributableFirmware = true; - boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; - boot.kernelModules = ["kvm-amd" "adm1021" "nct6775"]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; + boot.kernelModules = [ + "kvm-amd" + "adm1021" + "nct6775" + ]; nixpkgs.hostPlatform = "x86_64-linux"; hardware.cpu.amd.updateMicrocode = true; @@ -40,7 +50,10 @@ settingsSha256 = "sha256-QKN/gLGlT+/hAdYKlkIjZTgvubzQTt4/ki5Y+2Zj3pk="; persistencedSha256 = "sha256-FRMqY5uAJzq3o+YdM2Mdjj8Df6/cuUUAnh52Ne4koME="; - patches = [rcu_patch linux_6_8_patch]; + patches = [ + rcu_patch + linux_6_8_patch + ]; }; }; diff --git a/hosts/seb-laptop/hardware.nix b/hosts/seb-laptop/hardware.nix index 1555c58..a6d147d 100644 --- a/hosts/seb-laptop/hardware.nix +++ b/hosts/seb-laptop/hardware.nix @@ -9,12 +9,16 @@ fsType = "vfat"; }; - swapDevices = [ - {device = "/dev/disk/by-uuid/1eba93d1-4853-4534-8cfd-5c14e29c6ff6";} - ]; + swapDevices = [{device = "/dev/disk/by-uuid/1eba93d1-4853-4534-8cfd-5c14e29c6ff6";}]; hardware.enableRedistributableFirmware = true; - boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod"]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usb_storage" + "sd_mod" + ]; boot.kernelModules = ["kvm-amd"]; nixpkgs.hostPlatform = "x86_64-linux"; hardware.cpu.amd.updateMicrocode = true; diff --git a/modules/home/de/default.nix b/modules/home/de/default.nix index 4320c12..e6de3c3 100644 --- a/modules/home/de/default.nix +++ b/modules/home/de/default.nix @@ -2,7 +2,6 @@ imports = [ ./qtile.nix ./hyprland - ./theming.nix ./rofi ./tray.nix diff --git a/modules/home/de/tray.nix b/modules/home/de/tray.nix index 7366d58..c5f75eb 100644 --- a/modules/home/de/tray.nix +++ b/modules/home/de/tray.nix @@ -22,15 +22,14 @@ in { Unit = { Description = "Syncthingtray"; Requires = ["tray.target"]; - After = ["graphical-session-pre.target" "tray.target"]; + After = [ + "graphical-session-pre.target" + "tray.target" + ]; PartOf = ["graphical-session.target"]; }; - Service = { - ExecStart = "${lib.getExe' pkgs.syncthingtray-minimal "syncthingtray"} --wait"; - }; - Install = { - WantedBy = ["graphical-session.target"]; - }; + Service.ExecStart = "${lib.getExe' pkgs.syncthingtray-minimal "syncthingtray"} --wait"; + Install.WantedBy = ["graphical-session.target"]; }; }; }) @@ -43,15 +42,14 @@ in { Unit = { Description = "Networkmanager-applet"; Requires = ["tray.target"]; - After = ["graphical-session-pre.target" "tray.target"]; + After = [ + "graphical-session-pre.target" + "tray.target" + ]; PartOf = ["graphical-session.target"]; }; - Service = { - ExecStart = "${lib.getExe pkgs.networkmanagerapplet}"; - }; - Install = { - WantedBy = ["graphical-session.target"]; - }; + Service.ExecStart = "${lib.getExe pkgs.networkmanagerapplet}"; + Install.WantedBy = ["graphical-session.target"]; }; }; }) diff --git a/modules/home/de/waybar.nix b/modules/home/de/waybar.nix index 2e57d9f..409c5be 100644 --- a/modules/home/de/waybar.nix +++ b/modules/home/de/waybar.nix @@ -19,7 +19,13 @@ modules-left = ["clock"]; modules-center = ["hyprland/workspaces"]; - modules-right = ["tray" "network" "wireplumber" "backlight" "battery"]; + modules-right = [ + "tray" + "network" + "wireplumber" + "backlight" + "battery" + ]; "hyprland/workspaces" = { active-only = false; @@ -36,7 +42,12 @@ format = ""; format-wifi = "{icon}"; - format-icons = ["󰤟" "󰤢" "󰤥" "󰤨"]; + format-icons = [ + "󰤟" + "󰤢" + "󰤥" + "󰤨" + ]; tooltip-format-wifi = "{essid} 󰇚 {bandwidthDownBits} 󰕒 {bandwidthUpBits}"; format-ethernet = "󰌗"; @@ -49,7 +60,11 @@ wireplumber = { format = "{icon} {volume}%"; format-muted = "󰝟"; - format-icons = ["󰕿" "󰖀" "󰕾"]; + format-icons = [ + "󰕿" + "󰖀" + "󰕾" + ]; scroll-step = "5"; }; @@ -61,7 +76,11 @@ backlight = { device = "amdgpu_bl1"; format = "{icon} {percent}%"; - format-icons = ["󰃞" "󰃟" "󰃠"]; + format-icons = [ + "󰃞" + "󰃟" + "󰃠" + ]; }; battery = { @@ -70,7 +89,19 @@ critical = 5; }; format = "{icon} {capacity}%"; - format-icons = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + format-icons = [ + "󰂎" + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; }; }; }; diff --git a/modules/home/git.nix b/modules/home/git.nix index 4929c00..5e818e4 100644 --- a/modules/home/git.nix +++ b/modules/home/git.nix @@ -12,9 +12,7 @@ userName = "SebastianStork"; userEmail = "sebastian.stork@pm.me"; - extraConfig = { - init.defaultBranch = "main"; - }; + extraConfig.init.defaultBranch = "main"; }; programs.lazygit.enable = true; diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix index 6340c42..ebdca41 100644 --- a/modules/home/shell/default.nix +++ b/modules/home/shell/default.nix @@ -19,7 +19,6 @@ in { config = { programs.bash.enable = cfg.bash.enable; - programs.zsh.enable = cfg.zsh.enable; }; } diff --git a/modules/home/ssh-client.nix b/modules/home/ssh-client.nix index 7f83122..7b6b0a7 100644 --- a/modules/home/ssh-client.nix +++ b/modules/home/ssh-client.nix @@ -16,6 +16,7 @@ identityFile = ["~/.ssh/kluebero/id_ed25519"]; }; }; + services.ssh-agent.enable = true; }; } diff --git a/modules/system/boot-loader.nix b/modules/system/boot-loader.nix index 794eaa6..209cb78 100644 --- a/modules/system/boot-loader.nix +++ b/modules/system/boot-loader.nix @@ -25,7 +25,12 @@ (lib.mkIf config.myConfig.boot-loader.silent { boot = { - kernelParams = ["quiet" "rd.systemd.show_status=false" "rd.udev.log_level=3" "udev.log_priority=3"]; + kernelParams = [ + "quiet" + "rd.systemd.show_status=false" + "rd.udev.log_level=3" + "udev.log_priority=3" + ]; consoleLogLevel = 3; initrd.verbose = false; initrd.systemd.enable = true; diff --git a/modules/system/syncthing.nix b/modules/system/syncthing.nix index 9a4143a..2f8d68e 100644 --- a/modules/system/syncthing.nix +++ b/modules/system/syncthing.nix @@ -23,7 +23,10 @@ }; folders = let - allDevices = ["seb-desktop" "seb-laptop"]; + allDevices = [ + "seb-desktop" + "seb-laptop" + ]; staggeredVersioning = { type = "staggered"; params = { diff --git a/modules/system/wlan.nix b/modules/system/wlan.nix index 4757376..ea5ba30 100644 --- a/modules/system/wlan.nix +++ b/modules/system/wlan.nix @@ -31,7 +31,7 @@ key-mgmt = "wpa-psk"; psk = "$HOME_PSK"; }; - ipv4 = {method = "auto";}; + ipv4.method = "auto"; ipv6 = { addr-gen-mode = "default"; method = "auto"; @@ -54,7 +54,7 @@ key-mgmt = "wpa-psk"; psk = "$MOBILE_PSK"; }; - ipv4 = {method = "auto";}; + ipv4.method = "auto"; ipv6 = { addr-gen-mode = "default"; method = "auto"; @@ -83,7 +83,7 @@ password = "$SCHOOL_PSK"; phase2-auth = "pap"; }; - ipv4 = {method = "auto";}; + ipv4.method = "auto"; ipv6 = { addr-gen-mode = "default"; method = "auto"; diff --git a/users/seb/default.nix b/users/seb/default.nix index 447c881..552d171 100644 --- a/users/seb/default.nix +++ b/users/seb/default.nix @@ -7,7 +7,12 @@ isNormalUser = true; description = "Sebastian Stork"; hashedPasswordFile = config.sops.secrets.seb-password.path; - extraGroups = ["wheel" "networkmanager" "libvirtd" "video"]; + extraGroups = [ + "wheel" + "networkmanager" + "libvirtd" + "video" + ]; }; home-manager.users.seb = ./home.nix; diff --git a/users/seb/home.nix b/users/seb/home.nix index c0560e3..578a0f7 100644 --- a/users/seb/home.nix +++ b/users/seb/home.nix @@ -53,7 +53,12 @@ pkgs.vlc pkgs.onlyoffice-bin_latest - (pkgs.nerdfonts.override {fonts = ["JetBrainsMono" "NerdFontsSymbolsOnly"];}) + (pkgs.nerdfonts.override { + fonts = [ + "JetBrainsMono" + "NerdFontsSymbolsOnly" + ]; + }) pkgs.corefonts pkgs.roboto pkgs.open-sans