From d4f1d7543c0bc789e076412a4a5d5056b7db28c9 Mon Sep 17 00:00:00 2001 From: fleaz Date: Wed, 23 Feb 2022 23:42:42 +0100 Subject: [PATCH] fmt --- home-manager/default.nix | 4 +- home-manager/modules/kanshi.nix | 6 +- home-manager/modules/sway.nix | 234 +++++++++++------------ home-manager/modules/vscode.nix | 2 +- machines/cray/configuration.nix | 2 +- machines/cray/hardware-configuration.nix | 9 +- modules/avahi.nix | 2 +- users/fleaz.nix | 4 +- 8 files changed, 133 insertions(+), 130 deletions(-) diff --git a/home-manager/default.nix b/home-manager/default.nix index 87d4e86..0f82d9e 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -100,7 +100,7 @@ in EDITOR = "vim"; XDG_SCREENSHOTS_DIR = "/home/fleaz/screenshots/"; PATH = "$PATH:/home/fleaz/bin:/home/fleaz/workspace/go/bin"; - DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox"; + DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox"; }; oh-my-zsh = { enable = true; @@ -138,7 +138,7 @@ in day = 5500; night = 3300; }; - + }; services.blueman-applet.enable = true; diff --git a/home-manager/modules/kanshi.nix b/home-manager/modules/kanshi.nix index 2b1d8e3..810e951 100644 --- a/home-manager/modules/kanshi.nix +++ b/home-manager/modules/kanshi.nix @@ -1,6 +1,6 @@ { - services.kanshi = { - enable = true; - }; + services.kanshi = { + enable = true; + }; } diff --git a/home-manager/modules/sway.nix b/home-manager/modules/sway.nix index c7f6330..67d1b89 100644 --- a/home-manager/modules/sway.nix +++ b/home-manager/modules/sway.nix @@ -1,123 +1,123 @@ { pkgs, nixosConfig, lib, ... }: { - wayland.windowManager.sway = { - enable = true; - wrapperFeatures.gtk = true; + wayland.windowManager.sway = { + enable = true; + wrapperFeatures.gtk = true; - config = { - modifier = "Mod4"; - focus.followMouse = false; - - input = { - "type:keyboard" = { xkb_layout = "eu"; }; - #"1133:49295:Logitech_G403_HERO_Gaming_Mouse" = { - # pointer_accel = "1"; - #}; - }; - output = { - "*".bg = "/home/fleaz/Downloads/spongebob.jpg fill"; - } // lib.optionals (nixosConfig.networking.hostName == "cray") { - "DP-1" = { - mode = "1920x1200"; - transform = "270"; - position = "0,0"; - }; - "HDMI-A-1" = { - mode = "3840x2160"; - scale = "1.3"; - position = "1200,0"; - }; - "DP-2" = { - mode = "3840x2160"; - scale = "1.3"; - position = "4152,0"; - }; - }; - - gaps = { inner = 8; }; - window.border = 0; - workspaceAutoBackAndForth = true; - terminal = "foot"; - - bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; - - keybindings = - let - mod = "Mod4"; - pactl = "${pkgs.pulseaudioLight}/bin/pactl"; - playerctl = "${pkgs.playerctl}/bin/playerctl"; - in - { - "${mod}+Return" = "exec foot"; - "${mod}+p" = "exec ${pkgs.wofi}/bin/wofi --show drun"; - - "${mod}+Shift+c" = "reload"; - "${mod}+Shift+q" = "kill"; - "${mod}+Shift+e" = - "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"; - "${mod}+x" = "move workspace to output right"; - - "${mod}+h" = "focus left"; - "${mod}+j" = "focus down"; - "${mod}+k" = "focus up"; - "${mod}+l" = "focus right"; - - "${mod}+Shift+h" = "move left"; - "${mod}+Shift+j" = "move down"; - "${mod}+Shift+k" = "move up"; - "${mod}+Shift+l" = "move right"; - - "${mod}+s" = "split v"; - "${mod}+w" = "split h"; - - "${mod}+t" = "layout tabbed"; - "${mod}+r" = "mode resize"; - - "${mod}+f" = "fullscreen toggle"; - "${mod}+Shift+space" = "floating toggle"; - - "${mod}+1" = "workspace 1"; - "${mod}+2" = "workspace 2"; - "${mod}+3" = "workspace 3"; - "${mod}+4" = "workspace 4"; - "${mod}+5" = "workspace 5"; - "${mod}+6" = "workspace 6"; - "${mod}+7" = "workspace 7"; - "${mod}+8" = "workspace 8"; - "${mod}+9" = "workspace 9"; - "${mod}+0" = "workspace 10"; - - "${mod}+Shift+1" = "move container to workspace 1"; - "${mod}+Shift+2" = "move container to workspace 2"; - "${mod}+Shift+3" = "move container to workspace 3"; - "${mod}+Shift+4" = "move container to workspace 4"; - "${mod}+Shift+5" = "move container to workspace 5"; - "${mod}+Shift+6" = "move container to workspace 6"; - "${mod}+Shift+7" = "move container to workspace 7"; - "${mod}+Shift+8" = "move container to workspace 8"; - "${mod}+Shift+9" = "move container to workspace 9"; - "${mod}+Shift+0" = "move container to workspace 10"; - - ## MacroPad - # Print, Pause, AudioRaiseVolume - "Print" = "exec grimshot save area"; - "Pause" = "exec systemctl suspend"; - "XF86AudioRaiseVolume" = - "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%"; - # Tools, AudioMute, AudioLowerVolume - "Tools" = "exec swaylock"; - "XF86AudioMute" = - "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle"; - "XF86AudioLowerVolume" = - "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%"; - - # AudioPrev, AudioPlay, AudioNext - "XF86AudioNext" = "exec ${playerctl} next"; - "XF86AudioPlay" = "exec ${playerctl} play-pause"; - "XF86AudioPrev" = "exec ${playerctl} previous"; - }; + config = { + modifier = "Mod4"; + focus.followMouse = false; + input = { + "type:keyboard" = { xkb_layout = "eu"; }; + #"1133:49295:Logitech_G403_HERO_Gaming_Mouse" = { + # pointer_accel = "1"; + #}; + }; + output = { + "*".bg = "/home/fleaz/Downloads/spongebob.jpg fill"; + } // lib.optionals (nixosConfig.networking.hostName == "cray") { + "DP-1" = { + mode = "1920x1200"; + transform = "270"; + position = "0,0"; + }; + "HDMI-A-1" = { + mode = "3840x2160"; + scale = "1.3"; + position = "1200,0"; + }; + "DP-2" = { + mode = "3840x2160"; + scale = "1.3"; + position = "4152,0"; + }; }; - }; - } + gaps = { inner = 8; }; + window.border = 0; + workspaceAutoBackAndForth = true; + terminal = "foot"; + + bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; + + keybindings = + let + mod = "Mod4"; + pactl = "${pkgs.pulseaudioLight}/bin/pactl"; + playerctl = "${pkgs.playerctl}/bin/playerctl"; + in + { + "${mod}+Return" = "exec foot"; + "${mod}+p" = "exec ${pkgs.wofi}/bin/wofi --show drun"; + + "${mod}+Shift+c" = "reload"; + "${mod}+Shift+q" = "kill"; + "${mod}+Shift+e" = + "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"; + "${mod}+x" = "move workspace to output right"; + + "${mod}+h" = "focus left"; + "${mod}+j" = "focus down"; + "${mod}+k" = "focus up"; + "${mod}+l" = "focus right"; + + "${mod}+Shift+h" = "move left"; + "${mod}+Shift+j" = "move down"; + "${mod}+Shift+k" = "move up"; + "${mod}+Shift+l" = "move right"; + + "${mod}+s" = "split v"; + "${mod}+w" = "split h"; + + "${mod}+t" = "layout tabbed"; + "${mod}+r" = "mode resize"; + + "${mod}+f" = "fullscreen toggle"; + "${mod}+Shift+space" = "floating toggle"; + + "${mod}+1" = "workspace 1"; + "${mod}+2" = "workspace 2"; + "${mod}+3" = "workspace 3"; + "${mod}+4" = "workspace 4"; + "${mod}+5" = "workspace 5"; + "${mod}+6" = "workspace 6"; + "${mod}+7" = "workspace 7"; + "${mod}+8" = "workspace 8"; + "${mod}+9" = "workspace 9"; + "${mod}+0" = "workspace 10"; + + "${mod}+Shift+1" = "move container to workspace 1"; + "${mod}+Shift+2" = "move container to workspace 2"; + "${mod}+Shift+3" = "move container to workspace 3"; + "${mod}+Shift+4" = "move container to workspace 4"; + "${mod}+Shift+5" = "move container to workspace 5"; + "${mod}+Shift+6" = "move container to workspace 6"; + "${mod}+Shift+7" = "move container to workspace 7"; + "${mod}+Shift+8" = "move container to workspace 8"; + "${mod}+Shift+9" = "move container to workspace 9"; + "${mod}+Shift+0" = "move container to workspace 10"; + + ## MacroPad + # Print, Pause, AudioRaiseVolume + "Print" = "exec grimshot save area"; + "Pause" = "exec systemctl suspend"; + "XF86AudioRaiseVolume" = + "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%"; + # Tools, AudioMute, AudioLowerVolume + "Tools" = "exec swaylock"; + "XF86AudioMute" = + "exec ${pactl} set-sink-mute @DEFAULT_SINK@ toggle"; + "XF86AudioLowerVolume" = + "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%"; + + # AudioPrev, AudioPlay, AudioNext + "XF86AudioNext" = "exec ${playerctl} next"; + "XF86AudioPlay" = "exec ${playerctl} play-pause"; + "XF86AudioPrev" = "exec ${playerctl} previous"; + }; + + }; + }; + +} diff --git a/home-manager/modules/vscode.nix b/home-manager/modules/vscode.nix index 43801d2..5d94282 100644 --- a/home-manager/modules/vscode.nix +++ b/home-manager/modules/vscode.nix @@ -9,7 +9,7 @@ # Terraform and HCL support hashicorp.terraform - + # Python ms-python.python diff --git a/machines/cray/configuration.nix b/machines/cray/configuration.nix index 9a31b74..a3c3546 100644 --- a/machines/cray/configuration.nix +++ b/machines/cray/configuration.nix @@ -48,7 +48,7 @@ in time.timeZone = "Europe/Berlin"; time.hardwareClockInLocalTime = true; #Be compatible with Windows - + # The global useDHCP flag is deprecated, therefore explicitly set to false here. # Per-interface useDHCP will be mandatory in the future, so this generated config # replicates the default behaviour. diff --git a/machines/cray/hardware-configuration.nix b/machines/cray/hardware-configuration.nix index 01cd6b3..6ea824d 100644 --- a/machines/cray/hardware-configuration.nix +++ b/machines/cray/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; @@ -14,7 +15,8 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/60e06bf9-f4c4-4555-879b-23ade6599704"; + { + device = "/dev/disk/by-uuid/60e06bf9-f4c4-4555-879b-23ade6599704"; fsType = "ext4"; }; @@ -32,7 +34,8 @@ [ "${automount_opts},credentials=/etc/nixos/smb-secrets" ]; }; fileSystems."/boot/efi" = - { device = "/dev/disk/by-uuid/274B-0F7C"; + { + device = "/dev/disk/by-uuid/274B-0F7C"; fsType = "vfat"; }; diff --git a/modules/avahi.nix b/modules/avahi.nix index 6fd877b..8bc3c42 100644 --- a/modules/avahi.nix +++ b/modules/avahi.nix @@ -5,4 +5,4 @@ ipv4 = true; ipv6 = true; }; -} \ No newline at end of file +} diff --git a/users/fleaz.nix b/users/fleaz.nix index 0121fcb..febe186 100644 --- a/users/fleaz.nix +++ b/users/fleaz.nix @@ -2,9 +2,9 @@ users.users.fleaz = { isNormalUser = true; extraGroups = [ - "wheel" # Enable ‘sudo’ for the user. + "wheel" # Enable ‘sudo’ for the user. "networkmanager" # Access to networkmanager - "docker" # Access to the "/run/docker.sock" + "docker" # Access to the "/run/docker.sock" ]; shell = pkgs.zsh; hashedPassword = "$6$9dARC6e2RxgPC9f1$QfXpT71cXA7YiFhv75Nnq2OrbQ8xlHMzgrJdaBaETaAVHLX5j8QUAl71dxMlqD.CtTLxe566kL5Q6da7Kqnvp/";