diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index d4220ca..62a734d 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -91,7 +91,6 @@ in boot.initrd.luks.devices = { crypted = { device = "/dev/disk/by-path/pci-0000:02:00.0-nvme-1"; - header = "/dev/disk/by-partuuid/3c43dda3-6a23-7148-add5-84354a28a59e"; preLVM = true; crypttabExtraOpts = [ "fido2-device=auto" "token-timeout=10s" ]; # fido2.credential = ""; @@ -423,7 +422,8 @@ in # Open ports in the firewall. networking.firewall.trustedInterfaces = [ "p2p-wl+" "tailscale0" ]; - networking.firewall.allowedTCPPorts = [ 5900 5905 7236 7250 ]; + # 24800 for input-leap + networking.firewall.allowedTCPPorts = [ 5900 5905 7236 7250 24800 ]; networking.firewall.allowedUDPPorts = [ 5900 5905 7236 5353 26000 ]; # Or disable the firewall altogether. diff --git a/hosts/laptop/hardware-configuration.nix b/hosts/laptop/hardware-configuration.nix index 6f95ff8..387c040 100644 --- a/hosts/laptop/hardware-configuration.nix +++ b/hosts/laptop/hardware-configuration.nix @@ -37,15 +37,8 @@ in }; fileSystems."/boot" = - { device = "/dev/disk/by-label/boot"; + { device = "/dev/disk/by-uuid/12CE-A600"; fsType = "vfat"; - options = [ - "noauto" - # "x-systemd.automount" - # "x-systemd.idle-timeout=1min" - # "x-systemd.device-timeout=1s" - # "x-systemd.mount-timeout=5s" - ]; }; swapDevices = diff --git a/hosts/laptop/home/default.nix b/hosts/laptop/home/default.nix index d52411d..14df2e9 100644 --- a/hosts/laptop/home/default.nix +++ b/hosts/laptop/home/default.nix @@ -50,6 +50,8 @@ accent = "yellow"; }) + input-leap + remmina # web protonvpn-gui @@ -94,19 +96,19 @@ # dev # Wrap idea-community to add libraries required for Minecraft Moddev jetbrains.idea-community - (mylib.appwrapper { + (mylib.IDEAappwrapper { inherit pkgs; inputpkg = jetbrains.idea-community; pkgsuffix = "mcdev-jbr17"; libraries = with pkgs; [libpulseaudio libGL glfw openal stdenv.cc.cc.lib]; - extrapathpkgs = with pkgs; [jetbrains.jdk-no-jcef-17]; + jdk = pkgs.jetbrains.jdk-no-jcef-17; }) - (mylib.appwrapper { + (mylib.IDEAappwrapper { inherit pkgs; inputpkg = jetbrains.idea-community; pkgsuffix = "mcdev-jbr21"; libraries = with pkgs; [libpulseaudio libGL glfw openal stdenv.cc.cc.lib]; - extrapathpkgs = with pkgs; [jetbrains.jdk-no-jcef]; + jdk = pkgs.jetbrains.jdk-no-jcef; }) packwiz # vscodium # see programs.vscode @@ -179,13 +181,21 @@ monero-gui ]; - # gnome network manager applet since plasma-nm is not using Secret Service - # https://invent.kde.org/plasma/plasma-nm/-/issues/7 - services.network-manager-applet.enable = true; - # Requires tray.target by default so let's remove it - systemd.user.services.network-manager-applet.Unit = { - Requires = pkgs.lib.mkOverride 0 [ ]; - After = pkgs.lib.mkOverride 0 [ "graphical-session-pre.target" ]; + + systemd.user.services.app-input-leap-client = { + Unit = { + Description = "input-leap client"; + After = [ "graphical-session-pre.target" "network.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.input-leap}/bin/input-leapc -f --debug DEBUG --name lgm-nixos --disable-crypto [wandering-nomad.lan]:24800"; + Restart = "always"; + }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; }; # Email stuff diff --git a/hosts/vps1/services/factorio-versions.json b/hosts/vps1/services/factorio-versions.json index fab4f75..9da3566 100644 --- a/hosts/vps1/services/factorio-versions.json +++ b/hosts/vps1/services/factorio-versions.json @@ -5,7 +5,7 @@ "candidateHashFilenames": [ "factorio-headless_linux_2.0.30.tar.xz" ], - "name": "factorio_headless_x64-2.0.21.tar.xz", + "name": "factorio_headless_x64-2.0.30.tar.xz", "needsAuth": false, "sha256": "4137824a20e1f3298410432c85e62d0eb46b0dab1a8411c233699f890d4c1668", "tarDirectory": "x64", diff --git a/lib/default.nix b/lib/default.nix index bacfbf0..356d1d8 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -26,4 +26,33 @@ ''; dontBuild = true; }; + + IDEAappwrapper = + { + pkgs, + inputpkg, + pkgsuffix, + libraries, + jdk + }: with pkgs; let + name = "${inputpkg.pname}-${pkgsuffix}"; + in stdenv.mkDerivation { + inherit name; + inherit (inputpkg) version; + nativeBuildInputs = [ makeWrapper gnused ]; + buildCommand = '' + mkdir -p $out/bin + mkdir -p $out/share/applications + cp ${inputpkg}/share/applications/${inputpkg.pname}.desktop $out/share/applications/${name}.desktop + makeWrapper ${inputpkg}/bin/${inputpkg.pname} $out/bin/${name} \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libraries}" \ + --prefix PATH : "${lib.makeBinPath [jdk]}" \ + --set JAVA_HOME "${jdk}/lib/openjdk" + substituteInPlace $out/share/applications/${name}.desktop \ + --replace-fail "=${inputpkg.pname}" "=${name}" + sed -i -E "s/^Name=(.*)/Name=\1 (${pkgsuffix})/g" "$out/share/applications/${name}.desktop" + echo $out/bin/${name} + ''; + dontBuild = true; + }; } \ No newline at end of file