about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2022-07-28 01:43:28 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2022-07-28 22:28:41 -0300
commitbef8e4df1dcd3382e71d0ab512e05eaf0fb8559f (patch)
treefe07e6b631475eaaac488fdfb11a625110b976e2 /nixos
parentcd43f8b8bd9217f2effa4f475ade3809f26e76d4 (diff)
fvwm3: nixos module
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/x11/window-managers/default.nix1
-rw-r--r--nixos/modules/services/x11/window-managers/fvwm3.nix35
2 files changed, 36 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix
index 5d4ddf0c2804b..4e56b393e2e56 100644
--- a/nixos/modules/services/x11/window-managers/default.nix
+++ b/nixos/modules/services/x11/window-managers/default.nix
@@ -20,6 +20,7 @@ in
     ./exwm.nix
     ./fluxbox.nix
     ./fvwm2.nix
+    ./fvwm3.nix
     ./herbstluftwm.nix
     ./i3.nix
     ./jwm.nix
diff --git a/nixos/modules/services/x11/window-managers/fvwm3.nix b/nixos/modules/services/x11/window-managers/fvwm3.nix
new file mode 100644
index 0000000000000..43111f917d494
--- /dev/null
+++ b/nixos/modules/services/x11/window-managers/fvwm3.nix
@@ -0,0 +1,35 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+  cfg = config.services.xserver.windowManager.fvwm3;
+  inherit (pkgs) fvwm3;
+in
+
+{
+
+  ###### interface
+
+  options = {
+    services.xserver.windowManager.fvwm3 = {
+      enable = mkEnableOption "Fvwm3 window manager";
+    };
+  };
+
+
+  ###### implementation
+
+  config = mkIf cfg.enable {
+    services.xserver.windowManager.session = singleton
+      { name = "fvwm3";
+        start =
+          ''
+            ${fvwm3}/bin/fvwm3 &
+            waitPID=$!
+          '';
+      };
+
+    environment.systemPackages = [ fvwm3 ];
+  };
+}