NixDaemon

NixOS pentest workstation as one flake — IceBreaker's successor
git clone https://git.daemon-sec.xyz/NixDaemon.git
Log | Files | Refs | README

options.nix (1543B)


      1 # modules/features/desktop/options.nix — the desktop switches.
      2 #
      3 # Both desktops are installed by default and chosen at login (tuigreet lists
      4 # every session and remembers the last one). Set one to false in
      5 # modules/hosts/laptop/configuration.nix to drop it from the system entirely.
      6 #
      7 #   daemon.desktop.hyprland.enable   Hyprland (uwsm) + Caelestia Shell
      8 #   daemon.desktop.niri.enable       Niri + Noctalia Shell
      9 #
     10 # Home-manager modules read the same switches through `osConfig`.
     11 { self, ... }:
     12 {
     13   flake.nixosModules.desktop-options =
     14   { lib, config, pkgs, ... }:
     15   {
     16     options.daemon.desktop = {
     17       hyprland.enable = lib.mkEnableOption "Hyprland with Caelestia Shell" // { default = true; };
     18       niri.enable = lib.mkEnableOption "Niri with Noctalia Shell" // { default = true; };
     19       # Which wrapped niri (modules/features/desktop/niri.nix) is the session:
     20       # the author's by default; the generic host passes one built for its
     21       # keyboard with the neutral Noctalia.
     22       niri.package = lib.mkOption {
     23         type = lib.types.package;
     24         default = self.packages.${pkgs.stdenv.hostPlatform.system}.niri-daemon;
     25         defaultText = lib.literalExpression "self.packages.\${system}.niri-daemon";
     26         description = "The wrapped niri package used as the login session.";
     27       };
     28     };
     29 
     30     config.assertions = [
     31       {
     32         assertion = config.daemon.desktop.hyprland.enable || config.daemon.desktop.niri.enable;
     33         message = "daemon.desktop: enable at least one desktop";
     34       }
     35     ];
     36   }
     37   ;
     38 }