summaryrefslogtreecommitdiffstats
path: root/makefu/1systems
diff options
context:
space:
mode:
Diffstat (limited to 'makefu/1systems')
-rw-r--r--makefu/1systems/filepimp/config.nix77
-rw-r--r--makefu/1systems/filepimp/hw.nix83
-rw-r--r--makefu/1systems/filepimp/source.nix1
-rw-r--r--makefu/1systems/gum/config.nix9
-rw-r--r--makefu/1systems/omo/config.nix29
-rw-r--r--makefu/1systems/omo/hw/omo.nix4
-rw-r--r--makefu/1systems/tsp/config.nix11
-rw-r--r--makefu/1systems/tsp/hardware.nix9
-rw-r--r--makefu/1systems/wbob/config.nix72
-rw-r--r--makefu/1systems/wbob/nuc/default.nix23
-rw-r--r--makefu/1systems/wbob/source.nix1
-rw-r--r--makefu/1systems/x/config.nix3
-rw-r--r--makefu/1systems/x/x13/default.nix22
-rw-r--r--makefu/1systems/x/x13/input.nix33
14 files changed, 208 insertions, 169 deletions
diff --git a/makefu/1systems/filepimp/config.nix b/makefu/1systems/filepimp/config.nix
index e023c2885..346de10ba 100644
--- a/makefu/1systems/filepimp/config.nix
+++ b/makefu/1systems/filepimp/config.nix
@@ -1,26 +1,13 @@
{ config, pkgs, lib, ... }:
+# nix-shell -p wol --run 'wol C8:CB:B8:CF:E4:DC --passwd=CA-FE-BA-BE-13-37'
let
- byid = dev: "/dev/disk/by-id/" + dev;
- part1 = disk: disk + "-part1";
- rootDisk = byid "ata-SanDisk_SDSSDP064G_140237402890";
- primary-interface = "enp3s0"; # c8:cb:b8:cf:e4:dc
- # N54L Chassis:
- # ____________________
- # |______FRONT_______|
- # | [ ]|
- # | [ d1 ** d3 d4 ]|
- # |___[_____________]|
- jDisk1 = byid "ata-ST4000DM000-1F2168_Z3040NEA";
-
- # transfer to omo
- # jDisk0 = byid "ata-ST4000DM000-1F2168_Z303HVSG";
- jDisk2 = byid "ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E0621363";
- jDisk3 = byid "ata-TOSHIBA_MD04ACA400_156GK89OFSBA";
- allDisks = [ rootDisk jDisk1 jDisk2 jDisk3 ];
+ itf = config.makefu.server.primary-itf;
in {
imports =
[ # Include the results of the hardware scan.
+ ./hw.nix
<stockholm/makefu>
+ <stockholm/makefu/2configs/home-manager>
<stockholm/makefu/2configs/fs/single-partition-ext4.nix>
<stockholm/makefu/2configs/smart-monitor.nix>
<stockholm/makefu/2configs/tinc/retiolum.nix>
@@ -28,64 +15,12 @@ in {
];
krebs.build.host = config.krebs.hosts.filepimp;
- # AMD N54L
- boot = {
- loader.grub.device = rootDisk;
-
- initrd.availableKernelModules = [
- "ahci"
- "ohci_pci"
- "ehci_pci"
- "pata_atiixp"
- "usb_storage"
- "usbhid"
- ];
-
- kernelModules = [ "kvm-amd" ];
- extraModulePackages = [ ];
- };
- hardware.enableRedistributableFirmware = true;
- hardware.cpu.amd.updateMicrocode = true;
-
- zramSwap.enable = true;
-
- makefu.snapraid = let
- toMedia = name: "/media/" + name;
- in {
- enable = true;
- # todo combine creation when enabling the mount point
- disks = map toMedia [
- # "j0"
- "j1"
- "j2"
- ];
- parity = toMedia "par0";
- };
- # TODO: refactor, copy-paste from omo
- services.smartd.devices = builtins.map (x: { device = x; }) allDisks;
- powerManagement.powerUpCommands = lib.concatStrings (map (disk: ''
- ${pkgs.hdparm}/sbin/hdparm -S 100 ${disk}
- ${pkgs.hdparm}/sbin/hdparm -B 127 ${disk}
- ${pkgs.hdparm}/sbin/hdparm -y ${disk}
- '') allDisks);
- fileSystems = let
- xfsmount = name: dev:
- { "/media/${name}" = {
- device = dev; fsType = "xfs";
- options = [ "nofail" ];
- }; };
- in
- # (xfsmount "j0" (part1 jDisk0)) //
- (xfsmount "j1" (part1 jDisk1)) //
- (xfsmount "j2" (part1 jDisk2)) //
- (xfsmount "par0" (part1 jDisk3))
- ;
- networking.firewall.trustedInterfaces = [ primary-interface ];
+ networking.firewall.trustedInterfaces = [ itf ];
services.wakeonlan.interfaces = [
{
- interface = primary-interface;
+ interface = itf ;
method = "password";
password = "CA:FE:BA:BE:13:37";
}
diff --git a/makefu/1systems/filepimp/hw.nix b/makefu/1systems/filepimp/hw.nix
new file mode 100644
index 000000000..6f02d9b1b
--- /dev/null
+++ b/makefu/1systems/filepimp/hw.nix
@@ -0,0 +1,83 @@
+{ config, pkgs, lib, ... }:
+
+let
+ byid = dev: "/dev/disk/by-id/" + dev;
+ part1 = disk: disk + "-part1";
+ rootDisk = byid "ata-SanDisk_SDSSDP064G_140237402890";
+ primary-interface = "enp3s0"; # c8:cb:b8:cf:e4:dc
+ # N54L Chassis:
+ # ____________________
+ # |______FRONT_______|
+ # | [ ]|
+ # | [ d1 d0 d3 d4 ]|
+ # |___[_____________]|
+ jDisk1 = byid "ata-ST4000DM000-1F2168_Z3040NEA";
+
+ # transfer to omo
+ jDisk0 = byid "ata-ST4000DM000-1F2168_Z303HVSG";
+ jDisk2 = byid "ata-WDC_WD40EFRX-68WT0N0_WD-WCC4E0621363";
+ jDisk3 = byid "ata-TOSHIBA_MD04ACA400_156GK89OFSBA";
+ allDisks = [ rootDisk jDisk0 jDisk1 jDisk2 jDisk3 ];
+in {
+ boot = {
+ loader.grub.device = rootDisk;
+
+ initrd.availableKernelModules = [
+ "ahci"
+ "ohci_pci"
+ "ehci_pci"
+ "pata_atiixp"
+ "usb_storage"
+ "usbhid"
+ ];
+
+ kernelModules = [ "kvm-amd" ];
+ extraModulePackages = [ ];
+ };
+ makefu.server.primary-itf = primary-interface;
+
+ hardware.enableRedistributableFirmware = true;
+ hardware.cpu.amd.updateMicrocode = true;
+
+ zramSwap.enable = true;
+
+ makefu.snapraid = let
+ toMedia = name: "/media/" + name;
+ in {
+ enable = true;
+ # todo combine creation when enabling the mount point
+ disks = map toMedia [
+ "j0"
+ "j1"
+ "j2"
+ ];
+ parity = toMedia "par0";
+ };
+ # TODO: refactor, copy-paste from omo
+ services.smartd.devices = builtins.map (x: { device = x; }) allDisks;
+ powerManagement.powerUpCommands = lib.concatStrings (map (disk: ''
+ ${pkgs.hdparm}/sbin/hdparm -S 100 ${disk}
+ ${pkgs.hdparm}/sbin/hdparm -B 127 ${disk}
+ ${pkgs.hdparm}/sbin/hdparm -y ${disk}
+ '') allDisks);
+ fileSystems = let
+ xfsmount = name: dev:
+ { "/media/${name}" = {
+ device = dev; fsType = "xfs";
+ options = [ "nofail" ];
+ }; };
+ tomedia = id: "/media/${id}";
+ in
+ (xfsmount "j0" (part1 jDisk0)) //
+ (xfsmount "j1" (part1 jDisk1)) //
+ (xfsmount "j2" (part1 jDisk2)) //
+ (xfsmount "par0" (part1 jDisk3)) //
+ { "/media/jX" = {
+ device = (lib.concatMapStringsSep ":" (d: (tomedia d)) ["j0" "j1" "j2" ]);
+ fsType = "mergerfs";
+ noCheck = true;
+ options = [ "defaults" "allow_other" "nofail" "nonempty" ];
+ };
+ };
+ environment.systemPackages = [ pkgs.mergerfs ];
+}
diff --git a/makefu/1systems/filepimp/source.nix b/makefu/1systems/filepimp/source.nix
index b81a2bf4a..9930f0e42 100644
--- a/makefu/1systems/filepimp/source.nix
+++ b/makefu/1systems/filepimp/source.nix
@@ -1,3 +1,4 @@
{
name="filepimp";
+ home-manager = true;
}
diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix
index 2fd99122a..83fbd8f83 100644
--- a/makefu/1systems/gum/config.nix
+++ b/makefu/1systems/gum/config.nix
@@ -43,6 +43,7 @@ in {
<stockholm/makefu/2configs/zsh-user.nix>
<stockholm/makefu/2configs/mosh.nix>
+ <stockholm/makefu/2configs/storj/forward-port.nix>
# <stockholm/makefu/2configs/gui/xpra.nix>
# networking
@@ -147,7 +148,7 @@ in {
<stockholm/makefu/2configs/deployment/boot-euer.nix>
<stockholm/makefu/2configs/deployment/gecloudpad>
<stockholm/makefu/2configs/deployment/docker/archiveteam-warrior.nix>
- <stockholm/makefu/2configs/deployment/docker/etherpad.euer.krebsco.de.nix>
+ <stockholm/makefu/2configs/bgt/etherpad.euer.krebsco.de.nix>
# <stockholm/makefu/2configs/deployment/systemdultras-rss.nix>
<stockholm/makefu/2configs/shiori.nix>
@@ -156,6 +157,7 @@ in {
<stockholm/makefu/2configs/bgt/download.binaergewitter.de.nix>
<stockholm/makefu/2configs/bgt/hidden_service.nix>
<stockholm/makefu/2configs/bgt/backup.nix>
+ <stockholm/makefu/2configs/bgt/social-to-irc.nix>
# <stockholm/makefu/2configs/logging/client.nix>
@@ -203,7 +205,10 @@ in {
# Network
networking = {
firewall = {
- allowedTCPPorts = [ 80 443 ];
+ allowedTCPPorts = [
+ 80 443
+ 28967 # storj
+ ];
allowPing = true;
logRefusedConnections = false;
};
diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix
index a9e307ddf..d44980ce7 100644
--- a/makefu/1systems/omo/config.nix
+++ b/makefu/1systems/omo/config.nix
@@ -28,9 +28,11 @@ in {
<stockholm/makefu/2configs/home-manager>
<stockholm/makefu/2configs/home-manager/cli.nix>
<stockholm/makefu/2configs/editor/neovim>
+ <stockholm/makefu/2configs/storj/client.nix>
<stockholm/makefu/2configs/backup/state.nix>
+ <stockholm/makefu/2configs/backup/server.nix>
<stockholm/makefu/2configs/exim-retiolum.nix>
# <stockholm/makefu/2configs/smart-monitor.nix>
<stockholm/makefu/2configs/mail-client.nix>
@@ -68,7 +70,7 @@ in {
<stockholm/makefu/2configs/tinc/retiolum.nix>
# statistics
- <stockholm/makefu/2configs/stats/client.nix>
+ # <stockholm/makefu/2configs/stats/client.nix>
# Logging
#influx + grafana
<stockholm/makefu/2configs/stats/server.nix>
@@ -91,13 +93,19 @@ in {
<stockholm/makefu/2configs/virtualisation/docker.nix>
<stockholm/makefu/2configs/bluetooth-mpd.nix>
- <stockholm/makefu/2configs/ham>
+ <stockholm/makefu/2configs/home/airsonic.nix>
+ <stockholm/makefu/2configs/home/photoprism.nix>
+ <stockholm/makefu/2configs/home/metube.nix>
+ <stockholm/makefu/2configs/home/ham>
+ <stockholm/makefu/2configs/home/zigbee2mqtt>
{
makefu.ps3netsrv = {
enable = true;
servedir = "/media/cryptX/emu/ps3";
};
}
+
+
{
hardware.pulseaudio.systemWide = true;
makefu.mpd.musicDirectory = "/media/cryptX/music";
@@ -107,7 +115,15 @@ in {
<stockholm/makefu/2configs/sshd-totp.nix>
# <stockholm/makefu/2configs/logging/central-logging-client.nix>
- <stockholm/makefu/2configs/torrent.nix>
+ # <stockholm/makefu/2configs/torrent.nix>
+ {
+ #krebs.rtorrent = {
+ # downloadDir = lib.mkForce "/media/cryptX/torrent";
+ # extraConfig = ''
+ # upload_rate = 500
+ # '';
+ #};
+ }
# <stockholm/makefu/2configs/elchos/search.nix>
# <stockholm/makefu/2configs/elchos/log.nix>
@@ -118,16 +134,11 @@ in {
# Temporary:
# <stockholm/makefu/2configs/temp/rst-issue.nix>
+ <stockholm/makefu/2configs/bgt/social-to-irc.nix>
];
makefu.full-populate = true;
nixpkgs.config.allowUnfree = true;
- krebs.rtorrent = {
- downloadDir = lib.mkForce "/media/cryptX/torrent";
- extraConfig = ''
- upload_rate = 500
- '';
- };
users.groups.share = {
gid = (import <stockholm/lib>).genid "share";
members = [ "makefu" "misa" ];
diff --git a/makefu/1systems/omo/hw/omo.nix b/makefu/1systems/omo/hw/omo.nix
index 586ad98c4..ae5b778bf 100644
--- a/makefu/1systems/omo/hw/omo.nix
+++ b/makefu/1systems/omo/hw/omo.nix
@@ -51,6 +51,10 @@ in {
enable = true;
disks = map toMapper [ 0 1 3 ];
parity = toMapper 2; # find -name PARITY_PARTITION
+ extraConfig = ''
+ exclude /lib/storj/
+ exclude /.bitcoin/blocks/
+ '';
};
fileSystems = let
cryptMount = name:
diff --git a/makefu/1systems/tsp/config.nix b/makefu/1systems/tsp/config.nix
index 7c65737f7..9586578d3 100644
--- a/makefu/1systems/tsp/config.nix
+++ b/makefu/1systems/tsp/config.nix
@@ -6,21 +6,26 @@
{
imports =
[ # Include the results of the hardware scan.
+ ./hardware.nix
<stockholm/makefu>
+ <stockholm/makefu/2configs/nur.nix>
<stockholm/makefu/2configs/home-manager>
<stockholm/makefu/2configs/main-laptop.nix>
+ <stockholm/makefu/2configs/editor/neovim>
+ <stockholm/makefu/2configs/tools/core.nix>
# <stockholm/makefu/2configs/tools/all.nix>
<stockholm/makefu/2configs/fs/single-partition-ext4.nix>
# hardware specifics are in here
- # imports tp-x2x0.nix
- <stockholm/makefu/2configs/hw/tp-x230.nix>
<stockholm/makefu/2configs/hw/bluetooth.nix>
<stockholm/makefu/2configs/hw/network-manager.nix>
+
# <stockholm/makefu/2configs/rad1o.nix>
<stockholm/makefu/2configs/zsh-user.nix>
- <stockholm/makefu/2configs/exim-retiolum.nix>
+ <stockholm/makefu/2configs/home-manager>
+ <stockholm/makefu/2configs/home-manager/desktop.nix>
+ <stockholm/makefu/2configs/home-manager/cli.nix>
<stockholm/makefu/2configs/tinc/retiolum.nix>
<stockholm/makefu/2configs/sshd-totp.nix>
diff --git a/makefu/1systems/tsp/hardware.nix b/makefu/1systems/tsp/hardware.nix
new file mode 100644
index 000000000..2788eae04
--- /dev/null
+++ b/makefu/1systems/tsp/hardware.nix
@@ -0,0 +1,9 @@
+{ lib, ... }:
+{
+ imports = [
+ # laptop is an acer aspire, but close enough i'd say
+ <stockholm/makefu/2configs/hw/tp-x2x0.nix>
+ ];
+ # the laptop only has the touchpad
+ services.xserver.synaptics.additionalOptions = lib.mkForce ''Option "TouchpadOff" "0"'';
+}
diff --git a/makefu/1systems/wbob/config.nix b/makefu/1systems/wbob/config.nix
index 32dedbde2..f99e493bf 100644
--- a/makefu/1systems/wbob/config.nix
+++ b/makefu/1systems/wbob/config.nix
@@ -1,14 +1,15 @@
{ config, pkgs, lib, ... }:
let
- rootdisk = "/dev/disk/by-id/ata-TS256GMTS800_C613840115";
- datadisk = "/dev/disk/by-id/ata-HGST_HTS721010A9E630_JR10006PH3A02F";
user = config.makefu.gui.user;
primaryIP = "192.168.8.11";
in {
imports =
- [ # Include the results of the hardware scan.
+ [
<stockholm/makefu>
+ # Include the results of the hardware scan.
+ ./nuc
+
<stockholm/makefu/2configs/home-manager>
<stockholm/makefu/2configs/support-nixos.nix>
<stockholm/makefu/2configs/zsh-user.nix>
@@ -37,19 +38,19 @@ in {
# Sensors
# <stockholm/makefu/2configs/stats/client.nix>
- <stockholm/makefu/2configs/stats/collectd-client.nix>
+ # <stockholm/makefu/2configs/stats/collectd-client.nix>
<stockholm/makefu/2configs/stats/telegraf>
<stockholm/makefu/2configs/stats/telegraf/airsensor.nix>
<stockholm/makefu/2configs/stats/telegraf/europastats.nix>
<stockholm/makefu/2configs/stats/external/aralast.nix>
<stockholm/makefu/2configs/stats/arafetch.nix>
- <stockholm/makefu/2configs/hw/mceusb.nix>
+ # <stockholm/makefu/2configs/hw/mceusb.nix>
# <stockholm/makefu/2configs/stats/telegraf/bamstats.nix>
{ environment.systemPackages = [ pkgs.vlc ]; }
<stockholm/makefu/2configs/bureautomation> # new hass entry point
<stockholm/makefu/2configs/bureautomation/led-fader.nix>
- <stockholm/makefu/2configs/bureautomation/kalauerbot.nix>
+ # <stockholm/makefu/2configs/bureautomation/kalauerbot.nix> now runs in thales
# <stockholm/makefu/2configs/bureautomation/visitor-photostore.nix>
# <stockholm/makefu/2configs/bureautomation/mpd.nix> #mpd is only used for TTS, this is the web interface
<stockholm/makefu/2configs/mqtt.nix>
@@ -94,44 +95,6 @@ in {
build.host = config.krebs.hosts.wbob;
};
- swapDevices = [ { device = "/var/swap"; } ];
- services.collectd.extraConfig = lib.mkAfter ''
-
- #LoadPlugin ping
- # does not work because it requires privileges
- #<Plugin "ping">
- # Host "google.de"
- # Host "heise.de"
- #</Plugin>
-
- LoadPlugin curl
- <Plugin curl>
- Interval 300
- TotalTime true
- NamelookupTime true
- ConnectTime true
-
- <Page "google">
- MeasureResponseTime true
- MeasureResponseCode true
- URL "https://google.de"
- </Page>
-
- <Page "webde">
- MeasureResponseTime true
- MeasureResponseCode true
- URL "http://web.de"
- </Page>
-
- </Plugin>
- #LoadPlugin netlink
- #<Plugin "netlink">
- # Interface "enp0s25"
- # Interface "wlp2s0"
- # IgnoreSelected false
- #</Plugin>
- '';
-
networking.firewall.allowedUDPPorts = [ 655 ];
networking.firewall.allowedTCPPorts = [
655
@@ -146,7 +109,7 @@ in {
# Port = 1655
# '';
#};
-
+ boot.kernelPackages = pkgs.linuxPackages_latest;
# rt2870.bin wifi card, part of linux-unfree
hardware.enableRedistributableFirmware = true;
nixpkgs.config.allowUnfree = true;
@@ -156,24 +119,5 @@ in {
address = "10.8.8.11";
prefixLength = 24;
}];
-
-
# nuc hardware
- boot.loader.grub.device = rootdisk;
- hardware.cpu.intel.updateMicrocode = true;
- boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
-
- boot.kernelModules = [
- "kvm-intel" "snd-seq" "snd-rawmidi"
- ];
- fileSystems = {
- "/" = {
- device = rootdisk + "-part1";
- fsType = "ext4";
- };
- "/data" = {
- device = datadisk + "-part1";
- fsType = "ext4";
- };
- };
}
diff --git a/makefu/1systems/wbob/nuc/default.nix b/makefu/1systems/wbob/nuc/default.nix
new file mode 100644
index 000000000..d4993dfd0
--- /dev/null
+++ b/makefu/1systems/wbob/nuc/default.nix
@@ -0,0 +1,23 @@
+let
+ rootdisk = "/dev/disk/by-id/ata-TS256GMTS800_C613840115";
+ datadisk = "/dev/disk/by-id/ata-HGST_HTS721010A9E630_JR10006PH3A02F";
+in {
+ boot.loader.grub.device = rootdisk;
+ hardware.cpu.intel.updateMicrocode = true;
+ boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
+
+ boot.kernelModules = [
+ "kvm-intel" "snd-seq" "snd-rawmidi"
+ ];
+ fileSystems = {
+ "/" = {
+ device = rootdisk + "-part1";
+ fsType = "ext4";
+ };
+ "/data" = {
+ device = datadisk + "-part1";
+ fsType = "ext4";
+ };
+ };
+ swapDevices = [ { device = "/var/swap"; } ];
+}
diff --git a/makefu/1systems/wbob/source.nix b/makefu/1systems/wbob/source.nix
index 6568b8a45..36c7b67bb 100644
--- a/makefu/1systems/wbob/source.nix
+++ b/makefu/1systems/wbob/source.nix
@@ -2,4 +2,5 @@
name="wbob";
# musnix = true;
home-manager = true;
+ unstable = true;
}
diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix
index 6c0388e59..80655f998 100644
--- a/makefu/1systems/x/config.nix
+++ b/makefu/1systems/x/config.nix
@@ -158,7 +158,8 @@
# temporary
# { services.redis.enable = true; }
- # <stockholm/makefu/2configs/pyload.nix>
+ { services.mongodb.enable = true; }
+ # <stockholm/makefu/2configs/home/photoprism.nix>
# <stockholm/makefu/2configs/dcpp/airdcpp.nix>
# <stockholm/makefu/2configs/nginx/rompr.nix>
# <stockholm/makefu/2configs/lanparty/lancache.nix>
diff --git a/makefu/1systems/x/x13/default.nix b/makefu/1systems/x/x13/default.nix
index b0400232e..ac601845a 100644
--- a/makefu/1systems/x/x13/default.nix
+++ b/makefu/1systems/x/x13/default.nix
@@ -8,6 +8,7 @@
<nixos-hardware/lenovo/thinkpad/l14/amd> # close enough
# <stockholm/makefu/2configs/hw/tpm.nix>
<stockholm/makefu/2configs/hw/ssd.nix>
+ <stockholm/makefu/2configs/hw/xmm7360.nix>
];
boot.zfs.requestEncryptionCredentials = true;
networking.hostId = "f8b8e0a2";
@@ -19,32 +20,15 @@
services.xserver.videoDrivers = [
"amdgpu"
];
- hardware.opengl.extraPackages = [ pkgs.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;
+
environment.variables.VK_ICD_FILENAMES =
"/run/opengl-driver/share/vulkan/icd.d/amd_icd64.json";
programs.light.enable = true;
- services.actkbd = {
- enable = true;
- bindings = [
- { keys = [ 225 ]; events = [ "key" ]; command = "${pkgs.light}/bin/light -A 10"; }
- { keys = [ 224 ]; events = [ "key" ]; command = "${pkgs.light}/bin/light -U 10"; }
- { keys = [ 227 ]; events = [ "key" ]; command = builtins.toString (
- pkgs.writers.writeDash "toggle_lcdshadow" ''
- proc=/proc/acpi/ibm/lcdshadow
- status=$(${pkgs.gawk}/bin/awk '/status:/{print $2}' "$proc")
- if [ "$status" -eq 0 ];then
- echo 1 > "$proc"
- else
- echo 0 > "$proc"
- fi
- '');
- }
- ];
- };
users.groups.video = {};
users.users.makefu.extraGroups = [ "video" ];
diff --git a/makefu/1systems/x/x13/input.nix b/makefu/1systems/x/x13/input.nix
index 68b855d8e..775e19303 100644
--- a/makefu/1systems/x/x13/input.nix
+++ b/makefu/1systems/x/x13/input.nix
@@ -1,3 +1,4 @@
+{ pkgs, lib, ... }:
{
# current issues:
# 1. for pressing insert hold shift+fn+Fin
@@ -9,5 +10,37 @@
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'
'';
+ boot.kernelParams = [
+ #"psmouse.proto=imps"
+ #"psmouse.proto=bare"
+ #"psmouse.resetafter=0"
+ "psmouse.synaptics_intertouch=1" # echo 1 > /sys/devices/platform/i8042/serio1/reg_07
+ ];
+
+ programs.light.enable = true;
+ services.actkbd = {
+ enable = true;
+ bindings = [
+ { keys = [ 225 ]; events = [ "key" ]; command = "${pkgs.light}/bin/light -A 10"; } # fn - F5
+ { 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
+
+ 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
+ '');
+ }
+ ];
+ };
}