flake

Francesco Saccone's Nix flake.
git clone git://git.francescosaccone.com/flake
Log | Files | Refs | README | LICENSE

default.nix (753B)


      1 {
      2   lib,
      3   options,
      4   config,
      5   pkgs,
      6   ...
      7 }:
      8 {
      9   options.modules.wayland = {
     10     enable = lib.mkOption {
     11       description = ''
     12         Whether to enable Ly and Sway, effectively enabling Wayland.
     13       '';
     14       default = false;
     15       type = lib.types.bool;
     16     };
     17   };
     18 
     19   config = lib.mkIf config.modules.wayland.enable {
     20     services.displayManager = {
     21       defaultSession = "Sway";
     22       ly = {
     23         enable = true;
     24         package = pkgs.ly;
     25       };
     26     };
     27 
     28     programs.sway = {
     29       enable = true;
     30       package = pkgs.sway;
     31       extraPackages = lib.mkForce [ ];
     32     };
     33 
     34     services.logind = {
     35       killUserProcesses = true;
     36       lidSwitch = "poweroff";
     37       powerKey = "poweroff";
     38       powerKeyLongPress = "poweroff";
     39     };
     40   };
     41 }