From dab85522ba0578439d919bd9c8920afef1784324 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Tue, 19 Dec 2023 22:42:38 +0100 Subject: [PATCH] ssh3: init packages --- flake.lock | 24 ++++++++-------- flake.nix | 2 ++ hosts/falkenstein/modules/nginx/default.nix | 5 +++- overlays/default.nix | 1 + pkgs/ssh3/client.nix | 30 +++++++++++++++++++ pkgs/ssh3/server.nix | 32 +++++++++++++++++++++ users/rouven/modules/packages.nix | 5 ++-- users/rouven/modules/ssh/default.nix | 9 ++++++ users/rouven/modules/wayland/breaktimer.nix | 23 ++++----------- users/rouven/modules/wayland/river.nix | 3 +- 10 files changed, 101 insertions(+), 33 deletions(-) create mode 100644 pkgs/ssh3/client.nix create mode 100644 pkgs/ssh3/server.nix diff --git a/flake.lock b/flake.lock index dbcfd17..b10315d 100644 --- a/flake.lock +++ b/flake.lock @@ -179,11 +179,11 @@ ] }, "locked": { - "lastModified": 1702735279, - "narHash": "sha256-SztEzDOE/6bDNnWWvnRbSHPVrgewLwdSei1sxoZFejM=", + "lastModified": 1702937117, + "narHash": "sha256-4GjkL2D01bDg00UZN/SeGrnBZrDVOFeZTbQx6U702Vc=", "owner": "nix-community", "repo": "home-manager", - "rev": "e9b9ecef4295a835ab073814f100498716b05a96", + "rev": "e8aaced73ebaf6bfa8e3c6ab0a19cb184bc4d798", "type": "github" }, "original": { @@ -214,11 +214,11 @@ }, "impermanence": { "locked": { - "lastModified": 1697303681, - "narHash": "sha256-caJ0rXeagaih+xTgRduYtYKL1rZ9ylh06CIrt1w5B4g=", + "lastModified": 1702984171, + "narHash": "sha256-reIUBrUXibohXmvXRsgpvtlCE0QQSvWSA+qQCKohgR0=", "owner": "nix-community", "repo": "impermanence", - "rev": "0f317c2e9e56550ce12323eb39302d251618f5b5", + "rev": "123e94200f63952639492796b8878e588a4a2851", "type": "github" }, "original": { @@ -280,11 +280,11 @@ ] }, "locked": { - "lastModified": 1702291765, - "narHash": "sha256-kfxavgLKPIZdYVPUPcoDZyr5lleymrqbr5G9PVfQ2NY=", + "lastModified": 1702864432, + "narHash": "sha256-xR5Igg2hnm979W3YgMDrSjErHFhHo4rbMboF6DC0mbc=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "45d82e0a8b9dd6c5dd9da835ac0c072239af7785", + "rev": "4605ccd764fac78b9e4b5b058698cb9f04430b91", "type": "github" }, "original": { @@ -295,11 +295,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1702312524, - "narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=", + "lastModified": 1702830618, + "narHash": "sha256-lvhwIvRwhOLgzbRuYkqHy4M5cQHYs4ktL6/hyuBS6II=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a9bf124c46ef298113270b1f84a164865987a91c", + "rev": "91a00709aebb3602f172a0bf47ba1ef013e34835", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 3d2dfc8..9a87706 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,8 @@ gnome-break-timer = nixpkgs.legacyPackages.x86_64-linux.callPackage ./pkgs/gnome-break-timer { }; hashcash-milter = nixpkgs.legacyPackages.x86_64-linux.callPackage ./pkgs/hashcash-milter { }; ianny = nixpkgs.legacyPackages.x86_64-linux.callPackage ./pkgs/ianny { }; + ssh3 = nixpkgs.legacyPackages.x86_64-linux.callPackage ./pkgs/ssh3/client.nix { }; + ssh3-server = nixpkgs.legacyPackages.x86_64-linux.callPackage ./pkgs/ssh3/server.nix { }; }; hydraJobs = self.packages; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; diff --git a/hosts/falkenstein/modules/nginx/default.nix b/hosts/falkenstein/modules/nginx/default.nix index da74cdb..96095a1 100644 --- a/hosts/falkenstein/modules/nginx/default.nix +++ b/hosts/falkenstein/modules/nginx/default.nix @@ -62,14 +62,17 @@ phpEnv."PATH" = lib.makeBinPath [ pkgs.php ]; }; networking.firewall.allowedTCPPorts = [ 80 443 ]; + networking.firewall.allowedUDPPorts = [ 443 ]; services.nginx = { enable = true; + package = pkgs.nginxQuic; recommendedTlsSettings = true; recommendedProxySettings = true; recommendedGzipSettings = true; recommendedOptimisation = true; - virtualHosts."${config.networking.domain}" = { + quic = true; + http3 = true; enableACME = true; forceSSL = true; root = "/srv/web/${config.networking.domain}"; diff --git a/overlays/default.nix b/overlays/default.nix index 7b51cea..84d89af 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -16,6 +16,7 @@ in }); pww = callPackage ../pkgs/pww { }; + ianny = callPackage ../pkgs/ianny { }; river = prev.river.overrideAttrs (_: { patches = [ diff --git a/pkgs/ssh3/client.nix b/pkgs/ssh3/client.nix new file mode 100644 index 0000000..f8f2973 --- /dev/null +++ b/pkgs/ssh3/client.nix @@ -0,0 +1,30 @@ +{ lib, buildGoModule, makeWrapper, fetchFromGitHub, playerctl }: +buildGoModule rec { + pname = "ssh3"; + version = "0.1.4"; + + src = fetchFromGitHub { + owner = "francoismichel"; + repo = "ssh3"; + rev = "v${version}"; + hash = "sha256-0bd2hdvgapTGEGM7gdpVwxelN5BRbmdcgANbRHZ/nRw="; + }; + + subPackages = [ "cli/client" ]; + + + + vendorHash = "sha256-ZtKxAKNyMnZ8v96GUUm4EukdIJD+ITDW9kHOez7nYmg="; + postInstall = '' + mv $out/bin/client $out/bin/ssh3 + ''; + + meta = with lib; { + description = "Faster and rich secure shell using HTTP/3"; + homepage = "https://github.com/francoismichel/ssh3"; + license = licenses.asl20; + maintainers = with maintainers; [ therealr5 ]; + mainProgram = "ssh3"; + platforms = platforms.all; + }; +} diff --git a/pkgs/ssh3/server.nix b/pkgs/ssh3/server.nix new file mode 100644 index 0000000..efa0c71 --- /dev/null +++ b/pkgs/ssh3/server.nix @@ -0,0 +1,32 @@ +{ lib, buildGoModule, libxcrypt, makeWrapper, fetchFromGitHub, playerctl }: +buildGoModule rec { + pname = "ssh3-server"; + version = "0.1.4"; + + src = fetchFromGitHub { + owner = "francoismichel"; + repo = "ssh3"; + rev = "v${version}"; + hash = "sha256-0bd2hdvgapTGEGM7gdpVwxelN5BRbmdcgANbRHZ/nRw="; + }; + + subPackages = [ "cli/server" ]; + + buildInputs = [ libxcrypt ]; + + + + vendorHash = "sha256-ZtKxAKNyMnZ8v96GUUm4EukdIJD+ITDW9kHOez7nYmg="; + postInstall = '' + mv $out/bin/server $out/bin/ssh3-server + ''; + + meta = with lib; { + description = "Faster and rich secure shell using HTTP/3"; + homepage = "https://github.com/francoismichel/ssh3"; + license = licenses.asl20; + maintainers = with maintainers; [ therealr5 ]; + mainProgram = "ssh3"; + platforms = platforms.all; + }; +} diff --git a/users/rouven/modules/packages.nix b/users/rouven/modules/packages.nix index 40655ea..986fc79 100644 --- a/users/rouven/modules/packages.nix +++ b/users/rouven/modules/packages.nix @@ -39,9 +39,9 @@ # messaging discord tdesktop - element-desktop - mattermost-desktop gajim + gomuks + fractal # games prismlauncher @@ -70,6 +70,7 @@ gcc nodejs_20 gnumake + go # libs libyubikey diff --git a/users/rouven/modules/ssh/default.nix b/users/rouven/modules/ssh/default.nix index f7a980f..fc1758c 100644 --- a/users/rouven/modules/ssh/default.nix +++ b/users/rouven/modules/ssh/default.nix @@ -49,6 +49,15 @@ in "quitte" = { hostname = "quitte.ifsr.de"; user = "root"; + extraOptions = { + RequestTTY = "yes"; + RemoteCommand = "zsh -i"; + }; + + }; + "quitte-notty" = { + hostname = "quitte.ifsr.de"; + user = "root"; }; "durian" = { hostname = "durian.ifsr.de"; diff --git a/users/rouven/modules/wayland/breaktimer.nix b/users/rouven/modules/wayland/breaktimer.nix index cf12bd1..3e31527 100644 --- a/users/rouven/modules/wayland/breaktimer.nix +++ b/users/rouven/modules/wayland/breaktimer.nix @@ -1,27 +1,16 @@ { pkgs, lib, ... }: { systemd.user = { - services.breaktimer = { + services.ianny = { Unit = { - Description = "Simple notification to take a break"; + Description = "Ianny break timer"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; }; Service = { - Type = "oneshot"; - ExecStart = ''${lib.getExe pkgs.libnotify} -i clock -e "It's time for a break" "Relax your eyes"''; + ExecStart = "${pkgs.ianny}/bin/ianny"; }; - }; - timers.breaktimer = { - Unit = { - Description = "Timer for the break notification"; - }; - Timer = { - OnCalendar = "*:0/20"; - Unit = "breaktimer.service"; - }; - Install = { - WantedBy = [ "timers.target" ]; - }; - + Install = { WantedBy = [ "graphical-session.target" ]; }; }; }; } diff --git a/users/rouven/modules/wayland/river.nix b/users/rouven/modules/wayland/river.nix index 88f560d..632fd56 100644 --- a/users/rouven/modules/wayland/river.nix +++ b/users/rouven/modules/wayland/river.nix @@ -51,7 +51,8 @@ riverctl map-pointer normal Super BTN_RIGHT resize-view - riverctl map normal Alt Space spawn "${pkgs.fuzzel}/bin/fuzzel -w 50" + riverctl map normal Alt Space spawn "${pkgs.fuzzel}/bin/fuzzel" + riverctl map normal Alt A spawn "${pkgs.wofi-emoji}/bin/wofi-emoji"; riverctl map normal Super Space toggle-float for i in $(seq 1 9)