From 8fffd442ae035d57c27c31751242bb5931ab9da0 Mon Sep 17 00:00:00 2001 From: devhell Date: Wed, 19 Jun 2019 10:45:11 +0100 Subject: machines/devhell/: Rename machines and new console font I'm bored of the names my machines have. Luckily NixOS makes changing names as easy as changing underwear! So, let's use Valkyrie names instead. Also, change the console font to something nicer, like the default `Lat2-Terminus16` font! --- machines/default.nix | 6 +- machines/devhell/eir.nix | 247 +++++++++++++++++++++++++++++++++++++ machines/devhell/eris.nix | 247 ------------------------------------- machines/devhell/hildr.nix | 206 +++++++++++++++++++++++++++++++ machines/devhell/sigrun.nix | 267 ++++++++++++++++++++++++++++++++++++++++ machines/devhell/skunkworks.nix | 267 ---------------------------------------- machines/devhell/titan.nix | 206 ------------------------------- 7 files changed, 723 insertions(+), 723 deletions(-) create mode 100644 machines/devhell/eir.nix delete mode 100644 machines/devhell/eris.nix create mode 100644 machines/devhell/hildr.nix create mode 100644 machines/devhell/sigrun.nix delete mode 100644 machines/devhell/skunkworks.nix delete mode 100644 machines/devhell/titan.nix (limited to 'machines') diff --git a/machines/default.nix b/machines/default.nix index dfb2b320..236d2a5d 100644 --- a/machines/default.nix +++ b/machines/default.nix @@ -12,9 +12,9 @@ with import ../lib; }; }; devhell = { - eris = callMachine devhell/eris.nix {}; - skunkworks = callMachine devhell/skunkworks.nix {}; - titan = callMachine devhell/titan.nix {}; + eir = callMachine devhell/eir.nix {}; + sigrun = callMachine devhell/sigrun.nix {}; + hildr = callMachine devhell/hildr.nix {}; gunnr = callMachine devhell/gunnr.nix {}; }; openlab = { diff --git a/machines/devhell/eir.nix b/machines/devhell/eir.nix new file mode 100644 index 00000000..e5e0ccbc --- /dev/null +++ b/machines/devhell/eir.nix @@ -0,0 +1,247 @@ +{ config, pkgs, lib, ... }: + +{ + vuizvui.user.devhell.profiles.base.enable = true; + vuizvui.system.kernel.bfq.enable = true; + + boot = { + loader = { + timeout = 2; + systemd-boot = { + enable = true; + }; + + efi.canTouchEfiVariables = true; + }; + + initrd = { + availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" ]; + kernelModules = [ "fuse" ]; + postDeviceCommands = '' + echo noop > /sys/block/sda/queue/scheduler + ''; + }; + + kernelModules = [ "tp_smapi" ]; + extraModulePackages = [ config.boot.kernelPackages.tp_smapi ]; + }; + + hardware = { + opengl = { + enable = true; + extraPackages = [ pkgs.libvdpau-va-gl pkgs.vaapiVdpau pkgs.vaapiIntel ]; + }; + }; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/4788e218-db0f-4fd6-916e-e0c484906eb0"; + fsType = "btrfs"; + options = [ + "autodefrag" + "space_cache" + "compress=zstd" + "noatime" + ]; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/BDBC-FC8B"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # FIXME Check if this is still necessary in the future + systemd.services.systemd-networkd-wait-online.enable = false; + + # XXX Ensure that these are added in addition to the DHCP proviced DNS servers + systemd.network.networks."99-main".dns = [ "1.1.1.1" "8.8.8.8" ]; + + networking = { + hostName = "eir"; + wireless.iwd.enable = true; + useNetworkd = true; + }; + + virtualisation.docker.enable = false; + + nix = { + maxJobs = lib.mkDefault 4; + extraOptions = '' + auto-optimise-store = true + ''; + }; + + i18n = { + consoleFont = "Lat2-Terminus16"; + consoleKeyMap = "uk"; + defaultLocale = "en_GB.UTF-8"; + }; + + #### Machine-specific service configuration #### + + vuizvui.user.devhell.profiles.services.enable = true; + + services = { + tftpd.enable = false; + gnome3.gnome-keyring.enable = true; + printing = { + enable = true; + drivers = [ pkgs.foo2zjs pkgs.hplip pkgs.cups-brother-hl1110 ]; + }; + }; + + services.udev = { + extraRules = '' + SUBSYSTEM=="firmware", ACTION=="add", ATTR{loading}="-1" + ''; + }; + + services.acpid = { + enable = true; + lidEventCommands = '' + LID="/proc/acpi/button/lid/LID/state" + state=`cat $LID | ${pkgs.gawk}/bin/awk '{print $2}'` + case "$state" in + *open*) ;; + *close*) systemctl suspend ;; + *) logger -t lid-handler "Failed to detect lid state ($state)" ;; + esac + ''; + }; + + services.compton = { + enable = true; + extraOptions = '' + inactive-dim = 0.2; + ''; + }; + + services.xserver = { + enable = true; + layout = "gb"; + videoDrivers = [ "modesetting" ]; + + libinput = { + enable = true; + disableWhileTyping = true; + middleEmulation = true; + }; +# synaptics = { +# enable = true; +# twoFingerScroll = true; +# palmDetect = true; +# }; + + # XXX: Factor out and make DRY, because a lot of the stuff here is + # duplicated in the other machine configurations. + displayManager.sessionCommands = '' + ${pkgs.nitrogen}/bin/nitrogen --restore & + ${pkgs.rofi}/bin/rofi & + ${pkgs.xorg.xrdb}/bin/xrdb "${pkgs.writeText "xrdb.conf" '' + Xft.dpi: 96 + Xft.antialias: true + Xft.hinting: full + Xft.hintstyle: hintslight + Xft.rgba: rgb + Xft.lcdfilter: lcddefault + Xft.autohint: 1 + Xcursor.theme: Vanilla-DMZ-AA + Xcursor.size: 22 + *.charClass:33:48,35:48,37:48,43:48,45-47:48,61:48,63:48,64:48,95:48,126:48,35:48,58:48 + *background: #121212 + *foreground: #babdb6 + ${lib.concatMapStrings (xterm: '' + ${xterm}.termName: xterm-256color + ${xterm}*bellIsUrgent: true + ${xterm}*utf8: 1 + ${xterm}*locale: true + ${xterm}*utf8Title: true + ${xterm}*utf8Fonts: 1 + ${xterm}*utf8Latin1: true + ${xterm}*dynamicColors: true + ${xterm}*eightBitInput: true + ${xterm}*faceName: xft:DejaVu Sans Mono for Powerline:pixelsize=9:antialias=true:hinting=true + ${xterm}*faceNameDoublesize: xft:Unifont:pixelsize=12:antialias=true:hinting=true + ${xterm}*cursorColor: #545f65 + '') [ "UXTerm" "XTerm" ]} + ''}" + ''; + }; + + services.tlp = { + enable = true; + extraConfig = '' + TLP_ENABLE = 1 + DISK_IDLE_SECS_ON_BAT=2 + MAX_LOST_WORK_SECS_ON_AC=15 + MAX_LOST_WORK_SECS_ON_BAT=60 + SCHED_POWERSAVE_ON_AC=0 + SCHED_POWERSAVE_ON_BAT=1 + NMI_WATCHDOG=0 + DISK_DEVICES="sda sdb" + DISK_APM_LEVEL_ON_AC="254 254" + DISK_APM_LEVEL_ON_BAT="254 127" + DISK_IOSCHED="bfq bfq" + SATA_LINKPWR_ON_AC=max_performance + SATA_LINKPWR_ON_BAT=min_power + PCIE_ASPM_ON_AC=performance + PCIE_ASPM_ON_BAT=powersave + WIFI_PWR_ON_AC=1 + WIFI_PWR_ON_BAT=5 + WOL_DISABLE=Y + SOUND_POWER_SAVE_ON_AC=0 + SOUND_POWER_SAVE_ON_BAT=1 + SOUND_POWER_SAVE_CONTROLLER=Y + RUNTIME_PM_ON_AC=on + RUNTIME_PM_ON_BAT=auto + RUNTIME_PM_ALL=1 + USB_AUTOSUSPEND=1 + USB_BLACKLIST_WWAN=1 + RESTORE_DEVICE_STATE_ON_STARTUP=0 + DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wwan" + DEVICES_TO_ENABLE_ON_STARTUP="wifi" + DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan" + #DEVICES_TO_ENABLE_ON_SHUTDOWN="" + START_CHARGE_THRESH_BAT0=70 + STOP_CHARGE_THRESH_BAT0=95 + #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan" + #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan" + #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi" + #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan" + #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT="" + #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT="" + ''; + }; + + #### Machine-specific packages configuration #### + + vuizvui.user.devhell.profiles.packages.enable = true; + + nixpkgs.config.mpv.vaapiSupport = true; + + programs.light.enable = true; + + environment.systemPackages = with pkgs; [ + aircrackng + cdrtools + dvdplusrwtools + glxinfo + horst + iw + kismet + libva + libvdpau-va-gl + minicom + pamixer + pmtools + pmutils + reaverwps + signal-desktop + snort + vaapiVdpau + vdpauinfo + wavemon + xbindkeys + ]; +} diff --git a/machines/devhell/eris.nix b/machines/devhell/eris.nix deleted file mode 100644 index 2a189577..00000000 --- a/machines/devhell/eris.nix +++ /dev/null @@ -1,247 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - vuizvui.user.devhell.profiles.base.enable = true; - vuizvui.system.kernel.bfq.enable = true; - - boot = { - loader = { - timeout = 2; - systemd-boot = { - enable = true; - }; - - efi.canTouchEfiVariables = true; - }; - - initrd = { - availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" ]; - kernelModules = [ "fuse" ]; - postDeviceCommands = '' - echo noop > /sys/block/sda/queue/scheduler - ''; - }; - - kernelModules = [ "tp_smapi" ]; - extraModulePackages = [ config.boot.kernelPackages.tp_smapi ]; - }; - - hardware = { - opengl = { - enable = true; - extraPackages = [ pkgs.libvdpau-va-gl pkgs.vaapiVdpau pkgs.vaapiIntel ]; - }; - }; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/4788e218-db0f-4fd6-916e-e0c484906eb0"; - fsType = "btrfs"; - options = [ - "autodefrag" - "space_cache" - "compress=zstd" - "noatime" - ]; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/BDBC-FC8B"; - fsType = "vfat"; - }; - - swapDevices = [ ]; - - # FIXME Check if this is still necessary in the future - systemd.services.systemd-networkd-wait-online.enable = false; - - # XXX Ensure that these are added in addition to the DHCP proviced DNS servers - systemd.network.networks."99-main".dns = [ "1.1.1.1" "8.8.8.8" ]; - - networking = { - hostName = "eris"; - wireless.iwd.enable = true; - useNetworkd = true; - }; - - virtualisation.docker.enable = false; - - nix = { - maxJobs = lib.mkDefault 4; - extraOptions = '' - auto-optimise-store = true - ''; - }; - - i18n = { - consoleFont = "lat9w-16"; - consoleKeyMap = "uk"; - defaultLocale = "en_GB.UTF-8"; - }; - - #### Machine-specific service configuration #### - - vuizvui.user.devhell.profiles.services.enable = true; - - services = { - tftpd.enable = false; - gnome3.gnome-keyring.enable = true; - printing = { - enable = true; - drivers = [ pkgs.foo2zjs pkgs.hplip pkgs.cups-brother-hl1110 ]; - }; - }; - - services.udev = { - extraRules = '' - SUBSYSTEM=="firmware", ACTION=="add", ATTR{loading}="-1" - ''; - }; - - services.acpid = { - enable = true; - lidEventCommands = '' - LID="/proc/acpi/button/lid/LID/state" - state=`cat $LID | ${pkgs.gawk}/bin/awk '{print $2}'` - case "$state" in - *open*) ;; - *close*) systemctl suspend ;; - *) logger -t lid-handler "Failed to detect lid state ($state)" ;; - esac - ''; - }; - - services.compton = { - enable = true; - extraOptions = '' - inactive-dim = 0.2; - ''; - }; - - services.xserver = { - enable = true; - layout = "gb"; - videoDrivers = [ "modesetting" ]; - - libinput = { - enable = true; - disableWhileTyping = true; - middleEmulation = true; - }; -# synaptics = { -# enable = true; -# twoFingerScroll = true; -# palmDetect = true; -# }; - - # XXX: Factor out and make DRY, because a lot of the stuff here is - # duplicated in the other machine configurations. - displayManager.sessionCommands = '' - ${pkgs.nitrogen}/bin/nitrogen --restore & - ${pkgs.rofi}/bin/rofi & - ${pkgs.xorg.xrdb}/bin/xrdb "${pkgs.writeText "xrdb.conf" '' - Xft.dpi: 96 - Xft.antialias: true - Xft.hinting: full - Xft.hintstyle: hintslight - Xft.rgba: rgb - Xft.lcdfilter: lcddefault - Xft.autohint: 1 - Xcursor.theme: Vanilla-DMZ-AA - Xcursor.size: 22 - *.charClass:33:48,35:48,37:48,43:48,45-47:48,61:48,63:48,64:48,95:48,126:48,35:48,58:48 - *background: #121212 - *foreground: #babdb6 - ${lib.concatMapStrings (xterm: '' - ${xterm}.termName: xterm-256color - ${xterm}*bellIsUrgent: true - ${xterm}*utf8: 1 - ${xterm}*locale: true - ${xterm}*utf8Title: true - ${xterm}*utf8Fonts: 1 - ${xterm}*utf8Latin1: true - ${xterm}*dynamicColors: true - ${xterm}*eightBitInput: true - ${xterm}*faceName: xft:DejaVu Sans Mono for Powerline:pixelsize=9:antialias=true:hinting=true - ${xterm}*faceNameDoublesize: xft:Unifont:pixelsize=12:antialias=true:hinting=true - ${xterm}*cursorColor: #545f65 - '') [ "UXTerm" "XTerm" ]} - ''}" - ''; - }; - - services.tlp = { - enable = true; - extraConfig = '' - TLP_ENABLE = 1 - DISK_IDLE_SECS_ON_BAT=2 - MAX_LOST_WORK_SECS_ON_AC=15 - MAX_LOST_WORK_SECS_ON_BAT=60 - SCHED_POWERSAVE_ON_AC=0 - SCHED_POWERSAVE_ON_BAT=1 - NMI_WATCHDOG=0 - DISK_DEVICES="sda sdb" - DISK_APM_LEVEL_ON_AC="254 254" - DISK_APM_LEVEL_ON_BAT="254 127" - DISK_IOSCHED="bfq bfq" - SATA_LINKPWR_ON_AC=max_performance - SATA_LINKPWR_ON_BAT=min_power - PCIE_ASPM_ON_AC=performance - PCIE_ASPM_ON_BAT=powersave - WIFI_PWR_ON_AC=1 - WIFI_PWR_ON_BAT=5 - WOL_DISABLE=Y - SOUND_POWER_SAVE_ON_AC=0 - SOUND_POWER_SAVE_ON_BAT=1 - SOUND_POWER_SAVE_CONTROLLER=Y - RUNTIME_PM_ON_AC=on - RUNTIME_PM_ON_BAT=auto - RUNTIME_PM_ALL=1 - USB_AUTOSUSPEND=1 - USB_BLACKLIST_WWAN=1 - RESTORE_DEVICE_STATE_ON_STARTUP=0 - DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wwan" - DEVICES_TO_ENABLE_ON_STARTUP="wifi" - DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan" - #DEVICES_TO_ENABLE_ON_SHUTDOWN="" - START_CHARGE_THRESH_BAT0=70 - STOP_CHARGE_THRESH_BAT0=95 - #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan" - #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan" - #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi" - #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan" - #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT="" - #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT="" - ''; - }; - - #### Machine-specific packages configuration #### - - vuizvui.user.devhell.profiles.packages.enable = true; - - nixpkgs.config.mpv.vaapiSupport = true; - - programs.light.enable = true; - - environment.systemPackages = with pkgs; [ - aircrackng - cdrtools - dvdplusrwtools - glxinfo - horst - iw - kismet - libva - libvdpau-va-gl - minicom - pamixer - pmtools - pmutils - reaverwps - signal-desktop - snort - vaapiVdpau - vdpauinfo - wavemon - xbindkeys - ]; -} diff --git a/machines/devhell/hildr.nix b/machines/devhell/hildr.nix new file mode 100644 index 00000000..376d6a40 --- /dev/null +++ b/machines/devhell/hildr.nix @@ -0,0 +1,206 @@ +{ config, pkgs, lib, ... }: + +{ + vuizvui.user.devhell.profiles.base.enable = true; + vuizvui.system.kernel.bfq.enable = true; + + boot = { + loader = { + timeout = 2; + systemd-boot = { + enable = true; + }; + + efi.canTouchEfiVariables = true; + }; + + initrd = { + availableKernelModules = [ "xhci_hcd" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + kernelModules = [ "fuse" ]; + }; + + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + }; + + hardware = { + opengl = { + enable = true; + extraPackages = [ pkgs.libvdpau-va-gl pkgs.vaapiVdpau pkgs.vaapiIntel ]; + }; + }; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/3099f245-51cf-4ca8-b89c-269dbc0ad730"; + fsType = "btrfs"; + options = [ + "space_cache" + "compress=zstd" + "noatime" + "autodefrag" + ]; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/9344-E6FE"; + fsType = "vfat"; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/ff725995-b9a1-453f-9e6d-ba9bd6579db6"; } + ]; + + # FIXME Check if this is still necessary in the future + systemd.services.systemd-networkd-wait-online.enable = false; + + # XXX Ensure that these are added in addition to the DHCP proviced DNS servers + systemd.network.networks."99-main".dns = [ "1.1.1.1" "8.8.8.8" ]; + + networking = { + hostName = "hildr"; + wireless.enable = true; + useNetworkd = true; + }; + + powerManagement = { + powertop.enable = true; + cpuFreqGovernor = "powersave"; + }; + + virtualisation.docker.enable = true; + + nix = { + maxJobs = lib.mkDefault 4; + extraOptions = '' + auto-optimise-store = true + ''; + }; + + i18n = { + consoleFont = "Lat2-Terminus16"; + consoleKeyMap = "uk"; + defaultLocale = "en_GB.UTF-8"; + }; + + #### Machine-specific service configuration #### + + vuizvui.user.devhell.profiles.services.enable = true; + + services = { + tftpd.enable = false; + gnome3.gnome-keyring.enable = true; + printing = { + enable = true; + drivers = [ pkgs.foo2zjs pkgs.cups-brother-hl1110 ]; + }; + }; + + services.acpid = { + enable = true; + lidEventCommands = '' + LID="/proc/acpi/button/lid/LID/state" + state=`cat $LID | ${pkgs.gawk}/bin/awk '{print $2}'` + case "$state" in + *open*) ;; + *close*) systemctl suspend ;; + *) logger -t lid-handler "Failed to detect lid state ($state)" ;; + esac + ''; + }; + + services.compton = { + enable = true; + backend = "glx"; + vSync = "drm"; + extraOptions = '' + inactive-dim = 0.2; + ''; + }; + + services.xserver = { + enable = true; + layout = "gb"; + videoDrivers = [ "modesetting" ]; + + libinput = { + enable = true; + disableWhileTyping = true; + middleEmulation = true; + }; +# synaptics = { +# enable = true; +# twoFingerScroll = true; +# palmDetect = true; +# }; + + # XXX: Factor out and make DRY, because a lot of the stuff here is + # duplicated in the other machine configurations. + displayManager.sessionCommands = '' + ${pkgs.xbindkeys}/bin/xbindkeys & + ${pkgs.nitrogen}/bin/nitrogen --restore & + ${pkgs.xscreensaver}/bin/xscreensaver -no-splash & + ${pkgs.rofi}/bin/rofi & + ${pkgs.xorg.xrdb}/bin/xrdb "${pkgs.writeText "xrdb.conf" '' + Xft.dpi: 96 + Xft.antialias: true + Xft.hinting: full + Xft.hintstyle: hintslight + Xft.rgba: rgb + Xft.lcdfilter: lcddefault + Xft.autohint: 1 + Xcursor.theme: Vanilla-DMZ-AA + Xcursor.size: 22 + *.charClass:33:48,35:48,37:48,43:48,45-47:48,61:48,63:48,64:48,95:48,126:48,35:48,58:48 + *background: #121212 + *foreground: #babdb6 + ${lib.concatMapStrings (xterm: '' + ${xterm}.termName: xterm-256color + ${xterm}*bellIsUrgent: true + ${xterm}*utf8: 1 + ${xterm}*locale: true + ${xterm}*utf8Title: true + ${xterm}*utf8Fonts: 1 + ${xterm}*utf8Latin1: true + ${xterm}*dynamicColors: true + ${xterm}*eightBitInput: true + ${xterm}*faceName: xft:DejaVu Sans Mono for Powerline:pixelsize=9:antialias=true:hinting=true + ${xterm}*faceNameDoublesize: xft:Unifont:pixelsize=12:antialias=true:hinting=true + ${xterm}*cursorColor: #545f65 + '') [ "UXTerm" "XTerm" ]} + ''}" + ''; + }; + + #### Machine-specific packages configuration #### + + vuizvui.user.devhell.profiles.packages.enable = true; + + nixpkgs.config.mpv.vaapiSupport = true; + + programs.light.enable = true; + + environment.systemPackages = with pkgs; [ + aircrackng + cdrtools + docker + dvdplusrwtools + glxinfo + horst + ipmitool + iw + kismet + libva + libvdpau-va-gl + minicom + pamixer + pmtools + pmutils + reaverwps + signal-desktop + snort + vaapiVdpau + vdpauinfo + wavemon + xbindkeys + ]; +} diff --git a/machines/devhell/sigrun.nix b/machines/devhell/sigrun.nix new file mode 100644 index 00000000..2cd98c50 --- /dev/null +++ b/machines/devhell/sigrun.nix @@ -0,0 +1,267 @@ +{ config, pkgs, lib, ... }: + +{ + vuizvui.user.devhell.profiles.base.enable = true; + vuizvui.system.kernel.bfq.enable = true; + + boot = { + loader.grub = { + enable = true; + version = 2; + devices = [ + "/dev/disk/by-id/ata-ST31500541AS_6XW0NK21" + "/dev/disk/by-id/ata-ST31500541AS_6XW0P0CW" + "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNSAG848626F" + "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNSAG848674K" + ]; + }; + + initrd = { + availableKernelModules = [ "ehci_pci" "ahci" "firewire_ohci" "usbhid" "usb_storage" ]; + kernelModules = [ "fuse" ]; + }; + + kernelParams = [ "pci=noaer" ]; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + blacklistedKernelModules = [ "pcspkr" ]; + }; + + hardware = { + opengl = { + extraPackages = [ pkgs.vaapiVdpau ]; + }; + }; + + fileSystems."/" = { + label = "nixos"; + fsType = "btrfs"; + options = [ + "autodefrag" + "space_cache" + "compress=lzo" + "noatime" + "ssd" + ]; + }; + + fileSystems."/home" = { + label = "home"; + fsType = "btrfs"; + options = [ + "autodefrag" + "space_cache" + "compress=lzo" + "noatime" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/16bd9abd-6af5-4a24-8ea5-58adc51e9641"; } + { device = "/dev/disk/by-uuid/279708cb-f9c3-4a37-a064-80ff85a66f88"; } + { device = "/dev/disk/by-uuid/0c2409c3-e824-4759-a9ad-9bfcea1e73bb"; } + { device = "/dev/disk/by-uuid/3f1835a8-5587-4963-9b6c-66ecb36059de"; } + ]; + + networking.hostName = "sigrun"; + networking.wireless.enable = false; + networking.useNetworkd = true; + + nix.maxJobs = 8; + + i18n = { + consoleFont = "Lat2-Terminus16"; + consoleKeyMap = "dvorak"; + defaultLocale = "en_US.UTF-8"; + }; + + powerManagement.powerUpCommands = '' + ${pkgs.hdparm}/sbin/hdparm -B 255 \ + /dev/disk/by-id/ata-ST31500541AS_6XW0NK21 + ${pkgs.hdparm}/sbin/hdparm -B 255 \ + /dev/disk/by-id/ata-ST31500541AS_6XW0P0CW + ''; + + #### Machine-specific service configuration #### + + vuizvui.user.devhell.profiles.services.enable = true; + + services = { + printing = { + enable = true; + drivers = [ pkgs.hplipWithPlugin ]; + }; + timesyncd.enable = true; + resolved.enable = true; + canto-daemon.enable = true; + }; + + services.xserver = { + enable = true; + layout = "dvorak"; + videoDrivers = [ "ati" ]; + + serverLayoutSection = '' + Screen "Center/Right" + Screen "Left" LeftOf "Center/Right" + ''; + + config = '' + Section "ServerLayout" + Identifier "Multihead layout" + Screen "Center/Right" + Screen "Left" LeftOf "Center/Right" + EndSection + + Section "Device" + Identifier "Radeon HD 4650 PCIEx8" + Driver "radeon" + BusId "PCI:2:0:0" + + Option "monitor-DVI-1" "Left monitor" + EndSection + + Section "Device" + Identifier "Radeon HD 4650 PCIEx16" + Driver "radeon" + BusID "PCI:1:0:0" + + Option "monitor-DVI-0" "Center monitor" + Option "monitor-HDMI-0" "Right monitor" + EndSection + + Section "Screen" + Identifier "Center/Right" + Monitor "Left monitor" + Device "Radeon HD 4650 PCIEx16" + EndSection + + Section "Screen" + Identifier "Left" + Device "Radeon HD 4650 PCIEx8" + EndSection + + Section "Monitor" + Identifier "Left monitor" + EndSection + + Section "Monitor" + Identifier "Center monitor" + Option "LeftOf" "Right monitor" + Option "Primary" "true" + EndSection + + Section "Monitor" + Identifier "Right monitor" + EndSection + ''; + + # XXX: Factor out and make DRY, because a lot of the stuff here is + # duplicated in the other machine configurations. + displayManager.sessionCommands = '' + ${pkgs.xorg.xsetroot}/bin/xsetroot -solid black + ${pkgs.xscreensaver}/bin/xscreensaver -no-splash & + ${pkgs.rofi}/bin/rofi & + ${pkgs.xorg.xrdb}/bin/xrdb "${pkgs.writeText "xrdb.conf" '' + Xft.dpi: 96 + Xft.antialias: true + Xft.hinting: full + Xft.hintstyle: hintslight + Xft.rgba: rgb + Xft.lcdfilter: lcddefault + Xft.autohint: 1 + XTerm.termName: xterm-256color + XTerm*bellIsUrgent: true + XTerm*utf8: 1 + XTerm*locale: true + XTerm*utf8Title: true + XTerm*utf8Fonts: true + XTerm*utf8Latin1: true + XTerm*dynamicColors: true + XTerm*eightBitInput: true + Xcursor.theme: Vanilla-DMZ-AA + Xcursor.size: 22 + *.charClass:33:48,35:48,37:48,43:48,45-47:48,61:48,63:48,64:48,95:48,126:48,35:48,58:48 + XTerm*faceName: xft:DejaVu Sans Mono for Powerline:pixelsize=12:antialias=true:hinting=true + XTerm*faceNameDoublesize: xft:Unifont:pixelsize=12:antialias=true:hinting=true + XTerm*cursorColor: #545f65 + XTerm*saveLines: 10000 + ! Base16 Twilight + ! Scheme: David Hart (http://hart-dev.com) + #define base00 #1e1e1e + #define base01 #323537 + #define base02 #464b50 + #define base03 #5f5a60 + #define base04 #838184 + #define base05 #a7a7a7 + #define base06 #c3c3c3 + #define base07 #ffffff + #define base08 #cf6a4c + #define base09 #cda869 + #define base0A #f9ee98 + #define base0B #8f9d6a + #define base0C #afc4db + #define base0D #7587a6 + #define base0E #9b859d + #define base0F #9b703f + *.foreground: base05 + *.background: base00 + *.cursorColor: base05 + *.color0: base00 + *.color1: base08 + *.color2: base0B + *.color3: base0A + *.color4: base0D + *.color5: base0E + *.color6: base0C + *.color7: base05 + *.color8: base03 + *.color9: base09 + *.color10: base01 + *.color11: base02 + *.color12: base04 + *.color13: base06 + *.color14: base0F + *.color15: base07 + ! ------------------------------------------------------------------------------ + ! ROFI Color theme & Settings + ! ------------------------------------------------------------------------------ + rofi.modi: run + rofi.opacity: 85 + rofi.width: 100 + rofi.lines: 3 + rofi.padding: 450 + rofi.bw: 0 + rofi.eh: 2 + rofi.color-enabled: true + rofi.color-window: #393939, #393939, #268bd2 + rofi.color-normal: #393939, #ffffff, #393939, #268bd2, #ffffff + rofi.color-active: #393939, #268bd2, #393939, #268bd2, #205171 + rofi.color-urgent: #393939, #f3843d, #393939, #268bd2, #ffc39c + ''}" + + DISPLAY=:0.1 ${pkgs.windowmaker}/bin/wmaker & + ''; + }; + + #### Machine-specific packages configuration #### + + vuizvui.user.devhell.profiles.packages.enable = true; + + nixpkgs.config.chromium.enablePepperFlash = true; + nixpkgs.config.mpv.bs2bSupport = true; + + environment.systemPackages = with pkgs; [ + #ipfs + #scummvm + abook + canto-curses + cli-visualizer + cmus + handbrake + hplip + nzbget + slrn + twister + ]; +} diff --git a/machines/devhell/skunkworks.nix b/machines/devhell/skunkworks.nix deleted file mode 100644 index dc8d6265..00000000 --- a/machines/devhell/skunkworks.nix +++ /dev/null @@ -1,267 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - vuizvui.user.devhell.profiles.base.enable = true; - vuizvui.system.kernel.bfq.enable = true; - - boot = { - loader.grub = { - enable = true; - version = 2; - devices = [ - "/dev/disk/by-id/ata-ST31500541AS_6XW0NK21" - "/dev/disk/by-id/ata-ST31500541AS_6XW0P0CW" - "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNSAG848626F" - "/dev/disk/by-id/ata-Samsung_SSD_850_EVO_250GB_S21PNSAG848674K" - ]; - }; - - initrd = { - availableKernelModules = [ "ehci_pci" "ahci" "firewire_ohci" "usbhid" "usb_storage" ]; - kernelModules = [ "fuse" ]; - }; - - kernelParams = [ "pci=noaer" ]; - kernelModules = [ "kvm-intel" ]; - extraModulePackages = [ ]; - blacklistedKernelModules = [ "pcspkr" ]; - }; - - hardware = { - opengl = { - extraPackages = [ pkgs.vaapiVdpau ]; - }; - }; - - fileSystems."/" = { - label = "nixos"; - fsType = "btrfs"; - options = [ - "autodefrag" - "space_cache" - "compress=lzo" - "noatime" - "ssd" - ]; - }; - - fileSystems."/home" = { - label = "home"; - fsType = "btrfs"; - options = [ - "autodefrag" - "space_cache" - "compress=lzo" - "noatime" - ]; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/16bd9abd-6af5-4a24-8ea5-58adc51e9641"; } - { device = "/dev/disk/by-uuid/279708cb-f9c3-4a37-a064-80ff85a66f88"; } - { device = "/dev/disk/by-uuid/0c2409c3-e824-4759-a9ad-9bfcea1e73bb"; } - { device = "/dev/disk/by-uuid/3f1835a8-5587-4963-9b6c-66ecb36059de"; } - ]; - - networking.hostName = "skunkworks"; - networking.wireless.enable = false; - networking.useNetworkd = true; - - nix.maxJobs = 8; - - i18n = { - consoleFont = "lat9w-16"; - consoleKeyMap = "dvorak"; - defaultLocale = "en_US.UTF-8"; - }; - - powerManagement.powerUpCommands = '' - ${pkgs.hdparm}/sbin/hdparm -B 255 \ - /dev/disk/by-id/ata-ST31500541AS_6XW0NK21 - ${pkgs.hdparm}/sbin/hdparm -B 255 \ - /dev/disk/by-id/ata-ST31500541AS_6XW0P0CW - ''; - - #### Machine-specific service configuration #### - - vuizvui.user.devhell.profiles.services.enable = true; - - services = { - printing = { - enable = true; - drivers = [ pkgs.hplipWithPlugin ]; - }; - timesyncd.enable = true; - resolved.enable = true; - canto-daemon.enable = true; - }; - - services.xserver = { - enable = true; - layout = "dvorak"; - videoDrivers = [ "ati" ]; - - serverLayoutSection = '' - Screen "Center/Right" - Screen "Left" LeftOf "Center/Right" - ''; - - config = '' - Section "ServerLayout" - Identifier "Multihead layout" - Screen "Center/Right" - Screen "Left" LeftOf "Center/Right" - EndSection - - Section "Device" - Identifier "Radeon HD 4650 PCIEx8" - Driver "radeon" - BusId "PCI:2:0:0" - - Option "monitor-DVI-1" "Left monitor" - EndSection - - Section "Device" - Identifier "Radeon HD 4650 PCIEx16" - Driver "radeon" - BusID "PCI:1:0:0" - - Option "monitor-DVI-0" "Center monitor" - Option "monitor-HDMI-0" "Right monitor" - EndSection - - Section "Screen" - Identifier "Center/Right" - Monitor "Left monitor" - Device "Radeon HD 4650 PCIEx16" - EndSection - - Section "Screen" - Identifier "Left" - Device "Radeon HD 4650 PCIEx8" - EndSection - - Section "Monitor" - Identifier "Left monitor" - EndSection - - Section "Monitor" - Identifier "Center monitor" - Option "LeftOf" "Right monitor" - Option "Primary" "true" - EndSection - - Section "Monitor" - Identifier "Right monitor" - EndSection - ''; - - # XXX: Factor out and make DRY, because a lot of the stuff here is - # duplicated in the other machine configurations. - displayManager.sessionCommands = '' - ${pkgs.xorg.xsetroot}/bin/xsetroot -solid black - ${pkgs.xscreensaver}/bin/xscreensaver -no-splash & - ${pkgs.rofi}/bin/rofi & - ${pkgs.xorg.xrdb}/bin/xrdb "${pkgs.writeText "xrdb.conf" '' - Xft.dpi: 96 - Xft.antialias: true - Xft.hinting: full - Xft.hintstyle: hintslight - Xft.rgba: rgb - Xft.lcdfilter: lcddefault - Xft.autohint: 1 - XTerm.termName: xterm-256color - XTerm*bellIsUrgent: true - XTerm*utf8: 1 - XTerm*locale: true - XTerm*utf8Title: true - XTerm*utf8Fonts: true - XTerm*utf8Latin1: true - XTerm*dynamicColors: true - XTerm*eightBitInput: true - Xcursor.theme: Vanilla-DMZ-AA - Xcursor.size: 22 - *.charClass:33:48,35:48,37:48,43:48,45-47:48,61:48,63:48,64:48,95:48,126:48,35:48,58:48 - XTerm*faceName: xft:DejaVu Sans Mono for Powerline:pixelsize=12:antialias=true:hinting=true - XTerm*faceNameDoublesize: xft:Unifont:pixelsize=12:antialias=true:hinting=true - XTerm*cursorColor: #545f65 - XTerm*saveLines: 10000 - ! Base16 Twilight - ! Scheme: David Hart (http://hart-dev.com) - #define base00 #1e1e1e - #define base01 #323537 - #define base02 #464b50 - #define base03 #5f5a60 - #define base04 #838184 - #define base05 #a7a7a7 - #define base06 #c3c3c3 - #define base07 #ffffff - #define base08 #cf6a4c - #define base09 #cda869 - #define base0A #f9ee98 - #define base0B #8f9d6a - #define base0C #afc4db - #define base0D #7587a6 - #define base0E #9b859d - #define base0F #9b703f - *.foreground: base05 - *.background: base00 - *.cursorColor: base05 - *.color0: base00 - *.color1: base08 - *.color2: base0B - *.color3: base0A - *.color4: base0D - *.color5: base0E - *.color6: base0C - *.color7: base05 - *.color8: base03 - *.color9: base09 - *.color10: base01 - *.color11: base02 - *.color12: base04 - *.color13: base06 - *.color14: base0F - *.color15: base07 - ! ------------------------------------------------------------------------------ - ! ROFI Color theme & Settings - ! ------------------------------------------------------------------------------ - rofi.modi: run - rofi.opacity: 85 - rofi.width: 100 - rofi.lines: 3 - rofi.padding: 450 - rofi.bw: 0 - rofi.eh: 2 - rofi.color-enabled: true - rofi.color-window: #393939, #393939, #268bd2 - rofi.color-normal: #393939, #ffffff, #393939, #268bd2, #ffffff - rofi.color-active: #393939, #268bd2, #393939, #268bd2, #205171 - rofi.color-urgent: #393939, #f3843d, #393939, #268bd2, #ffc39c - ''}" - - DISPLAY=:0.1 ${pkgs.windowmaker}/bin/wmaker & - ''; - }; - - #### Machine-specific packages configuration #### - - vuizvui.user.devhell.profiles.packages.enable = true; - - nixpkgs.config.chromium.enablePepperFlash = true; - nixpkgs.config.mpv.bs2bSupport = true; - - environment.systemPackages = with pkgs; [ - #ipfs - #scummvm - abook - canto-curses - cli-visualizer - cmus - handbrake - hplip - nzbget - slrn - twister - ]; -} diff --git a/machines/devhell/titan.nix b/machines/devhell/titan.nix deleted file mode 100644 index efb023dd..00000000 --- a/machines/devhell/titan.nix +++ /dev/null @@ -1,206 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - vuizvui.user.devhell.profiles.base.enable = true; - vuizvui.system.kernel.bfq.enable = true; - - boot = { - loader = { - timeout = 2; - systemd-boot = { - enable = true; - }; - - efi.canTouchEfiVariables = true; - }; - - initrd = { - availableKernelModules = [ "xhci_hcd" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; - kernelModules = [ "fuse" ]; - }; - - kernelModules = [ "kvm-intel" ]; - extraModulePackages = [ ]; - }; - - hardware = { - opengl = { - enable = true; - extraPackages = [ pkgs.libvdpau-va-gl pkgs.vaapiVdpau pkgs.vaapiIntel ]; - }; - }; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/3099f245-51cf-4ca8-b89c-269dbc0ad730"; - fsType = "btrfs"; - options = [ - "space_cache" - "compress=zstd" - "noatime" - "autodefrag" - ]; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/9344-E6FE"; - fsType = "vfat"; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/ff725995-b9a1-453f-9e6d-ba9bd6579db6"; } - ]; - - # FIXME Check if this is still necessary in the future - systemd.services.systemd-networkd-wait-online.enable = false; - - # XXX Ensure that these are added in addition to the DHCP proviced DNS servers - systemd.network.networks."99-main".dns = [ "1.1.1.1" "8.8.8.8" ]; - - networking = { - hostName = "titan"; - wireless.enable = true; - useNetworkd = true; - }; - - powerManagement = { - powertop.enable = true; - cpuFreqGovernor = "powersave"; - }; - - virtualisation.docker.enable = true; - - nix = { - maxJobs = lib.mkDefault 4; - extraOptions = '' - auto-optimise-store = true - ''; - }; - - i18n = { - consoleFont = "lat9w-16"; - consoleKeyMap = "uk"; - defaultLocale = "en_GB.UTF-8"; - }; - - #### Machine-specific service configuration #### - - vuizvui.user.devhell.profiles.services.enable = true; - - services = { - tftpd.enable = false; - gnome3.gnome-keyring.enable = true; - printing = { - enable = true; - drivers = [ pkgs.foo2zjs pkgs.cups-brother-hl1110 ]; - }; - }; - - services.acpid = { - enable = true; - lidEventCommands = '' - LID="/proc/acpi/button/lid/LID/state" - state=`cat $LID | ${pkgs.gawk}/bin/awk '{print $2}'` - case "$state" in - *open*) ;; - *close*) systemctl suspend ;; - *) logger -t lid-handler "Failed to detect lid state ($state)" ;; - esac - ''; - }; - - services.compton = { - enable = true; - backend = "glx"; - vSync = "drm"; - extraOptions = '' - inactive-dim = 0.2; - ''; - }; - - services.xserver = { - enable = true; - layout = "gb"; - videoDrivers = [ "modesetting" ]; - - libinput = { - enable = true; - disableWhileTyping = true; - middleEmulation = true; - }; -# synaptics = { -# enable = true; -# twoFingerScroll = true; -# palmDetect = true; -# }; - - # XXX: Factor out and make DRY, because a lot of the stuff here is - # duplicated in the other machine configurations. - displayManager.sessionCommands = '' - ${pkgs.xbindkeys}/bin/xbindkeys & - ${pkgs.nitrogen}/bin/nitrogen --restore & - ${pkgs.xscreensaver}/bin/xscreensaver -no-splash & - ${pkgs.rofi}/bin/rofi & - ${pkgs.xorg.xrdb}/bin/xrdb "${pkgs.writeText "xrdb.conf" '' - Xft.dpi: 96 - Xft.antialias: true - Xft.hinting: full - Xft.hintstyle: hintslight - Xft.rgba: rgb - Xft.lcdfilter: lcddefault - Xft.autohint: 1 - Xcursor.theme: Vanilla-DMZ-AA - Xcursor.size: 22 - *.charClass:33:48,35:48,37:48,43:48,45-47:48,61:48,63:48,64:48,95:48,126:48,35:48,58:48 - *background: #121212 - *foreground: #babdb6 - ${lib.concatMapStrings (xterm: '' - ${xterm}.termName: xterm-256color - ${xterm}*bellIsUrgent: true - ${xterm}*utf8: 1 - ${xterm}*locale: true - ${xterm}*utf8Title: true - ${xterm}*utf8Fonts: 1 - ${xterm}*utf8Latin1: true - ${xterm}*dynamicColors: true - ${xterm}*eightBitInput: true - ${xterm}*faceName: xft:DejaVu Sans Mono for Powerline:pixelsize=9:antialias=true:hinting=true - ${xterm}*faceNameDoublesize: xft:Unifont:pixelsize=12:antialias=true:hinting=true - ${xterm}*cursorColor: #545f65 - '') [ "UXTerm" "XTerm" ]} - ''}" - ''; - }; - - #### Machine-specific packages configuration #### - - vuizvui.user.devhell.profiles.packages.enable = true; - - nixpkgs.config.mpv.vaapiSupport = true; - - programs.light.enable = true; - - environment.systemPackages = with pkgs; [ - aircrackng - cdrtools - docker - dvdplusrwtools - glxinfo - horst - ipmitool - iw - kismet - libva - libvdpau-va-gl - minicom - pamixer - pmtools - pmutils - reaverwps - signal-desktop - snort - vaapiVdpau - vdpauinfo - wavemon - xbindkeys - ]; -} -- cgit 1.4.1