diff --git a/hosts/tahani/default.nix b/hosts/tahani/default.nix index 92f0ac8..531dbc7 100644 --- a/hosts/tahani/default.nix +++ b/hosts/tahani/default.nix @@ -14,7 +14,9 @@ ../../profiles/core.nix ../../profiles/nixos.nix ../../profiles/openssh.nix + ../../profiles/remote-desktop.nix ../../profiles/tailscale.nix + ../../profiles/wayland-headless.nix inputs.sops-nix.nixosModules.sops ]; @@ -30,12 +32,14 @@ ../../profiles/fish.nix ../../profiles/fzf.nix ../../profiles/git.nix + ../../profiles/ghostty.nix ../../profiles/home.nix ../../profiles/jjui.nix ../../profiles/jujutsu.nix ../../profiles/lazygit.nix ../../profiles/lumen.nix ../../profiles/mise.nix + ../../profiles/niri.nix ../../profiles/nono.nix ../../profiles/neovim ../../profiles/opencode.nix diff --git a/profiles/aerospace.nix b/profiles/aerospace.nix index 82b5348..b0b2d4a 100644 --- a/profiles/aerospace.nix +++ b/profiles/aerospace.nix @@ -36,44 +36,44 @@ }; }; - on-window-detected = [ - { - "if" = { - "app-id" = "com.apple.systempreferences"; - }; - run = "layout floating"; - } - { - "if" = { - "app-id" = "com.mitchellh.ghostty"; - }; - run = ["layout tiling" "move-node-to-workspace 3"]; - } - { - "if" = { - "app-id" = "net.imput.helium"; - }; - run = "move-node-to-workspace 2"; - } - { - "if" = { - "app-id" = "com.tinyspeck.slackmacgap"; - }; - run = "move-node-to-workspace 5"; - } - { - "if" = { - "app-id" = "net.whatsapp.WhatsApp"; - }; - run = "move-node-to-workspace 5"; - } - { - "if" = { - "app-id" = "com.tidal.desktop"; - }; - run = "move-node-to-workspace 6"; - } - ]; + on-window-detected = [ + { + "if" = { + "app-id" = "com.apple.systempreferences"; + }; + run = "layout floating"; + } + { + "if" = { + "app-id" = "com.mitchellh.ghostty"; + }; + run = ["layout tiling" "move-node-to-workspace 3"]; + } + { + "if" = { + "app-id" = "net.imput.helium"; + }; + run = "move-node-to-workspace 2"; + } + { + "if" = { + "app-id" = "com.tinyspeck.slackmacgap"; + }; + run = "move-node-to-workspace 5"; + } + { + "if" = { + "app-id" = "net.whatsapp.WhatsApp"; + }; + run = "move-node-to-workspace 5"; + } + { + "if" = { + "app-id" = "com.tidal.desktop"; + }; + run = "move-node-to-workspace 6"; + } + ]; mode = { main.binding = { diff --git a/profiles/homebrew.nix b/profiles/homebrew.nix index 05f9f01..f306bdb 100644 --- a/profiles/homebrew.nix +++ b/profiles/homebrew.nix @@ -4,6 +4,7 @@ casks = [ "ghostty@tip" "helium-browser" + "moonlight" "tidal" ]; }; diff --git a/profiles/niri.nix b/profiles/niri.nix new file mode 100644 index 0000000..08e7afc --- /dev/null +++ b/profiles/niri.nix @@ -0,0 +1,18 @@ +{...}: { + xdg.configFile."niri/config.kdl".text = '' + input { + keyboard { + xkb { + layout "us" + } + } + } + + binds { + Mod+Return { spawn "ghostty"; } + Mod+B { spawn "firefox"; } + Mod+Shift+Q { close-window; } + Mod+Shift+E { quit; } + } + ''; +} diff --git a/profiles/packages.nix b/profiles/packages.nix index 6264ea7..54a9437 100644 --- a/profiles/packages.nix +++ b/profiles/packages.nix @@ -61,6 +61,8 @@ with pkgs; ] ++ lib.optionals stdenv.isLinux [ gcc15 + ghostty ghostty.terminfo + google-chrome lm_sensors ] diff --git a/profiles/remote-desktop.nix b/profiles/remote-desktop.nix new file mode 100644 index 0000000..6e93d46 --- /dev/null +++ b/profiles/remote-desktop.nix @@ -0,0 +1,21 @@ +{...}: { + services.sunshine = { + enable = true; + openFirewall = false; + capSysAdmin = true; + }; + + networking.firewall.interfaces.tailscale0 = { + allowedTCPPorts = [ + 47984 + 47989 + 47990 + ]; + allowedUDPPorts = [ + 47998 + 47999 + 48000 + 48002 + ]; + }; +} diff --git a/profiles/wayland-headless.nix b/profiles/wayland-headless.nix new file mode 100644 index 0000000..a825e6f --- /dev/null +++ b/profiles/wayland-headless.nix @@ -0,0 +1,39 @@ +{ + pkgs, + user, + ... +}: { + services.seatd.enable = true; + + services.pipewire = { + enable = true; + wireplumber.enable = true; + }; + + xdg.portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-gtk + ]; + }; + + programs.niri.enable = true; + + users.users.${user}.linger = true; + + systemd.user.services.niri-headless = { + description = "Niri headless session"; + environment = { + WLR_BACKENDS = "headless"; + WLR_HEADLESS_OUTPUTS = "1"; + WAYLAND_DISPLAY = "wayland-1"; + }; + serviceConfig = { + ExecStart = "${pkgs.niri}/bin/niri --session"; + Restart = "always"; + RestartSec = 2; + }; + wantedBy = ["default.target"]; + }; +}