From 3cc287e2683537722bdc15694b92c5985f9a1c4f Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 22 Jun 2017 01:10:57 +0200 Subject: Move devhell's machines into machines/ In his configuration he had machine_common.nix which was imported from the other machine_*.nix files. However in order to start modularizing I've converted machine_common.nix into a proper NixOS module which now resides in modules/user/devhell/profiles/base.nix and can be simply activated via: vuizvui.user.devhell.profiles.base.enable = true; Apart from that I've removed the following configuration definitiens from machine_common.nix: nix.binaryCaches = [ "https://headcounter.org/hydra/" "https://cache.nixos.org/" ]; nix.requireSignedBinaryCaches = true; nix.binaryCachePublicKeys = [ "headcounter.org:/7YANMvnQnyvcVB6rgFTdb8p5LG1OTXaO+21CaOSBzg=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; nix.nixPath = lib.mkOptionDefault [ "nixpkgs=/home/dev/git/remote/other_github/nixpkgs" ]; The reason for removing them is because we already handle that via the vuizvui core modules (modules/core/common.nix). I've tested this by evaluating the machines by temporarily setting "allowUnfree = true" (which is part of another module I didn't migrate yet) and it succeeds. Signed-off-by: aszlig Cc: @devhell --- modules/module-list.nix | 1 + modules/user/devhell/profiles/base.nix | 108 +++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 modules/user/devhell/profiles/base.nix (limited to 'modules') diff --git a/modules/module-list.nix b/modules/module-list.nix index 5994dd61..33ac6af6 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -29,6 +29,7 @@ ./user/aszlig/services/slim ./user/aszlig/services/vlock ./user/aszlig/system/kernel.nix + ./user/devhell/profiles/base.nix ./user/openlab/base.nix ./user/openlab/labtops.nix ./user/openlab/stackenblocken.nix diff --git a/modules/user/devhell/profiles/base.nix b/modules/user/devhell/profiles/base.nix new file mode 100644 index 00000000..263206ff --- /dev/null +++ b/modules/user/devhell/profiles/base.nix @@ -0,0 +1,108 @@ +{ config, pkgs, lib, ... }: + +let + cfg = config.vuizvui.user.devhell.profiles.base; + +in { + options.vuizvui.user.devhell.profiles.base = { + enable = lib.mkEnableOption "Base profile for devhell"; + }; + + config = lib.mkIf cfg.enable { + boot = { + kernelPackages = pkgs.linuxPackages_latest; + cleanTmpDir = true; + }; + + nix = { + buildCores = 0; + useSandbox = true; + }; + + time = { + timeZone = "Europe/London"; + }; + + system = { + fsPackages = with pkgs; [ + sshfsFuse + fuse + cryptsetup + ]; + }; + + hardware = { + enableAllFirmware = true; + cpu.intel.updateMicrocode = true; + opengl = { + s3tcSupport = true; + driSupport32Bit = true; + }; + pulseaudio = { + enable = true; + systemWide = false; + }; + }; + + programs = { + ssh = { + startAgent = false; + }; + zsh = { + enable = true; + enableCompletion = true; + }; + bash = { + enableCompletion = true; + promptInit = '' + # Provide a nice prompt. + PROMPT_COLOR="1;31m" + let $UID && PROMPT_COLOR="1;32m" + PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]\\$\[\033[0m\] " + if test "$TERM" = "xterm"; then + PS1="\[\033]2;\h:\u:\w\007\]$PS1" + fi + eval `dircolors ~/.dir_colors` + ''; + }; + }; + + environment = { + shells = [ "/run/current-system/sw/bin/zsh" ]; + sessionVariables.TERM = "xterm-256color"; + }; + + fonts = { + fontconfig = { + enable = true; + ultimate = { + enable = true; + }; + }; + enableGhostscriptFonts = true; + enableCoreFonts = true; + fonts = with pkgs; [ + clearlyU + cm_unicode + dejavu_fonts + dosemu_fonts + font-awesome-ttf + freefont_ttf + hack-font + inconsolata + powerline-fonts + proggyfonts + source-code-pro + source-sans-pro + source-serif-pro + terminus_font + tewi-font + ttf_bitstream_vera + ubuntu_font_family + unifont + vistafonts + wqy_microhei + ] ++ lib.filter lib.isDerivation (lib.attrValues lohit-fonts); + }; + }; +} -- cgit 1.4.1 From 276e54d04c44e2c64cb9dd4548ed6b1022f6f9fd Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 22 Jun 2017 01:20:19 +0200 Subject: devhell/profiles/base: Disable firewall This is from network/network_common.nix and it really affects all of the machines, so it makes sense to add it to the base profile. Signed-off-by: aszlig Cc: @devhell --- devhell/network/network_common.nix | 5 ----- modules/user/devhell/profiles/base.nix | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 devhell/network/network_common.nix (limited to 'modules') diff --git a/devhell/network/network_common.nix b/devhell/network/network_common.nix deleted file mode 100644 index e54c78fc..00000000 --- a/devhell/network/network_common.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - networking.firewall.enable = false; -} diff --git a/modules/user/devhell/profiles/base.nix b/modules/user/devhell/profiles/base.nix index 263206ff..6f55a79d 100644 --- a/modules/user/devhell/profiles/base.nix +++ b/modules/user/devhell/profiles/base.nix @@ -44,6 +44,8 @@ in { }; }; + networking.firewall.enable = false; + programs = { ssh = { startAgent = false; -- cgit 1.4.1 From fc432e46a22494e1cafb53b0555da92301815921 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 22 Jun 2017 01:41:02 +0200 Subject: Factor out devhell's services into vuizvui I've added another profile called "services", which now resembles the services_common.nix from the previous configuration. The machine-specific definitions now reside directly inside the machine's Nix expressions for now, until they're properly refactored. Most of these machine-specific values can be easily modularized, especially the xrdb config, for example having one base xrdb module and only small machine-specific definitions if stuff needs to be overridden. Signed-off-by: aszlig Cc: @devhell --- devhell/services/services_common.nix | 79 -------------- devhell/services/services_eris.nix | 138 ------------------------ devhell/services/services_skunkworks.nix | 162 ---------------------------- devhell/services/services_titan.nix | 90 ---------------- machines/devhell/eris.nix | 139 ++++++++++++++++++++++++ machines/devhell/skunkworks.nix | 163 +++++++++++++++++++++++++++++ machines/devhell/titan.nix | 91 ++++++++++++++++ modules/module-list.nix | 1 + modules/user/devhell/profiles/services.nix | 88 ++++++++++++++++ 9 files changed, 482 insertions(+), 469 deletions(-) delete mode 100644 devhell/services/services_common.nix delete mode 100644 devhell/services/services_eris.nix delete mode 100644 devhell/services/services_skunkworks.nix delete mode 100644 devhell/services/services_titan.nix create mode 100644 modules/user/devhell/profiles/services.nix (limited to 'modules') diff --git a/devhell/services/services_common.nix b/devhell/services/services_common.nix deleted file mode 100644 index 42ba2525..00000000 --- a/devhell/services/services_common.nix +++ /dev/null @@ -1,79 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - virtualisation = { - virtualbox = { - host = { - enable = true; - enableHardening = true; - }; - }; - libvirtd = { - enable = true; - enableKVM = true; - }; - }; - - services = { - gpm.enable = true; - openssh.enable = true; - haveged.enable = true; - thermald.enable = true; - udisks2.enable = true; - redshift = { - enable = true; - latitude = "51.2750"; - longitude = "1.0870"; - }; - }; - - services.xserver = { - displayManager.lightdm.enable = true; - desktopManager.xterm.enable = false; - desktopManager.default = "none"; - }; - - services.xserver.windowManager = { - i3.enable = true; - default = "i3"; - }; - - services.syncthing = { - enable = true; - user = "dev"; - }; - - services.journald.extraConfig = '' - SystemMaxUse = 50M - ''; - - services.psd = { - enable = false; - users = [ "dev" ]; - browsers = [ "chromium" ]; - }; - - services.mpd = { - enable = true; - extraConfig = '' - input { - plugin "curl" - } - - audio_output { - type "fifo" - name "FIFO Output" - path "/tmp/mpd.fifo" - format "44100:16:2" - } - - audio_output { - type "pulse" - name "Pulse Output" - server "127.0.0.1" - } - - replaygain "album" - ''; - }; -} diff --git a/devhell/services/services_eris.nix b/devhell/services/services_eris.nix deleted file mode 100644 index cfec789f..00000000 --- a/devhell/services/services_eris.nix +++ /dev/null @@ -1,138 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - imports = [ ./services_common.nix ]; - - services = { - tftpd.enable = true; - gnome3.gnome-keyring.enable = true; - printing.enable = false; - }; - - 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.xserver = { - enable = true; - layout = "gb"; - videoDrivers = [ "intel" ]; - - synaptics = { - enable = true; - twoFingerScroll = true; - palmDetect = true; - }; - - displayManager.sessionCommands = '' - ${pkgs.xorg.xsetroot}/bin/xsetroot -solid black - ${pkgs.networkmanagerapplet}/bin/nm-applet & - ${pkgs.pasystray}/bin/pasystray & - #${pkgs.compton}/bin/compton -f & - ${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" ]} - ! ------------------------------------------------------------------------------ - ! ROFI Color theme & Settings - ! ------------------------------------------------------------------------------ - rofi.modi: run - rofi.opacity: 85 - rofi.width: 100 - rofi.lines: 3 - rofi.padding: 300 - 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 - ''}" - ''; - }; - - 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="noop cfq" - 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=75 - STOP_CHARGE_THRESH_BAT0=80 - #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="" - ''; - }; -} diff --git a/devhell/services/services_skunkworks.nix b/devhell/services/services_skunkworks.nix deleted file mode 100644 index f0fa4243..00000000 --- a/devhell/services/services_skunkworks.nix +++ /dev/null @@ -1,162 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - imports = [ ./services_common.nix ]; - - services = { - printing = { - enable = true; - drivers = [ pkgs.hplipWithPlugin ]; - }; - timesyncd.enable = true; - resolved.enable = true; - canto-daemon.enable = true; - }; - - services.xserver = { - enable = true; - layout = "us"; - xkbVariant = "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 - ''; - - 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 & - ''; - }; -} diff --git a/devhell/services/services_titan.nix b/devhell/services/services_titan.nix deleted file mode 100644 index a4ed892c..00000000 --- a/devhell/services/services_titan.nix +++ /dev/null @@ -1,90 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - imports = [ ./services_common.nix ]; - - services = { - tftpd.enable = false; - gnome3.gnome-keyring.enable = true; - printing.enable = false; - }; - - 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.xserver = { - enable = true; - layout = "gb"; - videoDrivers = [ "intel" ]; - - synaptics = { - enable = true; - twoFingerScroll = true; - palmDetect = true; - }; - - displayManager.sessionCommands = '' - ${pkgs.xbindkeys}/bin/xbindkeys & - ${pkgs.nitrogen}/bin/nitrogen --restore & - #${pkgs.networkmanagerapplet}/bin/nm-applet & - ${pkgs.connmanui}/bin/connman-ui-gtk & - ${pkgs.xscreensaver}/bin/xscreensaver -no-splash & - ${pkgs.pasystray}/bin/pasystray & - ${pkgs.compton}/bin/compton -f & - ${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" ]} - ! ------------------------------------------------------------------------------ - ! ROFI Color theme & Settings - ! ------------------------------------------------------------------------------ - rofi.modi: run - rofi.opacity: 85 - rofi.width: 100 - rofi.lines: 3 - rofi.padding: 300 - 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 - ''}" - ''; - }; -} diff --git a/machines/devhell/eris.nix b/machines/devhell/eris.nix index cce2d6b0..e6c13079 100644 --- a/machines/devhell/eris.nix +++ b/machines/devhell/eris.nix @@ -60,4 +60,143 @@ consoleKeyMap = "uk"; defaultLocale = "en_GB.UTF-8"; }; + + #### Machine-specific service configuration #### + + vuizvui.user.devhell.profiles.services.enable = true; + + services = { + tftpd.enable = true; + gnome3.gnome-keyring.enable = true; + printing.enable = false; + }; + + 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.xserver = { + enable = true; + layout = "gb"; + videoDrivers = [ "intel" ]; + + 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.xorg.xsetroot}/bin/xsetroot -solid black + ${pkgs.networkmanagerapplet}/bin/nm-applet & + ${pkgs.pasystray}/bin/pasystray & + #${pkgs.compton}/bin/compton -f & + ${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" ]} + ! ------------------------------------------------------------------------------ + ! ROFI Color theme & Settings + ! ------------------------------------------------------------------------------ + rofi.modi: run + rofi.opacity: 85 + rofi.width: 100 + rofi.lines: 3 + rofi.padding: 300 + 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 + ''}" + ''; + }; + + 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="noop cfq" + 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=75 + STOP_CHARGE_THRESH_BAT0=80 + #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="" + ''; + }; } diff --git a/machines/devhell/skunkworks.nix b/machines/devhell/skunkworks.nix index 91ed886b..b5d2912d 100644 --- a/machines/devhell/skunkworks.nix +++ b/machines/devhell/skunkworks.nix @@ -80,4 +80,167 @@ ${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 = "us"; + xkbVariant = "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 & + ''; + }; } diff --git a/machines/devhell/titan.nix b/machines/devhell/titan.nix index abc640da..23b967d2 100644 --- a/machines/devhell/titan.nix +++ b/machines/devhell/titan.nix @@ -65,4 +65,95 @@ 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 = false; + }; + + 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.xserver = { + enable = true; + layout = "gb"; + videoDrivers = [ "intel" ]; + + 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.networkmanagerapplet}/bin/nm-applet & + ${pkgs.connmanui}/bin/connman-ui-gtk & + ${pkgs.xscreensaver}/bin/xscreensaver -no-splash & + ${pkgs.pasystray}/bin/pasystray & + ${pkgs.compton}/bin/compton -f & + ${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" ]} + ! ------------------------------------------------------------------------------ + ! ROFI Color theme & Settings + ! ------------------------------------------------------------------------------ + rofi.modi: run + rofi.opacity: 85 + rofi.width: 100 + rofi.lines: 3 + rofi.padding: 300 + 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 + ''}" + ''; + }; } diff --git a/modules/module-list.nix b/modules/module-list.nix index 33ac6af6..fbd5334c 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -30,6 +30,7 @@ ./user/aszlig/services/vlock ./user/aszlig/system/kernel.nix ./user/devhell/profiles/base.nix + ./user/devhell/profiles/services.nix ./user/openlab/base.nix ./user/openlab/labtops.nix ./user/openlab/stackenblocken.nix diff --git a/modules/user/devhell/profiles/services.nix b/modules/user/devhell/profiles/services.nix new file mode 100644 index 00000000..86af3eca --- /dev/null +++ b/modules/user/devhell/profiles/services.nix @@ -0,0 +1,88 @@ +{ config, pkgs, lib, ... }: + +let + cfg = config.vuizvui.user.devhell.profiles.services; + +in { + options.vuizvui.user.devhell.profiles.services = { + enable = lib.mkEnableOption "Services profile for devhell"; + }; + + config = lib.mkIf cfg.enable { + virtualisation = { + virtualbox = { + host = { + enable = true; + enableHardening = true; + }; + }; + libvirtd = { + enable = true; + enableKVM = true; + }; + }; + + services = { + gpm.enable = true; + openssh.enable = true; + haveged.enable = true; + thermald.enable = true; + udisks2.enable = true; + redshift = { + enable = true; + latitude = "51.2750"; + longitude = "1.0870"; + }; + }; + + services.xserver = { + displayManager.lightdm.enable = true; + desktopManager.xterm.enable = false; + desktopManager.default = "none"; + }; + + services.xserver.windowManager = { + i3.enable = true; + default = "i3"; + }; + + services.syncthing = { + enable = true; + user = "dev"; + }; + + services.journald.extraConfig = '' + SystemMaxUse = 50M + ''; + + services.psd = { + enable = false; + users = [ "dev" ]; + browsers = [ "chromium" ]; + }; + + services.mpd = { + enable = true; + extraConfig = '' + input { + plugin "curl" + } + + audio_output { + type "fifo" + name "FIFO Output" + path "/tmp/mpd.fifo" + format "44100:16:2" + } + + audio_output { + type "pulse" + name "Pulse Output" + server "127.0.0.1" + } + + replaygain "album" + ''; + }; + }; +} -- cgit 1.4.1 From a911f4231c6c0a4c7d7621873ae452a37d12faf4 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 22 Jun 2017 01:45:51 +0200 Subject: devhell: Move users_dev.nix into base profile IMHO this module is really too small to factor it out into its own profile module, so I'm putting it into the base profile as it's really common among all of devhell's machines. Signed-off-by: aszlig Cc: @devhell --- devhell/users/users_dev.nix | 10 ---------- modules/user/devhell/profiles/base.nix | 7 +++++++ 2 files changed, 7 insertions(+), 10 deletions(-) delete mode 100644 devhell/users/users_dev.nix (limited to 'modules') diff --git a/devhell/users/users_dev.nix b/devhell/users/users_dev.nix deleted file mode 100644 index 41649ae0..00000000 --- a/devhell/users/users_dev.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - users.extraUsers.dev = { - isNormalUser = true; - extraGroups = [ "vboxusers" "wheel" "mpd" "networkmanager" "libvirtd" ]; - uid = 1000; - shell = "${pkgs.zsh}/bin/zsh"; - }; -} diff --git a/modules/user/devhell/profiles/base.nix b/modules/user/devhell/profiles/base.nix index 6f55a79d..123da3ef 100644 --- a/modules/user/devhell/profiles/base.nix +++ b/modules/user/devhell/profiles/base.nix @@ -46,6 +46,13 @@ in { networking.firewall.enable = false; + users.users.dev = { + isNormalUser = true; + extraGroups = [ "vboxusers" "wheel" "mpd" "networkmanager" "libvirtd" ]; + uid = 1000; + shell = "${pkgs.zsh}/bin/zsh"; + }; + programs = { ssh = { startAgent = false; -- cgit 1.4.1 From 5990a4d62f2d3146ddd03ec2461d45b2102e5f42 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 22 Jun 2017 01:59:35 +0200 Subject: devhell: Mergo overrides/pkgs into vuizvui This introduces another profile module called "packages", which contains all the package configuration (including overrides) of all the machines in the devhell namespace. The machine-specific configuration is now merged into the machine configurations the same way as we've done previously with the services. One major difference here is that the haskellPackages workaround is no longer needed in the package configuration, as it is handled by vuizvui. Tested this by evaluating all machines and all evaluations succeeded. Signed-off-by: aszlig Cc: @devhell --- devhell/overrides/overrides.nix | 25 --- devhell/pkgs/pkgs_common.nix | 299 --------------------------- devhell/pkgs/pkgs_eris.nix | 29 --- devhell/pkgs/pkgs_skunkworks.nix | 31 --- devhell/pkgs/pkgs_titan.nix | 48 ----- machines/devhell/eris.nix | 26 +++ machines/devhell/skunkworks.nix | 23 +++ machines/devhell/titan.nix | 45 ++++ modules/module-list.nix | 1 + modules/user/devhell/profiles/packages.nix | 321 +++++++++++++++++++++++++++++ 10 files changed, 416 insertions(+), 432 deletions(-) delete mode 100644 devhell/overrides/overrides.nix delete mode 100644 devhell/pkgs/pkgs_common.nix delete mode 100644 devhell/pkgs/pkgs_eris.nix delete mode 100644 devhell/pkgs/pkgs_skunkworks.nix delete mode 100644 devhell/pkgs/pkgs_titan.nix create mode 100644 modules/user/devhell/profiles/packages.nix (limited to 'modules') diff --git a/devhell/overrides/overrides.nix b/devhell/overrides/overrides.nix deleted file mode 100644 index 3e07a75c..00000000 --- a/devhell/overrides/overrides.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -{ - nixpkgs.config.packageOverrides = pkgs: { - gnupg = pkgs.gnupg21; - - ncmpcpp = pkgs.ncmpcpp.override { - visualizerSupport = true; - clockSupport = true; - }; - - sox = pkgs.sox.override { - enableLame = true; - }; - - # XXX: Very ugly workaround see https://github.com/openlab-aux/vuizvui/commit/a93b7583084ff9084d73873d80d8dc428406593c - haskellPackages = pkgs.haskellPackages.override { - ghc = pkgs.haskellPackages.ghc.overrideDerivation (const { - forceRebuild = true; - }); - }; - }; -} diff --git a/devhell/pkgs/pkgs_common.nix b/devhell/pkgs/pkgs_common.nix deleted file mode 100644 index e723fb5e..00000000 --- a/devhell/pkgs/pkgs_common.nix +++ /dev/null @@ -1,299 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - nixpkgs.config = { - pulseaudio = true; - - allowUnfree = true; - - systemd = { - enableKDbus = true; - }; - - conky = { - weatherMetarSupport = true; - mpdSupport = true; - wirelessSupport = true; - x11Support = false; - }; - - firefox = { - enableGTK3 = true; - enableOfficalBranding = true; - }; - - virtualbox = { - enableExtensionPack = true; - }; - - mpv = { - youtubeSupport = true; - }; - }; - - environment.systemPackages = with pkgs; [ - #attic - #emacs - #gitAndTools.git-annex - #ipfs - #john - #lxappearance - #sleuthkit - #texmacs - #tribler - #vimiv - #zotero - abcde - abook - accountsservice - antiword - apg - arandr - arc-theme - ascii - aspell - aspellDicts.de - aspellDicts.en - atftp - atom - audacity - axel - bc - beets - biber - bind - binutils - brotli - bup - cacert - cataclysm-dda - cava - ccrypt - chromaprint - chromium - cifs_utils - cipherscan - cmake - cmatrix - colordiff - compton - conky - cryptsetup - ctodo - cuetools - darkstat - dcfldd - ddrescue - dhcping - dmenu - dmidecode - docker - dos2unix - dosbox - duff - dynamic-colors - e2fsprogs - easytag - electrum - enhanced-ctorrent - ethtool - evince - fbida - fdupes - feh - ffmpeg-full - figlet - file - firefox - flac - foremost - freerdpUnstable - fuse_exfat - gajim - gcc - gdb - ghostscript - gimp - gitAndTools.git-extras - gitAndTools.git-remote-hg - gitAndTools.git2cl - gitAndTools.gitFastExport - gitAndTools.gitFull - gitAndTools.gitRemoteGcrypt - gitAndTools.gitSVN - gitAndTools.gitflow - gitAndTools.svn2git - gitAndTools.tig - glxinfo - gnome3.dconf - gnome3.defaultIconTheme - gnome3.gnome_themes_standard - gnufdisk - gnupg - gnupg1compat - gource - gparted - gpgme - gpicview - gptfdisk - graphviz - gstreamer - handbrake - hdparm - heimdall - hexedit - hplipWithPlugin - htop - i3lock - i3status - icedtea_web - iftop - imagemagick - impressive - inkscape - iotop - iptraf-ng - ipv6calc - jfsutils - jwhois - keepassx - keepassx-community - keepassx2 - keybase - kpcli - lftp - libarchive - libreoffice - lm_sensors - lsof - lxc - lynx - macchanger - manpages - mc - mcabber - mdp - mediainfo - mkvtoolnix - mmv - monkeysAudio - mono - monodevelop - mosh - mp3gain - mpc_cli - mpv - mtr - ncdu - ncmpcpp - neovim - nethack - nethogs - netkittftp - netrw - netsniff-ng - nitrogen - nix-prefetch-scripts - nix-repl - nixops - nload - nmap - ntfs3g - ntfsprogs - ntopng - numix-icon-theme - obnam - openssl - p7zip - pandoc - paperkey - pass - pasystray - pavucontrol - pciutils - picard - posix_man_pages - powertop - profanity - profile-cleaner - profile-sync-daemon - pv - python - python2 - python3 - python34Packages.hovercraft - pythonPackages.jrnl - pythonPackages.livestreamer - pythonPackages.rainbowstream - qemu - qrencode - recode - reiserfsprogs - rofi - rsync - ruby - safecopy - screen - scrot - shntool - silver-searcher - smartmontools - sox - speedtest-cli - spek - ssdeep - stow - strace - surfraw - taskwarrior - telnet - testdisk - texlive.combined.scheme-small - tftp-hpa - tldr - tmux - toilet - tomahawk - toxic - transcode - transgui - transmission_remote_gtk - tree - tty-clock - udevil - units - unrar - unzip - valgrind - vanilla-dmz - vim_configurable - virt-viewer - virtinst - virtmanager - vit - vivaldi - vlc - vlock - vnstat - vorbisTools - vorbisgain - w3m - wavpack - weechat - wget - which - wipe - wireshark - xfsprogs - xlibs.xev - xmpp-client - xpdf - xpra - xscreensaver - youtube-dl - zathura - zbar - zip - zsync - ]; -} diff --git a/devhell/pkgs/pkgs_eris.nix b/devhell/pkgs/pkgs_eris.nix deleted file mode 100644 index fa834b0e..00000000 --- a/devhell/pkgs/pkgs_eris.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - imports = [ ./pkgs_common.nix ]; - - nixpkgs.config.mpv = { - vaapiSupport = true; - }; - - environment.systemPackages = with pkgs; [ - terminator - claws-mail - aircrackng - horst - kismet - minicom - networkmanagerapplet - pamixer - pmtools - pmutils - reaverwps - snort - wavemon - xbindkeys - xorg.xbacklight - thunderbird - iw - ]; -} diff --git a/devhell/pkgs/pkgs_skunkworks.nix b/devhell/pkgs/pkgs_skunkworks.nix deleted file mode 100644 index 296dbca1..00000000 --- a/devhell/pkgs/pkgs_skunkworks.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - imports = [ ./pkgs_common.nix ]; - - nixpkgs.config = { - chromium = { - enablePepperFlash = true; - }; - - mpv = { - bs2bSupport = true; - }; - }; - - environment.systemPackages = with pkgs; [ - abook - canto-curses - cli-visualizer - cmus - #ipfs - handbrake - hplip - mutt-with-sidebar - nzbget - #scummvm - slrn - twister - urlview - ]; -} diff --git a/devhell/pkgs/pkgs_titan.nix b/devhell/pkgs/pkgs_titan.nix deleted file mode 100644 index 3efab6c1..00000000 --- a/devhell/pkgs/pkgs_titan.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - imports = [ ./pkgs_common.nix ]; - - nixpkgs.config.mpv = { - vaapiSupport = true; - }; - - environment.systemPackages = with pkgs; [ - #cura - #openjdk8 - #skype - aircrackng - calibre - cdrtools - claws-mail - connmanui - dvdplusrwtools - glxinfo - horst - ipmitool - ipmiutil - ipmiview - kismet - libva - libvdpau-va-gl - minicom - msmtp - mutt - networkmanagerapplet - notmuch - offlineimap - pamixer - pmtools - pmutils - pythonPackages.alot - reaverwps - snort - thunderbird - vaapiVdpau - vdpauinfo - wavemon - wirelesstools - xbindkeys - xorg.xbacklight - ]; -} diff --git a/machines/devhell/eris.nix b/machines/devhell/eris.nix index e6c13079..12c89fe4 100644 --- a/machines/devhell/eris.nix +++ b/machines/devhell/eris.nix @@ -199,4 +199,30 @@ #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT="" ''; }; + + #### Machine-specific packages configuration #### + + vuizvui.user.devhell.profiles.packages.enable = true; + + nixpkgs.config.mpv.vaapiSupport = true; + + environment.systemPackages = with pkgs; [ + terminator + claws-mail + aircrackng + horst + kismet + minicom + networkmanagerapplet + pamixer + pmtools + pmutils + reaverwps + snort + wavemon + xbindkeys + xorg.xbacklight + thunderbird + iw + ]; } diff --git a/machines/devhell/skunkworks.nix b/machines/devhell/skunkworks.nix index b5d2912d..b966a453 100644 --- a/machines/devhell/skunkworks.nix +++ b/machines/devhell/skunkworks.nix @@ -243,4 +243,27 @@ 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; [ + abook + canto-curses + cli-visualizer + cmus + #ipfs + handbrake + hplip + mutt-with-sidebar + nzbget + #scummvm + slrn + twister + urlview + ]; } diff --git a/machines/devhell/titan.nix b/machines/devhell/titan.nix index 23b967d2..83a365c8 100644 --- a/machines/devhell/titan.nix +++ b/machines/devhell/titan.nix @@ -156,4 +156,49 @@ ''}" ''; }; + + #### Machine-specific packages configuration #### + + vuizvui.user.devhell.profiles.packages.enable = true; + + nixpkgs.config.mpv.vaapiSupport = true; + + environment.systemPackages = with pkgs; [ + #cura + #openjdk8 + #skype + aircrackng + calibre + cdrtools + claws-mail + connmanui + dvdplusrwtools + glxinfo + horst + ipmitool + ipmiutil + ipmiview + kismet + libva + libvdpau-va-gl + minicom + msmtp + mutt + networkmanagerapplet + notmuch + offlineimap + pamixer + pmtools + pmutils + pythonPackages.alot + reaverwps + snort + thunderbird + vaapiVdpau + vdpauinfo + wavemon + wirelesstools + xbindkeys + xorg.xbacklight + ]; } diff --git a/modules/module-list.nix b/modules/module-list.nix index fbd5334c..52c61249 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -30,6 +30,7 @@ ./user/aszlig/services/vlock ./user/aszlig/system/kernel.nix ./user/devhell/profiles/base.nix + ./user/devhell/profiles/packages.nix ./user/devhell/profiles/services.nix ./user/openlab/base.nix ./user/openlab/labtops.nix diff --git a/modules/user/devhell/profiles/packages.nix b/modules/user/devhell/profiles/packages.nix new file mode 100644 index 00000000..a62479d0 --- /dev/null +++ b/modules/user/devhell/profiles/packages.nix @@ -0,0 +1,321 @@ +{ config, pkgs, lib, ... }: + +let + cfg = config.vuizvui.user.devhell.profiles.packages; + +in { + options.vuizvui.user.devhell.profiles.packages = { + enable = lib.mkEnableOption "Packages profile for devhell"; + }; + + config = lib.mkIf cfg.enable { + nixpkgs.config = { + pulseaudio = true; + + allowUnfree = true; + + systemd = { + enableKDbus = true; + }; + + conky = { + weatherMetarSupport = true; + mpdSupport = true; + wirelessSupport = true; + x11Support = false; + }; + + firefox = { + enableGTK3 = true; + enableOfficalBranding = true; + }; + + virtualbox = { + enableExtensionPack = true; + }; + + mpv = { + youtubeSupport = true; + }; + + nixpkgs.config.packageOverrides = super: { + gnupg = super.gnupg21; + + ncmpcpp = super.ncmpcpp.override { + visualizerSupport = true; + clockSupport = true; + }; + + sox = super.sox.override { + enableLame = true; + }; + }; + }; + + environment.systemPackages = with pkgs; [ + #attic + #emacs + #gitAndTools.git-annex + #ipfs + #john + #lxappearance + #sleuthkit + #texmacs + #tribler + #vimiv + #zotero + abcde + abook + accountsservice + antiword + apg + arandr + arc-theme + ascii + aspell + aspellDicts.de + aspellDicts.en + atftp + atom + audacity + axel + bc + beets + biber + bind + binutils + brotli + bup + cacert + cataclysm-dda + cava + ccrypt + chromaprint + chromium + cifs_utils + cipherscan + cmake + cmatrix + colordiff + compton + conky + cryptsetup + ctodo + cuetools + darkstat + dcfldd + ddrescue + dhcping + dmenu + dmidecode + docker + dos2unix + dosbox + duff + dynamic-colors + e2fsprogs + easytag + electrum + enhanced-ctorrent + ethtool + evince + fbida + fdupes + feh + ffmpeg-full + figlet + file + firefox + flac + foremost + freerdpUnstable + fuse_exfat + gajim + gcc + gdb + ghostscript + gimp + gitAndTools.git-extras + gitAndTools.git-remote-hg + gitAndTools.git2cl + gitAndTools.gitFastExport + gitAndTools.gitFull + gitAndTools.gitRemoteGcrypt + gitAndTools.gitSVN + gitAndTools.gitflow + gitAndTools.svn2git + gitAndTools.tig + glxinfo + gnome3.dconf + gnome3.defaultIconTheme + gnome3.gnome_themes_standard + gnufdisk + gnupg + gnupg1compat + gource + gparted + gpgme + gpicview + gptfdisk + graphviz + gstreamer + handbrake + hdparm + heimdall + hexedit + hplipWithPlugin + htop + i3lock + i3status + icedtea_web + iftop + imagemagick + impressive + inkscape + iotop + iptraf-ng + ipv6calc + jfsutils + jwhois + keepassx + keepassx-community + keepassx2 + keybase + kpcli + lftp + libarchive + libreoffice + lm_sensors + lsof + lxc + lynx + macchanger + manpages + mc + mcabber + mdp + mediainfo + mkvtoolnix + mmv + monkeysAudio + mono + monodevelop + mosh + mp3gain + mpc_cli + mpv + mtr + ncdu + ncmpcpp + neovim + nethack + nethogs + netkittftp + netrw + netsniff-ng + nitrogen + nix-prefetch-scripts + nix-repl + nixops + nload + nmap + ntfs3g + ntfsprogs + ntopng + numix-icon-theme + obnam + openssl + p7zip + pandoc + paperkey + pass + pasystray + pavucontrol + pciutils + picard + posix_man_pages + powertop + profanity + profile-cleaner + profile-sync-daemon + pv + python + python2 + python3 + python34Packages.hovercraft + pythonPackages.jrnl + pythonPackages.livestreamer + pythonPackages.rainbowstream + qemu + qrencode + recode + reiserfsprogs + rofi + rsync + ruby + safecopy + screen + scrot + shntool + silver-searcher + smartmontools + sox + speedtest-cli + spek + ssdeep + stow + strace + surfraw + taskwarrior + telnet + testdisk + texlive.combined.scheme-small + tftp-hpa + tldr + tmux + toilet + tomahawk + toxic + transcode + transgui + transmission_remote_gtk + tree + tty-clock + udevil + units + unrar + unzip + valgrind + vanilla-dmz + vim_configurable + virt-viewer + virtinst + virtmanager + vit + vivaldi + vlc + vlock + vnstat + vorbisTools + vorbisgain + w3m + wavpack + weechat + wget + which + wipe + wireshark + xfsprogs + xlibs.xev + xmpp-client + xpdf + xpra + xscreensaver + youtube-dl + zathura + zbar + zip + zsync + ]; + }; +} -- cgit 1.4.1