From 991687f7428440356403b6c63d695397b33078a6 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 9 May 2017 22:52:53 +0200 Subject: m studio: init --- makefu/1systems/studio.nix | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 makefu/1systems/studio.nix (limited to 'makefu/1systems') diff --git a/makefu/1systems/studio.nix b/makefu/1systems/studio.nix new file mode 100644 index 000000000..f80dfc09a --- /dev/null +++ b/makefu/1systems/studio.nix @@ -0,0 +1,70 @@ +{ config, pkgs, ... }: +{ + imports = [ + ../. + + ]; + krebs = { + enable = true; + tinc.retiolum.enable = true; + build.host = config.krebs.hosts.studio; + }; + + users.users.user = { + isNormalUser = true; + extraGroups = [ "wheel" "audio" ]; + uid = 1000; + }; + + environment.systemPackages = with pkgs;[ + pavucontrol + firefox + chromium + ]; + + sound.enable = true; + hardware.pulseaudio = { + enable = true; + systemWide = true; + }; + + fonts = { + enableCoreFonts = true; + enableFontDir = true; + enableGhostscriptFonts = true; + fonts = [ ]; + }; + # ingos favorite display manager + services.xserver.displayManager.sddm = { + enable = true; + autoLogin.enable = true; + autoLogin.user = "user"; + }; + services.xserver.desktopManager.plasma5.enable = true; + services.xserver.layout = "us"; + services.xserver.xkbVariant = "altgr-intl"; + services.xserver.xkbOptions = "ctrl:nocaps"; + + i18n = { + consoleKeyMap = "us-int"; + defaultLocale = "en_US.UTF-8"; + }; + + + + # hardware + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/sda"; + + boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "usb_storage" "sd_mod" ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/0aeda516-230e-4c54-9e27-13515c2f3f21"; + fsType = "ext4"; + }; + + swapDevices = [ { device = "/dev/disk/by-uuid/1914af67-5a8f-41d3-a1c2-211c39605da9"; } ]; +} -- cgit v1.2.3 From d2f896842e59f2e8bdce44926b1bf49672c9c91f Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 11 May 2017 16:06:41 +0200 Subject: m 2 led-fader: rm ad-hoc script --- makefu/1systems/wbob.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'makefu/1systems') diff --git a/makefu/1systems/wbob.nix b/makefu/1systems/wbob.nix index 43fbd6d2b..f2c42692c 100644 --- a/makefu/1systems/wbob.nix +++ b/makefu/1systems/wbob.nix @@ -15,6 +15,8 @@ in { ../2configs/tools/media.nix ../2configs/virtualization.nix ../2configs/tinc/retiolum.nix + ../2configs/mqtt.nix + ../2configs/deployment/led-fader.nix ]; krebs = { @@ -43,6 +45,7 @@ in { networking.firewall.allowedUDPPorts = [ 655 ]; networking.firewall.allowedTCPPorts = [ 655 49152 ]; + networking.firewall.trustedInterfaces = [ "enp0s25" ]; #services.tinc.networks.siem = { # name = "display"; # extraConfig = '' -- cgit v1.2.3 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 +++++++------------------- 2 files changed, 8 insertions(+), 20 deletions(-) (limited to 'makefu/1systems') 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 = { -- cgit v1.2.3 From f87ff0023c32511055695eb4e0dfecc63bc736bc Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 12 May 2017 11:32:29 +0200 Subject: m 2 wbob: use realtime audio --- makefu/1systems/wbob.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'makefu/1systems') diff --git a/makefu/1systems/wbob.nix b/makefu/1systems/wbob.nix index 5b9938ffa..7f465ec72 100644 --- a/makefu/1systems/wbob.nix +++ b/makefu/1systems/wbob.nix @@ -20,6 +20,8 @@ in { # ../2configs/gui/wbob-kiosk.nix ../2configs/gui/studio.nix + ../2configs/audio/jack-on-pulse.nix + ../2configs/audio/realtime-audio.nix ../2configs/vncserver.nix ]; -- cgit v1.2.3 From 4e3ca6651ebbfc77b927e7a3694a002c79939776 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 12 May 2017 11:33:12 +0200 Subject: m 1 x: also deploy sources --- makefu/1systems/x.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'makefu/1systems') diff --git a/makefu/1systems/x.nix b/makefu/1systems/x.nix index 65df426e5..d1503c8d7 100644 --- a/makefu/1systems/x.nix +++ b/makefu/1systems/x.nix @@ -38,6 +38,8 @@ with import ; # ../2configs/temp/sabnzbd.nix + # development + ../2configs/sources # Krebs # ../2configs/disable_v6.nix -- cgit v1.2.3 From 43ac35b7494b45050e7c40243d623cca55564702 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 12 May 2017 11:38:02 +0200 Subject: m 1 gum: enable v6 --- makefu/1systems/gum.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix index 93ca8f643..92c446212 100644 --- a/makefu/1systems/gum.nix +++ b/makefu/1systems/gum.nix @@ -4,8 +4,11 @@ with import ; let external-mac = "3a:66:48:8e:82:b2"; external-ip = config.krebs.build.host.nets.internet.ip4.addr; + external-ip6 = config.krebs.build.host.nets.internet.ip6.addr; external-gw = "188.68.40.1"; + external-gw6 = "fe80::1"; external-netmask = 22; + external-netmask6 = 64; internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr; main-disk = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0"; in { @@ -14,7 +17,7 @@ in { ../2configs/headless.nix ../2configs/fs/single-partition-ext4.nix - ../2configs/smart-monitor.nix + # ../2configs/smart-monitor.nix ../2configs/git/cgit-retiolum.nix ../2configs/backup.nix # ../2configs/mattermost-docker.nix @@ -55,7 +58,6 @@ in { # ../2configs/logging/central-logging-client.nix ]; - services.smartd.devices = [ { device = main-disk;} ]; makefu.dl-dir = "/var/download"; @@ -134,6 +136,11 @@ in { address = external-ip; prefixLength = external-netmask; }]; + interfaces.et0.ip6 = [{ + address = external-ip6; + prefixLength = external-netmask6; + }]; + defaultGateway6 = external-gw6; defaultGateway = external-gw; nameservers = [ "8.8.8.8" ]; }; -- cgit v1.2.3 From 1d2bad9d10a09fddeba4e41547949ffd46d60334 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 12 May 2017 11:38:45 +0200 Subject: m 1 studio: provide vnc and realtime audio --- makefu/1systems/studio.nix | 55 +++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 25 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/studio.nix b/makefu/1systems/studio.nix index f80dfc09a..400d9f883 100644 --- a/makefu/1systems/studio.nix +++ b/makefu/1systems/studio.nix @@ -2,32 +2,46 @@ { imports = [ ../. + ../2configs/vncserver.nix + ../2configs/vim.nix + ../2configs/disable_v6.nix + ../2configs/jack-on-pulse.nix + ../2configs/gui/studio.nix ]; + makefu.gui.user = "user"; # we use an extra user krebs = { enable = true; tinc.retiolum.enable = true; build.host = config.krebs.hosts.studio; }; + networking.firewall.allowedTCPPorts = [ 655 ]; + networking.firewall.allowedUDPPorts = [ 655 ]; - users.users.user = { - isNormalUser = true; - extraGroups = [ "wheel" "audio" ]; - uid = 1000; - }; environment.systemPackages = with pkgs;[ + # audio foo + ## pulseaudio pavucontrol + paprefs + pamixer + + # extra alsa tools + alsa-hdspconf + alsa-hdspmixer + alsa-hdsploader + + # recording + darkice + (mumble.override { jackSupport = true; }) + + # browsing firefox chromium ]; - sound.enable = true; - hardware.pulseaudio = { - enable = true; - systemWide = true; - }; + nixpkgs.config.allowUnfree = true; fonts = { enableCoreFonts = true; enableFontDir = true; @@ -35,21 +49,6 @@ fonts = [ ]; }; # ingos favorite display manager - services.xserver.displayManager.sddm = { - enable = true; - autoLogin.enable = true; - autoLogin.user = "user"; - }; - services.xserver.desktopManager.plasma5.enable = true; - services.xserver.layout = "us"; - services.xserver.xkbVariant = "altgr-intl"; - services.xserver.xkbOptions = "ctrl:nocaps"; - - i18n = { - consoleKeyMap = "us-int"; - defaultLocale = "en_US.UTF-8"; - }; - # hardware @@ -67,4 +66,10 @@ }; swapDevices = [ { device = "/dev/disk/by-uuid/1914af67-5a8f-41d3-a1c2-211c39605da9"; } ]; + users.users.user = { + isNormalUser = true; + extraGroups = [ "wheel" "audio" ]; + uid = 1000; + openssh.authorizedKeys.keys = [ config.krebs.users.makefu.pubkey ]; + }; } -- cgit v1.2.3