From 1ec9f84c651e048705b0201c3dcc9547f63611d0 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 12 May 2017 11:29:46 +0200 Subject: m 2: mv base-gui gui/base --- makefu/1systems/tsp.nix | 2 +- makefu/1systems/wbob.nix | 26 +++------- makefu/2configs/base-gui.nix | 97 -------------------------------------- makefu/2configs/gui/base.nix | 97 ++++++++++++++++++++++++++++++++++++++ makefu/2configs/gui/studio.nix | 22 +++++++++ makefu/2configs/gui/urxvtd.nix | 21 +++++++++ makefu/2configs/gui/wbob-kiosk.nix | 23 +++++++++ makefu/2configs/main-laptop.nix | 2 +- makefu/2configs/urxvtd.nix | 21 --------- 9 files changed, 172 insertions(+), 139 deletions(-) delete mode 100644 makefu/2configs/base-gui.nix create mode 100644 makefu/2configs/gui/base.nix create mode 100644 makefu/2configs/gui/studio.nix create mode 100644 makefu/2configs/gui/urxvtd.nix create mode 100644 makefu/2configs/gui/wbob-kiosk.nix delete mode 100644 makefu/2configs/urxvtd.nix diff --git a/makefu/1systems/tsp.nix b/makefu/1systems/tsp.nix index 9809abf4c..25fc2b49b 100644 --- a/makefu/1systems/tsp.nix +++ b/makefu/1systems/tsp.nix @@ -7,7 +7,7 @@ imports = [ # Include the results of the hardware scan. ../. - ../2configs/base-gui.nix + ../2configs/gui/base.nix ../2configs/fs/sda-crypto-root.nix # hardware specifics are in here ../2configs/hw/tp-x200.nix #< imports tp-x2x0.nix diff --git a/makefu/1systems/wbob.nix b/makefu/1systems/wbob.nix index f2c42692c..5b9938ffa 100644 --- a/makefu/1systems/wbob.nix +++ b/makefu/1systems/wbob.nix @@ -1,14 +1,14 @@ { config, pkgs, lib, ... }: -let +let rootdisk = "/dev/disk/by-id/ata-TS256GMTS800_C613840115"; datadisk = "/dev/disk/by-id/ata-HGST_HTS721010A9E630_JR10006PH3A02F"; + user = config.makefu.gui.user; in { imports = [ # Include the results of the hardware scan. ../. ../2configs/zsh-user.nix - ../2configs/base-gui.nix ../2configs/tools/core.nix ../2configs/tools/core-gui.nix ../2configs/tools/extra-gui.nix @@ -17,6 +17,10 @@ in { ../2configs/tinc/retiolum.nix ../2configs/mqtt.nix ../2configs/deployment/led-fader.nix + # ../2configs/gui/wbob-kiosk.nix + + ../2configs/gui/studio.nix + ../2configs/vncserver.nix ]; krebs = { @@ -26,22 +30,6 @@ in { swapDevices = [ { device = "/var/swap"; } ]; - services.xserver = { - layout = lib.mkForce "de"; - - windowManager = lib.mkForce { - awesome.enable = false; - default = "none"; - }; - desktopManager.xfce.enable = true; - - # xrandrHeads = [ "HDMI1" "HDMI2" ]; - # prevent screen from turning off, disable dpms - displayManager.sessionCommands = '' - xset s off -dpms - xrandr --output HDMI2 --right-of HDMI1 - ''; - }; networking.firewall.allowedUDPPorts = [ 655 ]; networking.firewall.allowedTCPPorts = [ 655 49152 ]; @@ -88,7 +76,7 @@ in { # TODO: add crypto layer systemd.services."synergy-client" = { environment.DISPLAY = ":0"; - serviceConfig.User = "makefu"; + serviceConfig.User = user; }; services.synergy = { diff --git a/makefu/2configs/base-gui.nix b/makefu/2configs/base-gui.nix deleted file mode 100644 index 1a19ab36b..000000000 --- a/makefu/2configs/base-gui.nix +++ /dev/null @@ -1,97 +0,0 @@ -{ config, lib, pkgs, ... }: -## -# of course this name is a lie -# - it prepares a GUI environment close to my -# current configuration,specifically: -# -# * autologin with mainUser into awesome -# * audio -# * terminus font -# -# if this is not enough, check out main-laptop.nix - - -with import ; -let - mainUser = config.krebs.build.user.name; -in -{ - imports = [ - ./urxvtd.nix - ]; - - services.xserver = { - enable = true; - layout = "us"; - xkbVariant = "altgr-intl"; - xkbOptions = "ctrl:nocaps"; - - windowManager = { - awesome.enable = true; - awesome.luaModules = [ pkgs.luaPackages.vicious ]; - default = "awesome"; - }; - - displayManager.auto.enable = true; - displayManager.auto.user = mainUser; - desktopManager.xterm.enable = false; - }; - # lid switch is handled via button presses - services.logind.extraConfig = mkDefault "HandleLidSwitch=ignore"; - makefu.awesome.enable = true; - i18n.consoleFont = "Lat2-Terminus16"; - - fonts = { - enableCoreFonts = true; - enableFontDir = true; - enableGhostscriptFonts = true; - fonts = [ pkgs.terminus_font ]; - }; - - environment.systemPackages = with pkgs;[ - pavucontrol - xlockmore - rxvt_unicode-with-plugins - firefox - ]; - users.extraUsers.${mainUser}.extraGroups = [ "audio" ]; - - hardware.pulseaudio = { - enable = true; - systemWide = true; - }; - services.xserver.displayManager.sessionCommands = let - xdefaultsfile = pkgs.writeText "Xdefaults" '' - cat |derp <; +let + mainUser = config.krebs.build.user.name; +in +{ + imports = [ + ./urxvtd.nix + ]; + + services.xserver = { + enable = true; + layout = "us"; + xkbVariant = "altgr-intl"; + xkbOptions = "ctrl:nocaps"; + + windowManager = { + awesome.enable = true; + awesome.luaModules = [ pkgs.luaPackages.vicious ]; + default = "awesome"; + }; + + displayManager.auto.enable = true; + displayManager.auto.user = mainUser; + desktopManager.xterm.enable = false; + }; + # lid switch is handled via button presses + services.logind.extraConfig = mkDefault "HandleLidSwitch=ignore"; + makefu.awesome.enable = true; + i18n.consoleFont = "Lat2-Terminus16"; + + fonts = { + enableCoreFonts = true; + enableFontDir = true; + enableGhostscriptFonts = true; + fonts = [ pkgs.terminus_font ]; + }; + + environment.systemPackages = with pkgs;[ + pavucontrol + xlockmore + rxvt_unicode-with-plugins + firefox + ]; + users.extraUsers.${mainUser}.extraGroups = [ "audio" ]; + + hardware.pulseaudio = { + enable = true; + systemWide = true; + }; + services.xserver.displayManager.sessionCommands = let + xdefaultsfile = pkgs.writeText "Xdefaults" '' + cat |derp <