diff --git a/machines/cray/configuration.nix b/machines/cray/configuration.nix index ce85b8c..7bf1b34 100644 --- a/machines/cray/configuration.nix +++ b/machines/cray/configuration.nix @@ -5,12 +5,12 @@ { config, pkgs, ... }: { - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - - ]; + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + + ../../modules/sound.nix + ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; @@ -75,15 +75,6 @@ services.printing.enable = true; - # Enable sound. - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; @@ -96,10 +87,10 @@ # allow evil closed-source code nixpkgs.config.allowUnfree = true; - virtualisation.podman = { - enable=true; - dockerCompat = true; - }; + virtualisation.podman = { + enable = true; + dockerCompat = true; + }; home-manager.users.fleaz = { pkgs, ... }: { home.packages = with pkgs; [ @@ -112,12 +103,14 @@ wdisplays wofi firefox + go + tig + nixfmt discord gnome.gnome-keyring via docker-compose - swaylock swayidle wl-clipboard @@ -130,7 +123,6 @@ htop ]; - programs.vim = { enable = true; plugins = with pkgs.vimPlugins; [ vim-airline neoformat vim-monokai ]; @@ -148,9 +140,7 @@ userEmail = "mail@felixbreidenstein.de"; }; - programs.waybar = { - enable = true; - }; + programs.waybar = { enable = true; }; programs.mako = { enable = true; @@ -169,95 +159,85 @@ }; }; - programs.foot = { - enable = true; - settings = { - main = { - term = "xterm-256color"; - font = "FiraCode:size=14"; - }; - scrollback = { - lines = 100000; - }; - colors = { - alpha = "0.98"; - foreground = "B3B1AD"; - background = "0A0E14"; - regular0 = "01060E"; - regular1 = "EA6C73"; - regular2 = "91B362"; - regular3 = "F9AF4F"; - regular4 = "53BDFA"; - regular5 = "FAE994"; - regular6 = "90E1C6"; - regular7 = "C7C7C7"; - bright0 = "686868"; - bright1 = "F07178"; - bright2 = "C2D94C"; - bright3 = "FFB454"; - bright4 = "59C2FF"; - bright5 = "FFEE99"; - bright6 = "95E6CB"; - bright7 = "FFFFFF"; - }; - }; - }; - - + programs.foot = { + enable = true; + settings = { + main = { + term = "xterm-256color"; + font = "FiraCode:size=14"; + }; + scrollback = { lines = 100000; }; + colors = { + alpha = "0.98"; + foreground = "B3B1AD"; + background = "0A0E14"; + regular0 = "01060E"; + regular1 = "EA6C73"; + regular2 = "91B362"; + regular3 = "F9AF4F"; + regular4 = "53BDFA"; + regular5 = "FAE994"; + regular6 = "90E1C6"; + regular7 = "C7C7C7"; + bright0 = "686868"; + bright1 = "F07178"; + bright2 = "C2D94C"; + bright3 = "FFB454"; + bright4 = "59C2FF"; + bright5 = "FFEE99"; + bright6 = "95E6CB"; + bright7 = "FFFFFF"; + }; + }; + }; wayland.windowManager.sway = { enable = true; config = { modifier = "Mod4"; - input = { - "17498:8800:KBDFans_DZ60" = { - xkb_layout = "eu"; - }; - #"1133:49295:Logitech_G403_HERO_Gaming_Mouse" = { - # pointer_accel = "1"; - #}; - }; + input = { + "17498:8800:KBDFans_DZ60" = { xkb_layout = "eu"; }; + #"1133:49295:Logitech_G403_HERO_Gaming_Mouse" = { + # pointer_accel = "1"; + #}; + }; output = { "*".bg = "/home/fleaz/Downloads/spongebob.jpg fill"; - "DVI-D-1" = { - mode = "1920x1200"; - transform = "270"; - position = "0,0"; - }; - "HDMI-A-1" = { - mode = "3840x2160"; - scale = "1.2"; - position = "1200,0"; - }; - "DP-1" = { - mode = "3840x2160"; - scale = "1.2"; - position = "4400,0"; - }; + "DVI-D-1" = { + mode = "1920x1200"; + transform = "270"; + position = "0,0"; + }; + "HDMI-A-1" = { + mode = "3840x2160"; + scale = "1.2"; + position = "1200,0"; + }; + "DP-1" = { + mode = "3840x2160"; + scale = "1.2"; + position = "4400,0"; + }; }; - gaps = { - inner = 8; - }; - window.border = 0; - workspaceAutoBackAndForth = true; - terminal = "foot"; + gaps = { inner = 8; }; + window.border = 0; + workspaceAutoBackAndForth = true; + terminal = "foot"; - bars = [ { - command = "${pkgs.waybar}/bin/waybar"; - }]; + bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; - keybindings = let - mod = "Mod4"; - in { - "${mod}+Return" = "exec foot"; - "${mod}+p" = "exec ${pkgs.wofi}/bin/wofi --show drun"; + keybindings = let mod = "Mod4"; + 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}+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"; @@ -300,26 +280,22 @@ "${mod}+Shift+9" = "move container to workspace 9"; "${mod}+Shift+0" = "move container to workspace 10"; + # Multimedia Keys + "XF86AudioMute" = + "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; + "XF86AudioRaiseVolume" = + "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; + "XF86AudioLowerVolume" = + "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%"; + }; - # Multimedia Keys - "XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; - "XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; - "XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%"; - }; - - }; + }; }; }; - # List packages installed in system profile. To search, run: # $ nix search wget - environment.systemPackages = with pkgs; [ - neovim - wget - curl - git - ]; + environment.systemPackages = with pkgs; [ neovim wget curl git ]; programs.neovim.vimAlias = true; diff --git a/machines/cray/hardware-configuration.nix b/machines/cray/hardware-configuration.nix index fca4215..f9f2ac9 100644 --- a/machines/cray/hardware-configuration.nix +++ b/machines/cray/hardware-configuration.nix @@ -4,28 +4,27 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = + [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/1d2ce540-2fce-4621-8a4d-e05e09369bc3"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/1d2ce540-2fce-4621-8a4d-e05e09369bc3"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/782C-3B0B"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/782C-3B0B"; + fsType = "vfat"; + }; swapDevices = - [ { device = "/dev/disk/by-uuid/6a0a9641-00c5-490e-abcc-9efeaeaca1f8"; } - ]; + [{ device = "/dev/disk/by-uuid/6a0a9641-00c5-490e-abcc-9efeaeaca1f8"; }]; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/machines/jimbo/configuration.nix b/machines/jimbo/configuration.nix index 7069c37..7f4e14e 100644 --- a/machines/jimbo/configuration.nix +++ b/machines/jimbo/configuration.nix @@ -7,14 +7,12 @@ let home-manager = (import ./nix/sources.nix).home-manager; secretsFile = "/root.key"; -in -{ - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - "${home-manager}/nixos" - ]; +in { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + "${home-manager}/nixos" + ]; # Use the systemd-boot EFI boot loader. boot.loader.efi.canTouchEfiVariables = true; @@ -38,7 +36,6 @@ in # copy the secret into the additional initramfs. `null` means same path boot.initrd.secrets."${secretsFile}" = null; - networking.hostName = "jimbo"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -49,13 +46,12 @@ in networking.useDHCP = false; networking.networkmanager.enable = true; - hardware.opengl = { enable = true; driSupport = true; }; - xdg = { + xdg = { portal = { enable = true; extraPortals = with pkgs; [ @@ -90,12 +86,7 @@ in }; # List packages installed in system profile. To search, run: - environment.systemPackages = with pkgs; [ - vim - wget - curl - git - ]; + environment.systemPackages = with pkgs; [ vim wget curl git ]; services.openssh.enable = true; programs.ssh.startAgent = true; @@ -118,7 +109,6 @@ in vscode vscode-extensions.vscodevim.vim - wdisplays albert firefox @@ -163,7 +153,6 @@ in htop ]; - programs.neovim = { enable = true; vimAlias = true; @@ -174,16 +163,14 @@ in }; programs.zsh = { - enable = true; - sessionVariables = { - GOPATH = "/home/fleaz/workspace/go"; - }; - oh-my-zsh = { - enable = true; - plugins = [ "git" "fzf" ]; - theme = "robbyrussell"; - }; - history.size = 10000; + enable = true; + sessionVariables = { GOPATH = "/home/fleaz/workspace/go"; }; + oh-my-zsh = { + enable = true; + plugins = [ "git" "fzf" ]; + theme = "robbyrussell"; + }; + history.size = 10000; }; programs.git = { @@ -192,9 +179,7 @@ in userEmail = "mail@felixbreidenstein.de"; }; - programs.waybar = { - enable = true; - }; + programs.waybar = { enable = true; }; programs.mako = { enable = true; @@ -225,7 +210,6 @@ in }; }; - services.blueman-applet.enable = true; programs.foot = { @@ -235,9 +219,7 @@ in term = "xterm-256color"; font = "FiraCode:size=14"; }; - scrollback = { - lines = 100000; - }; + scrollback = { lines = 100000; }; colors = { alpha = "0.98"; foreground = "B3B1AD"; @@ -262,8 +244,6 @@ in }; }; - - wayland.windowManager.sway = { enable = true; @@ -272,9 +252,7 @@ in focus.followMouse = false; input = { - "17498:8800:KBDFans_DZ60" = { - xkb_layout = "eu"; - }; + "17498:8800:KBDFans_DZ60" = { xkb_layout = "eu"; }; #"1133:49295:Logitech_G403_HERO_Gaming_Mouse" = { # pointer_accel = "1"; #}; @@ -298,77 +276,73 @@ in }; }; - gaps = { - inner = 8; - }; + gaps = { inner = 8; }; window.border = 0; workspaceAutoBackAndForth = true; terminal = "foot"; - bars = [{ - command = "${pkgs.waybar}/bin/waybar"; - }]; + bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; - keybindings = - let - mod = "Mod4"; - in - { - "${mod}+Return" = "exec foot"; - "${mod}+p" = "exec ${pkgs.wofi}/bin/wofi --show drun"; + keybindings = let mod = "Mod4"; + 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}+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}+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}+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}+s" = "split v"; + "${mod}+w" = "split h"; - "${mod}+t" = "layout tabbed"; - "${mod}+r" = "mode resize"; + "${mod}+t" = "layout tabbed"; + "${mod}+r" = "mode resize"; - "${mod}+f" = "fullscreen toggle"; - "${mod}+Shift+space" = "floating toggle"; + "${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}+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"; + "${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"; - - # Multimedia Keys - "XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; - "XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; - "XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%"; - }; + # Multimedia Keys + "XF86AudioMute" = + "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle"; + "XF86AudioRaiseVolume" = + "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%"; + "XF86AudioLowerVolume" = + "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%"; + }; }; }; diff --git a/machines/jimbo/hardware-configuration.nix b/machines/jimbo/hardware-configuration.nix index cc7c7f3..9285a68 100644 --- a/machines/jimbo/hardware-configuration.nix +++ b/machines/jimbo/hardware-configuration.nix @@ -4,36 +4,33 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = + [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-uuid/5c29ff32-7186-4bfb-91ba-4bd14a72c7fa"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/5c29ff32-7186-4bfb-91ba-4bd14a72c7fa"; + fsType = "ext4"; + }; - boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/55265801-0adc-4cde-9e88-a6c4a2a6c8c1"; + boot.initrd.luks.devices."cryptroot".device = + "/dev/disk/by-uuid/55265801-0adc-4cde-9e88-a6c4a2a6c8c1"; - fileSystems."/boot/efi" = - { - device = "/dev/disk/by-uuid/A809-ABDC"; - fsType = "vfat"; - }; + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/A809-ABDC"; + fsType = "vfat"; + }; - swapDevices = - [{ - device = "/dev/disk/by-partuuid/706747af-4066-461f-8eac-06339c68f0db"; - randomEncryption = true; - }]; + swapDevices = [{ + device = "/dev/disk/by-partuuid/706747af-4066-461f-8eac-06339c68f0db"; + randomEncryption = true; + }]; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/modules/sound.nix b/modules/sound.nix new file mode 100644 index 0000000..dc79888 --- /dev/null +++ b/modules/sound.nix @@ -0,0 +1,10 @@ +{ ... }: { + # Enable sound. + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; +}