From 1d1eb043d19a9f1b0c8e8faebede7842a45dabf5 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 22 Mar 2023 23:57:07 +0100 Subject: ma gum.r: enable ipv6 again --- makefu/1systems/gum/config.nix | 5 +++-- makefu/1systems/gum/hetznercloud/network.nix | 15 ++++++++------- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index 26bfd0731..e61af7a7b 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -103,6 +103,7 @@ in { # # { krebs.exim.enable = mkDefault true; } + # sharing # samba sahre @@ -125,7 +126,7 @@ in { - # + { # recent changes mediawiki bot networking.firewall.allowedUDPPorts = [ 5005 5006 ]; @@ -173,7 +174,7 @@ in { # # - + # # # # diff --git a/makefu/1systems/gum/hetznercloud/network.nix b/makefu/1systems/gum/hetznercloud/network.nix index 24fe3842f..5159cf570 100644 --- a/makefu/1systems/gum/hetznercloud/network.nix +++ b/makefu/1systems/gum/hetznercloud/network.nix @@ -3,7 +3,7 @@ let external-mac = "96:00:01:24:33:f4"; external-gw = "172.31.1.1"; external-ip = "142.132.189.140"; - external-ip6 = "2a01:4f8:1c17:5cdf::2/64"; + external-ip6 = "2a01:4f8:1c17:5cdf::2"; external-gw6 = "fe80::1"; external-netmask = 32; external-netmask6 = 64; @@ -16,19 +16,20 @@ in SUBSYSTEM=="net", ATTR{address}=="${external-mac}", NAME="${ext-if}" ''; networking = { + enableIPv6 = true; + nat.enableIPv6 = true; interfaces."${ext-if}" = { useDHCP = true; + ipv6.addresses = [{ + address = external-ip6; + prefixLength = external-netmask6; + }]; }; #ipv4.addresses = [{ # address = external-ip; # prefixLength = external-netmask; #}]; - #ipv6.addresses = [{ - # address = external-ip6; - # prefixLength = external-netmask6; - # }]; - #}; - #defaultGateway6 = { address = external-gw6; interface = ext-if; }; + defaultGateway6 = { address = external-gw6; interface = ext-if; }; #defaultGateway = external-gw; nameservers = [ "1.1.1.1" ]; }; -- cgit v1.3.1 From d030aae27223659504eee9775f22755eda0fe5d1 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 26 Apr 2023 18:41:02 +0200 Subject: ma wbob: add brother ql-800 --- makefu/1systems/wbob/config.nix | 5 ++++- makefu/2configs/bureautomation/printer.nix | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 makefu/2configs/bureautomation/printer.nix (limited to 'makefu/1systems') diff --git a/makefu/1systems/wbob/config.nix b/makefu/1systems/wbob/config.nix index b12a6397d..ffc64587e 100644 --- a/makefu/1systems/wbob/config.nix +++ b/makefu/1systems/wbob/config.nix @@ -53,6 +53,7 @@ in { # new hass entry point + # now runs in thales # # #mpd is only used for TTS, this is the web interface @@ -100,7 +101,9 @@ in { # temporary # - { services.jellyfin.enable = true; } + { + services.jellyfin.enable = true; + } ]; krebs = { diff --git a/makefu/2configs/bureautomation/printer.nix b/makefu/2configs/bureautomation/printer.nix new file mode 100644 index 000000000..f0cf495ef --- /dev/null +++ b/makefu/2configs/bureautomation/printer.nix @@ -0,0 +1,25 @@ +{ pkgs, config, ... }: +let + mainUser = config.krebs.build.user.name; +in { + services.printing = { + enable = true; + drivers = with pkgs;[ + brlaser + cups-ptouch + ]; + }; + users.users.kiosk.extraGroups = [ "scanner" "lp" ]; + state = [ "/var/lib/cups"]; + users.users.kiosk.packages = with pkgs;[ + python3Packages.brother-ql + libreoffice + qrencode + imagemagick + ]; + + services.udev.extraRules = '' + SUBSYSTEMS=="usb", ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="209b", ATTRS{serial}=="000F1Z401759", MODE="0664", GROUP="lp", SYMLINK+="usb/lp0" + ''; + +} -- cgit v1.3.1 From 447b4931439670b566b9cd26e36b8b11de6f7209 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 29 Apr 2023 21:11:06 +0200 Subject: ma wbob.r: add Brother QL-800 + ui --- makefu/1systems/wbob/config.nix | 2 +- makefu/2configs/bureautomation/brother-ql-web.nix | 23 +++++++++++++++++++++++ makefu/2configs/bureautomation/printer.nix | 3 +++ makefu/2configs/gui/pipewire.nix | 3 +-- makefu/2configs/gui/wbob-kiosk.nix | 13 ++++++++++--- makefu/5pkgs/default.nix | 1 + 6 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 makefu/2configs/bureautomation/brother-ql-web.nix (limited to 'makefu/1systems') diff --git a/makefu/1systems/wbob/config.nix b/makefu/1systems/wbob/config.nix index ffc64587e..77f0f0337 100644 --- a/makefu/1systems/wbob/config.nix +++ b/makefu/1systems/wbob/config.nix @@ -22,7 +22,7 @@ in { # - { environment.systemPackages = [ pkgs.nano ]; } + { environment.systemPackages = [ pkgs.brother_ql_web pkgs.nano ]; } # # diff --git a/makefu/2configs/bureautomation/brother-ql-web.nix b/makefu/2configs/bureautomation/brother-ql-web.nix new file mode 100644 index 000000000..26887db03 --- /dev/null +++ b/makefu/2configs/bureautomation/brother-ql-web.nix @@ -0,0 +1,23 @@ + {pkgs, ... }: + let + pkg = pkgs.brother_ql_web; + in { + systemd.services.brother-ql-web = { + after = [ "network.target" ]; + description = "Brother QL Web Interface"; + wantedBy = [ "multi-user.target" ]; + environment = { + FLASK_PRINTER = "usb://0x04f9:0x209b/000F1Z401759"; + FLASK_MODEL = "QL-800"; + #FLASK_SERVER_PORT = "8013"; + #FLASK_LABEL_DEFAULT_SIZE = "d24"; + #FLASK_LABEL_DEFAULT_QR_SIZE = "7"; + }; + serviceConfig = { + ExecStart = "${pkg}/bin/brother_ql_web"; + DynamicUser = true; + SupplementaryGroups = "lp"; + Restart = "always"; + }; + }; +} diff --git a/makefu/2configs/bureautomation/printer.nix b/makefu/2configs/bureautomation/printer.nix index f0cf495ef..86d5a4069 100644 --- a/makefu/2configs/bureautomation/printer.nix +++ b/makefu/2configs/bureautomation/printer.nix @@ -2,6 +2,9 @@ let mainUser = config.krebs.build.user.name; in { + imports = [ + ./brother-ql-web.nix + ]; services.printing = { enable = true; drivers = with pkgs;[ diff --git a/makefu/2configs/gui/pipewire.nix b/makefu/2configs/gui/pipewire.nix index eb94f75b7..d52681551 100644 --- a/makefu/2configs/gui/pipewire.nix +++ b/makefu/2configs/gui/pipewire.nix @@ -12,10 +12,9 @@ services.pipewire = { enable = true; - systemWide = true; + # systemWide = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - jack.enable = true; }; } diff --git a/makefu/2configs/gui/wbob-kiosk.nix b/makefu/2configs/gui/wbob-kiosk.nix index c67aa7cfb..3a21bf213 100644 --- a/makefu/2configs/gui/wbob-kiosk.nix +++ b/makefu/2configs/gui/wbob-kiosk.nix @@ -5,11 +5,11 @@ ./base.nix ]; users.users.kiosk = { - packages = [ pkgs.chromium pkgs.vscode ]; + packages = with pkgs;[ chromium vscode spotify tartube-yt-dlp ]; group = "kiosk"; isNormalUser = true; uid = 1003; - extraGroups = [ "wheel" "audio" "pulse" ]; + extraGroups = [ "wheel" "audio" "pulse" "pipewire" ]; }; users.groups.kiosk.gid = 989 ; services.xserver = { @@ -31,7 +31,10 @@ }; - environment.systemPackages = [ pkgs.gnomeExtensions.appindicator ]; + environment.systemPackages = [ + pkgs.gnomeExtensions.appindicator pkgs.pavucontrol pkgs.jellyfin-media-player pkgs.chromium pkgs.firefox pkgs.kodi + pkgs.pavucontrol +]; services.dbus.packages = with pkgs; [ gnome2.GConf gnome3.gnome-settings-daemon ]; systemd.services.xset-off = { @@ -45,5 +48,9 @@ Restart = "on-failure"; }; }; + services.pipewire.systemWide = lib.mkForce false; + services.pipewire.config.pipewire-pulse = { + "pulse.properties"."server.address" = [ "unix:native" "tcp:4713" ]; + }; } diff --git a/makefu/5pkgs/default.nix b/makefu/5pkgs/default.nix index 66a8d99d1..c057d1470 100644 --- a/makefu/5pkgs/default.nix +++ b/makefu/5pkgs/default.nix @@ -44,6 +44,7 @@ in { alsa-hdspconf = callPackage ./custom/alsa-tools { alsaToolTarget="hdspconf";}; alsa-hdspmixer = callPackage ./custom/alsa-tools { alsaToolTarget="hdspmixer";}; alsa-hdsploader = callPackage ./custom/alsa-tools { alsaToolTarget="hdsploader";}; + brother_ql_web = (builtins.getFlake "github:makefu/brother_ql_web?rev=a3f8625f48111da8cd6f8e562c966cdca445b82d").packages.x86_64-linux.default; qcma = super.pkgs.libsForQt5.callPackage ./custom/qcma { }; inherit (callPackage ./devpi {}) devpi-web ; jellyfin = unstable.jellyfin; -- cgit v1.3.1 From 0899a30efdbc6c2abe8afa2c0dea5980b33e8769 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 3 Jun 2023 15:17:03 +0200 Subject: ma snake.r: add sound hardware config --- makefu/1systems/snake/config.nix | 2 +- makefu/1systems/snake/hardware-config.nix | 3 ++ makefu/1systems/snake/sound.nix | 51 +++++++++++++++++++++++++++++++ makefu/1systems/snake/source.nix | 1 - makefu/1systems/snake/wifi.nix | 6 ++++ 5 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 makefu/1systems/snake/sound.nix create mode 100644 makefu/1systems/snake/wifi.nix (limited to 'makefu/1systems') diff --git a/makefu/1systems/snake/config.nix b/makefu/1systems/snake/config.nix index 1c6068e98..69e347d71 100644 --- a/makefu/1systems/snake/config.nix +++ b/makefu/1systems/snake/config.nix @@ -10,7 +10,7 @@ in { - + # ]; krebs = { enable = true; diff --git a/makefu/1systems/snake/hardware-config.nix b/makefu/1systems/snake/hardware-config.nix index 827c1d3eb..88124f659 100644 --- a/makefu/1systems/snake/hardware-config.nix +++ b/makefu/1systems/snake/hardware-config.nix @@ -2,6 +2,8 @@ { imports = [ + ./wifi.nix + ./sound.nix ]; boot.loader.grub.enable = true; boot.loader.grub.version = 2; @@ -18,4 +20,5 @@ boot.kernelParams = [ "net.ifnames=0" ]; networking.hostId = "0123AABB"; + } diff --git a/makefu/1systems/snake/sound.nix b/makefu/1systems/snake/sound.nix new file mode 100644 index 000000000..452f4b4b1 --- /dev/null +++ b/makefu/1systems/snake/sound.nix @@ -0,0 +1,51 @@ +{ lib, ... }: { + imports = [ + + ]; + nixpkgs.config.allowUnfree = true; + networking.networkmanager.enable = lib.mkForce false; + # sound.enable = true; + #hardware.pulseaudio = { + # enable = true; + # systemWide = true; + # tcp = { + # enable = true; + # anonymousClients.allowAll = true; + # }; + #}; + + #users.users.makefu = { + # extraGroups = [ "pipewire" "audio" ]; + #}; + + + #services.xserver = { + # enable = true; + # # desktopManager.xterm.enable = true; + # desktopManager.xfce = { + # enable = true; + # noDesktop = true; + # }; + + # displayManager.autoLogin = { + # enable = true; + # user = "makefu"; + # }; + #}; + hardware.pulseaudio.enable = lib.mkForce false; + security.rtkit.enable = true; + #services.pipewire = { + # enable = true; + # systemWide = true; + # socketActivation = false; + # alsa.enable = true; + # alsa.support32Bit = true; + # pulse.enable = true; + # config.pipewire-pulse = { + # "pulse.properties"."server.address" = [ "unix:native" "tcp:4713" ]; + # }; + + #}; + + +} diff --git a/makefu/1systems/snake/source.nix b/makefu/1systems/snake/source.nix index b9a32a2c4..8fc2fff2d 100644 --- a/makefu/1systems/snake/source.nix +++ b/makefu/1systems/snake/source.nix @@ -3,5 +3,4 @@ full = true; home-manager = true; hw = true; - disko = true; } diff --git a/makefu/1systems/snake/wifi.nix b/makefu/1systems/snake/wifi.nix new file mode 100644 index 000000000..7e1569010 --- /dev/null +++ b/makefu/1systems/snake/wifi.nix @@ -0,0 +1,6 @@ +{ + networking.wireless = { + enable = true; + networks = import ; + }; +} -- cgit v1.3.1 From bf8facca3679cc15b2ebb73e1c7016c205868f86 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 3 Jun 2023 15:17:54 +0200 Subject: ma cake.r: init config --- makefu/1systems/cake/config.nix | 8 +++++++- makefu/1systems/cake/hardware-config.nix | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/cake/config.nix b/makefu/1systems/cake/config.nix index 8b9812cf4..b9550cb2e 100644 --- a/makefu/1systems/cake/config.nix +++ b/makefu/1systems/cake/config.nix @@ -14,8 +14,15 @@ in { # # # + # # configure your hw: # + + # directly use the alsa device instead of attaching to pulse + + + + ]; krebs = { enable = true; @@ -28,5 +35,4 @@ in { documentation.info.enable = false; documentation.man.enable = false; documentation.nixos.enable = false; - sound.enable = false; } diff --git a/makefu/1systems/cake/hardware-config.nix b/makefu/1systems/cake/hardware-config.nix index a0cd4fac1..932aa1929 100644 --- a/makefu/1systems/cake/hardware-config.nix +++ b/makefu/1systems/cake/hardware-config.nix @@ -10,5 +10,6 @@ options = [ "noatime" ]; }; }; - #hardware.raspberry-pi."4".fkms-3d.enable = true; + hardware.raspberry-pi."4".fkms-3d.enable = true; + hardware.raspberry-pi."4".audio.enable = true; } -- cgit v1.3.1 From dd0a6294c8699640f47127f237104aac9d96c896 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 3 Jun 2023 15:27:17 +0200 Subject: ma x.r: migrate to gnome --- makefu/1systems/x/config.nix | 58 +++++++++++++++++++------------- makefu/1systems/x/x13/battery.nix | 6 ++++ makefu/1systems/x/x13/default.nix | 18 ++++++---- makefu/1systems/x/x13/disk.nix | 67 +++++++++++++++++++++++++++++++++++++ makefu/1systems/x/x13/input.nix | 44 ++++++++++++------------ makefu/2configs/gui/base.nix | 22 ++++++------ makefu/2configs/gui/gnome.nix | 22 ++++++++++++ makefu/2configs/gui/snake-kiosk.nix | 44 ++++++++++++++++++++++++ 8 files changed, 218 insertions(+), 63 deletions(-) create mode 100644 makefu/1systems/x/x13/battery.nix create mode 100644 makefu/1systems/x/x13/disk.nix create mode 100644 makefu/2configs/gui/gnome.nix create mode 100644 makefu/2configs/gui/snake-kiosk.nix (limited to 'makefu/1systems') diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index 3f9e071e6..784f9148f 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -48,6 +48,16 @@ { bits = 4096; path = (toString ); type = "rsa";} ]; } + #{ + # imports = [ + # + # ]; + # services.pipewire.config.pipewire-pulse = { + # "pulse.properties"."server.address" = [ "unix:native" "tcp:4713" ]; + # }; + # networking.firewall.allowedTCPPorts = [ 4713 ]; + + #} #{ # users.users.makefu.packages = with pkgs;[ mpc_cli ncmpcpp ]; @@ -130,7 +140,7 @@ # # # - + # # Krebs @@ -146,7 +156,7 @@ # - + # # Virtualization # @@ -179,6 +189,7 @@ # temporary # { services.redis.enable = true; } + # citadel exporter # { services.mongodb.enable = true; } # { services.elasticsearch.enable = true; } # @@ -189,27 +200,28 @@ # # # - - { - networking.wireguard.interfaces.wg0 = { - ips = [ "10.244.0.2/24" ]; - privateKeyFile = (toString ) + "/wireguard.key"; - allowedIPsAsRoutes = true; - peers = [ - { - # gum - endpoint = "${config.krebs.hosts.gum.nets.internet.ip4.addr}:51820"; - allowedIPs = [ "10.244.0.0/24" ]; - publicKey = "yAKvxTvcEVdn+MeKsmptZkR3XSEue+wSyLxwcjBYxxo="; - } - #{ - # # vbob - # allowedIPs = [ "10.244.0.3/32" ]; - # publicKey = "Lju7EsCu1OWXhkhdNR7c/uiN60nr0TUPHQ+s8ULPQTw="; - #} - ]; - }; - } + + +# { +# networking.wireguard.interfaces.wg0 = { +# ips = [ "10.244.0.2/24" ]; +# privateKeyFile = (toString ) + "/wireguard.key"; +# allowedIPsAsRoutes = true; +# peers = [ +# { +# # gum +# endpoint = "${config.krebs.hosts.gum.nets.internet.ip4.addr}:51820"; +# allowedIPs = [ "10.244.0.0/24" ]; +# publicKey = "yAKvxTvcEVdn+MeKsmptZkR3XSEue+wSyLxwcjBYxxo="; +# } +# #{ +# # # vbob +# # allowedIPs = [ "10.244.0.3/32" ]; +# # publicKey = "Lju7EsCu1OWXhkhdNR7c/uiN60nr0TUPHQ+s8ULPQTw="; +# #} +# ]; +# }; +# } ]; diff --git a/makefu/1systems/x/x13/battery.nix b/makefu/1systems/x/x13/battery.nix new file mode 100644 index 000000000..3e28292e3 --- /dev/null +++ b/makefu/1systems/x/x13/battery.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: +{ + powerManagement.powertop.enable = true; + services.power-profiles-daemon.enable = true; + users.users.makefu.packages = [ pkgs.gnome.gnome-power-manager ]; +} diff --git a/makefu/1systems/x/x13/default.nix b/makefu/1systems/x/x13/default.nix index d652229f9..27ea0c99c 100644 --- a/makefu/1systems/x/x13/default.nix +++ b/makefu/1systems/x/x13/default.nix @@ -4,6 +4,7 @@ imports = [ ./zfs.nix ./input.nix + ./battery.nix # close enough # @@ -17,23 +18,26 @@ # services.xserver.enable = lib.mkForce false; - services.xserver.videoDrivers = [ - "amdgpu" + services.xserver.videoDrivers = [ "amdgpu" ]; + boot.initrd.kernelModules = [ "amdgpu" ]; + hardware.opengl.driSupport = true; + hardware.opengl.extraPackages = [ pkgs.amdvlk pkgs.rocm-opencl-icd pkgs.rocm-opencl-runtime ]; + # For 32 bit applications + hardware.opengl.driSupport32Bit = true; + hardware.opengl.extraPackages32 = with pkgs; [ + driversi686Linux.amdvlk ]; - hardware.opengl.extraPackages = [ pkgs.amdvlk pkgs.rocm-opencl-icd ]; # is required for amd graphics support ( xorg wont boot otherwise ) #boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = lib.mkForce pkgs.linuxPackages; - environment.variables.VK_ICD_FILENAMES = - "/run/opengl-driver/share/vulkan/icd.d/amd_icd64.json"; - services.fwupd.enable = true; programs.light.enable = true; users.groups.video = {}; - users.users.makefu.extraGroups = [ "video" ]; + users.groups.render = {}; + users.users.makefu.extraGroups = [ "video" "render" ]; boot.extraModprobeConfig = '' options thinkpad_acpi fan_control=1 diff --git a/makefu/1systems/x/x13/disk.nix b/makefu/1systems/x/x13/disk.nix new file mode 100644 index 000000000..7ce77bdf5 --- /dev/null +++ b/makefu/1systems/x/x13/disk.nix @@ -0,0 +1,67 @@ +{ disk ? "/dev/sda", ... }: { + disko.devices = { + disk = { + nvme = { + type = "disk"; + device = disk; + content = { + type = "table"; + format = "gpt"; + partitions = [ + { + name = "ESP"; + start = "0"; + end = "512MiB"; + fs-type = "fat32"; + bootable = true; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + } + { + name = "zfs"; + start = "512MiB"; + end = "100%"; + content = { + type = "zfs"; + pool = "tank"; + }; + } + ]; + }; + }; + }; + zpool = { + tank = { + type = "zpool"; + rootFsOptions = { + compression = "lz4"; + #reservation = "5G"; + "com.sun:auto-snapshot" = "false"; + }; + mountpoint = null; + postCreateHook = "zfs snapshot tank@blank"; + + datasets = { + + root = { + type = "zfs_fs"; + mountpoint = "/"; + options = { + encryption = "aes-256-gcm"; + keyformat = "passphrase"; + "com.sun:auto-snapshot" = "true"; + }; + #keylocation = "file:///tmp/secret.key"; + }; + "root/home" = { + type = "zfs_fs"; + mountpoint = "/home"; + }; + }; + }; + }; + }; +} diff --git a/makefu/1systems/x/x13/input.nix b/makefu/1systems/x/x13/input.nix index 775e19303..93816ce84 100644 --- a/makefu/1systems/x/x13/input.nix +++ b/makefu/1systems/x/x13/input.nix @@ -4,14 +4,16 @@ # 1. for pressing insert hold shift+fn+Fin # scroll by holding middle mouse - services.xserver.displayManager.sessionCommands ='' - xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation" 8 1 - xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Button" 8 2 - xinput set-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 - # configure timeout of pressing and holding middle button - # xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 - xinput disable 'ETPS/2 Elantech Touchpad' - ''; + #services.xserver.displayManager.sessionCommands ='' + # xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation" 8 1 + # xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Button" 8 2 + # xinput set-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5 + # # configure timeout of pressing and holding middle button + # # xinput set-int-prop "ETPS/2 Elantech TrackPoint" "Evdev Wheel Emulation Timeout" 8 200 + # xinput disable 'ETPS/2 Elantech Touchpad' + #''; + + services.xserver.libinput.enable = true; boot.kernelParams = [ #"psmouse.proto=imps" #"psmouse.proto=bare" @@ -27,20 +29,20 @@ { keys = [ 224 ]; events = [ "key" ]; command = "${pkgs.light}/bin/light -U 10"; } # fn - F6 # fn - 4 => suspend # fn - d => lcdshadow - { keys = [ 227 ]; events = [ "key" ]; command = builtins.toString ( # fn - F7 - pkgs.writers.writeDash "toggle_touchpad" '' - PATH=${lib.makeBinPath [ pkgs.xorg.xinput pkgs.gnugrep ]} - DISPLAY=:0 - export DISPLAY PATH + #{ keys = [ 227 ]; events = [ "key" ]; command = builtins.toString ( # fn - F7 + # pkgs.writers.writeDash "toggle_touchpad" '' + # PATH=${lib.makeBinPath [ pkgs.xorg.xinput pkgs.gnugrep ]} + # DISPLAY=:0 + # export DISPLAY PATH - device=$(xinput list --name-only | grep Touchpad) - if [ "$(xinput list-props "$device" | grep -P ".*Device Enabled.*\K.(?=$)" -o)" -eq 1 ];then - xinput disable "$device" - else - xinput enable "$device" - fi - ''); - } + # device=$(xinput list --name-only | grep Touchpad) + # if [ "$(xinput list-props "$device" | grep -P ".*Device Enabled.*\K.(?=$)" -o)" -eq 1 ];then + # xinput disable "$device" + # else + # xinput enable "$device" + # fi + # ''); + #} ]; }; } diff --git a/makefu/2configs/gui/base.nix b/makefu/2configs/gui/base.nix index b2192c7f9..b1b7c9913 100644 --- a/makefu/2configs/gui/base.nix +++ b/makefu/2configs/gui/base.nix @@ -18,30 +18,28 @@ in imports = [ ./urxvtd.nix ./pipewire.nix + ./gnome.nix ]; + # services.redshift.enable = true; services.xserver = { enable = true; layout = "us"; xkbVariant = "altgr-intl"; xkbOptions = "ctrl:nocaps, eurosign:e"; - windowManager = { - awesome.enable = true; - awesome.noArgb = true; - awesome.luaModules = [ pkgs.luaPackages.vicious ]; - }; - displayManager.defaultSession = lib.mkDefault "none+awesome"; - displayManager.autoLogin = { - enable = true; - user = mainUser; - }; +# windowManager = { +# awesome.enable = true; +# awesome.noArgb = true; +# awesome.luaModules = [ pkgs.luaPackages.vicious ]; +# }; +# displayManager.defaultSession = lib.mkDefault "none+awesome"; }; environment.systemPackages = [ pkgs.gnome.adwaita-icon-theme ]; # lid switch is handled via button presses - services.logind.lidSwitch = lib.mkDefault "ignore"; - makefu.awesome.enable = true; + # services.logind.lidSwitch = lib.mkDefault "ignore"; + #makefu.awesome.enable = true; console.font = "Lat2-Terminus16"; fonts = { diff --git a/makefu/2configs/gui/gnome.nix b/makefu/2configs/gui/gnome.nix new file mode 100644 index 000000000..e6eff29f4 --- /dev/null +++ b/makefu/2configs/gui/gnome.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +let + mainUser = config.krebs.build.user.name; +in +{ + programs.gnome-terminal.enable = true; + services.xserver = { + desktopManager.gnome.enable = true; + displayManager.gdm.enable = true; + #displayManager.autoLogin = { + # enable = true; + # user = mainUser; + #}; + }; + home-manager.users.${mainUser}.services.gammastep = { + enable = true; + provider = "manual"; + latitude = config.location.latitude; + longitude = config.location.longitude; + }; +} diff --git a/makefu/2configs/gui/snake-kiosk.nix b/makefu/2configs/gui/snake-kiosk.nix new file mode 100644 index 000000000..838ac3a5c --- /dev/null +++ b/makefu/2configs/gui/snake-kiosk.nix @@ -0,0 +1,44 @@ +{ pkgs, lib, ... }: +{ + + imports = [ + ./base.nix + ]; + users.users.kiosk = { + # packages = [ pkgs.chromium pkgs.vscode ]; + group = "kiosk"; + isNormalUser = true; + uid = 1003; + extraGroups = [ "wheel" "audio" "pulse" "pipewire" ]; + }; + users.groups.kiosk.gid = 989 ; + services.xserver = { + enable = true; + + windowManager = lib.mkForce { awesome.enable = false; }; + displayManager.gdm.enable = true; + displayManager.gdm.autoSuspend = false; + displayManager.autoLogin = { + enable = true; + user = lib.mkForce "kiosk"; + }; + displayManager.defaultSession = "gnome"; + desktopManager.gnome.enable = true; + }; + + systemd.targets.sleep.enable = false; + systemd.targets.suspend.enable = false; + systemd.targets.hibernate.enable = false; + systemd.targets.hybrid-sleep.enable = false; + + + + environment.systemPackages = [ pkgs.gnomeExtensions.appindicator ]; + services.dbus.packages = with pkgs; [ gnome2.GConf gnome3.gnome-settings-daemon ]; + + services.pipewire.systemWide = lib.mkForce false; + services.pipewire.config.pipewire-pulse = { + "pulse.properties"."server.address" = [ "unix:native" "tcp:4713" ]; + }; + +} -- cgit v1.3.1 From ad0c3323172a0b6562f0545c0da42214d3178da9 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 3 Jun 2023 15:40:54 +0200 Subject: ma gum.r: apply all deployment changes --- makefu/1systems/gum/config.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index e61af7a7b..f40f113bb 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -9,6 +9,12 @@ in { imports = [ ./hetznercloud + { + # wait for mount + systemd.services.rtorrent.wantedBy = lib.mkForce []; + systemd.services.phpfpm-nextcloud.wantedBy = lib.mkForce []; + systemd.services.samba-smbd.wantedBy = lib.mkForce []; + } { users.users.lass = { uid = 19002; @@ -140,6 +146,7 @@ in { # postgres backend + #postgres backend ### Moving owncloud data dir to /media/cloud/nextcloud-data { @@ -185,7 +192,7 @@ in { # - # + # -- cgit v1.3.1 From a0c4792acab4810c6a4ef3d74af82bb79b218ac4 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 3 Jun 2023 15:41:20 +0200 Subject: ma latte: remove mediawiki-matrix-bot --- makefu/1systems/latte/config.nix | 2 -- 1 file changed, 2 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/latte/config.nix b/makefu/1systems/latte/config.nix index 44fa14812..9a242a41b 100644 --- a/makefu/1systems/latte/config.nix +++ b/makefu/1systems/latte/config.nix @@ -32,8 +32,6 @@ in { # - # Services: - # torrent is managed by gum # -- cgit v1.3.1 From 6017dfb05359d43b337822bf850082a60a53b941 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 3 Jun 2023 15:41:49 +0200 Subject: ma omo.r: apply deployment changes --- makefu/1systems/omo/config.nix | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'makefu/1systems') diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix index 3ff1d0238..224e170dd 100644 --- a/makefu/1systems/omo/config.nix +++ b/makefu/1systems/omo/config.nix @@ -54,17 +54,19 @@ in { - - { krebs.airdcpp.dcpp.shares = let - d = path: "/media/cryptX/${path}"; - in { - emu.path = d "emu"; - audiobooks.path = lib.mkForce (d "audiobooks"); - incoming.path = lib.mkForce (d "torrent"); - anime.path = d "anime"; - }; - krebs.airdcpp.dcpp.DownloadDirectory = "/media/cryptX/torrent/dcpp"; - } + + + # + #{ krebs.airdcpp.dcpp.shares = let + # d = path: "/media/cryptX/${path}"; + # in { + # emu.path = d "emu"; + # audiobooks.path = lib.mkForce (d "audiobooks"); + # incoming.path = lib.mkForce (d "torrent"); + # anime.path = d "anime"; + # }; + # krebs.airdcpp.dcpp.DownloadDirectory = "/media/cryptX/torrent/dcpp"; + #} { # copy config from to /var/lib/sabnzbd/ #services.sabnzbd.enable = true; @@ -84,12 +86,12 @@ in { # - # + # services { services.nginx.enable = true; - networking.firewall.allowedTCPPorts = [ 80 ]; + networking.firewall.allowedTCPPorts = [ 80 8123 ]; } # @@ -100,10 +102,11 @@ in { - + # # - + # + { makefu.ps3netsrv = { -- cgit v1.3.1 From 01a129113014ec6ae1ba267da89898c78b5b36b1 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 3 Jun 2023 15:42:47 +0200 Subject: ma minicake.r: init --- makefu/1systems/minicake/config.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 makefu/1systems/minicake/config.nix (limited to 'makefu/1systems') diff --git a/makefu/1systems/minicake/config.nix b/makefu/1systems/minicake/config.nix new file mode 100644 index 000000000..fe66679ad --- /dev/null +++ b/makefu/1systems/minicake/config.nix @@ -0,0 +1,27 @@ +{ config,nixpkgsPath, pkgs, lib, ... }: +{ + krebs = { + enable = true; + + dns.providers.lan = "hosts"; + build.user = config.krebs.users.makefu; + }; + imports = [ + (nixpkgsPath + "/nixos/modules/profiles/minimal.nix") + (nixpkgsPath + "/nixos/modules/profiles/installation-device.nix") + ]; + + # cifs-utils fails to cross-compile + # Let's simplify this by removing all unneeded filesystems from the image. + boot.supportedFilesystems = lib.mkForce [ "vfat" ]; + + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; + + + users.users = { + root = { + openssh.authorizedKeys.keys = [ config.krebs.users.makefu.pubkey ]; + }; + }; + services.openssh.enable = true; +} -- cgit v1.3.1