summaryrefslogtreecommitdiffstats
path: root/makefu/1systems/x
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2023-06-03 15:27:17 +0200
committermakefu <github@syntax-fehler.de>2023-06-03 15:27:17 +0200
commitdd0a6294c8699640f47127f237104aac9d96c896 (patch)
tree42e3c60bf84d89efb366d3b6105afbcf6b8d55e8 /makefu/1systems/x
parentbf8facca3679cc15b2ebb73e1c7016c205868f86 (diff)
ma x.r: migrate to gnome
Diffstat (limited to 'makefu/1systems/x')
-rw-r--r--makefu/1systems/x/config.nix58
-rw-r--r--makefu/1systems/x/x13/battery.nix6
-rw-r--r--makefu/1systems/x/x13/default.nix18
-rw-r--r--makefu/1systems/x/x13/disk.nix67
-rw-r--r--makefu/1systems/x/x13/input.nix44
5 files changed, 142 insertions, 51 deletions
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 <secrets/ssh_host_rsa_key>); type = "rsa";}
];
}
+ #{
+ # imports = [
+ # <stockholm/makefu/2configs/bureautomation/rhasspy.nix>
+ # ];
+ # 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 @@
# <stockholm/makefu/2configs/deployment/hound>
# <stockholm/makefu/2configs/deployment/photostore.krebsco.de.nix>
# <stockholm/makefu/2configs/deployment/bureautomation/hass.nix>
- <stockholm/makefu/2configs/bureautomation/office-radio>
+ # <stockholm/makefu/2configs/bureautomation/office-radio>
# Krebs
<stockholm/makefu/2configs/tinc/retiolum.nix>
@@ -146,7 +156,7 @@
<stockholm/makefu/2configs/mail-client.nix>
<stockholm/makefu/2configs/printer.nix>
# <stockholm/makefu/2configs/syncthing.nix>
- <stockholm/makefu/2configs/sync>
+ # <stockholm/makefu/2configs/sync>
# Virtualization
# <stockholm/makefu/2configs/virtualisation/libvirt.nix>
@@ -179,6 +189,7 @@
# temporary
# { services.redis.enable = true; }
+ # citadel exporter
# { services.mongodb.enable = true; }
# { services.elasticsearch.enable = true; }
# <stockholm/makefu/2configs/deployment/nixos.wiki>
@@ -189,27 +200,28 @@
# <stockholm/makefu/2configs/lanparty/lancache-dns.nix>
# <stockholm/makefu/2configs/lanparty/samba.nix>
# <stockholm/makefu/2configs/lanparty/mumble-server.nix>
-
- {
- networking.wireguard.interfaces.wg0 = {
- ips = [ "10.244.0.2/24" ];
- privateKeyFile = (toString <secrets>) + "/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=";
- #}
- ];
- };
- }
+ <stockholm/makefu/2configs/wireguard/wiregrill.nix>
+
+# {
+# networking.wireguard.interfaces.wg0 = {
+# ips = [ "10.244.0.2/24" ];
+# privateKeyFile = (toString <secrets>) + "/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
<stockholm/makefu/2configs/hw/bluetooth.nix>
<nixos-hardware/lenovo/thinkpad/l14/amd> # close enough
# <stockholm/makefu/2configs/hw/tpm.nix>
@@ -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
+ # '');
+ #}
];
};
}