From 644fac4bafd713cb8ccadac41fdf8e1330454add Mon Sep 17 00:00:00 2001 From: Andre Date: Mon, 6 May 2024 00:05:14 -0400 Subject: [PATCH] Add Tmux (in a smarter way) --- modules/apps/social.nix | 10 ++-------- modules/apps/tmux.nix | 19 +++++++++++++++++++ modules/roles/server.nix | 2 +- 3 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 modules/apps/tmux.nix diff --git a/modules/apps/social.nix b/modules/apps/social.nix index 9ef2e1f..4ceb466 100644 --- a/modules/apps/social.nix +++ b/modules/apps/social.nix @@ -12,14 +12,8 @@ with lib; config = mkIf cfg.enable { nixpkgs.config.allowUnfree = true; environment.systemPackages = with pkgs; [ - # Install Beeper, but override the InstallPhase so it uses Wayland. - # Check Flatpak status here: https://github.com/daegalus/beeper-flatpak-wip/issues/1 - (beeper.overrideAttrs (oldAttrs: { - postInstall = '' - wrapProgram $out/bin/beeper \ - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=wayland --enable-features=WaylandWindowDecorations}} --no-update" - ''; - })) + # Check Beeper Flatpak status here: https://github.com/daegalus/beeper-flatpak-wip/issues/1 + beeper ]; host.ui.flatpak.enable = true; diff --git a/modules/apps/tmux.nix b/modules/apps/tmux.nix new file mode 100644 index 0000000..28e6e54 --- /dev/null +++ b/modules/apps/tmux.nix @@ -0,0 +1,19 @@ +{ pkgs, config, lib, ... }: + +let + cfg = config.host.apps.tmux; +in +with lib; +{ + options = { + host.apps.tmux.enable = mkEnableOption (mdDoc "Enables tmux - terminal multiplexer"); + }; + + config = mkIf cfg.enable { + programs.tmux = { + enable = true; + newSession = true; + clock24 = true; + }; + }; +} \ No newline at end of file diff --git a/modules/roles/server.nix b/modules/roles/server.nix index 3cdfefb..6fecd01 100644 --- a/modules/roles/server.nix +++ b/modules/roles/server.nix @@ -7,10 +7,10 @@ in imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; config = mkIf (role == "server") { + host.apps.tmux.enable = true; environment.systemPackages = with pkgs; [ htop mdadm - tmux ]; }; }