Skip to content

NixOS ​

lys-shell comes from the lys flake as nixosModules.lys-shell, homeModules.lys-shell and packages.${system}.lys-shell; NixOS adds the flake as an input.

NixOS module ​

nix
{ inputs, ... }:
{
  imports = [ inputs.lys.nixosModules.lys-shell ];
  programs.lys-shell.enable = true;
}
OptionDefaultEffect
programs.lys-shell.enablefalseInstall lys-shell.
programs.lys-shell.packagethe flake's packagePackage to install.
programs.lys-shell.settingsApp.enabletrueAlso install lys-settings. Without it, panel settings, the dashboard and the launcher have no settings app to open.
programs.lys-shell.settingsApp.packagethe flake's lys-settingsPackage to install.
programs.lys-shell.systemd.enablefalseRun lys-shell shell as a systemd user service.
programs.lys-shell.systemd.target"graphical-session.target"Target the service binds to.
programs.lys-shell.portal.enabletrueMake lys-shell the xdg-desktop-portal backend for every interface (through xdg.portal, with mkDefault routing).
programs.lys-shell.autoInstallDependenciesfalseEnable BlueZ. NetworkManager, lys-power and PipeWire are left to you.

home-manager module ​

nix
{ inputs, ... }:
{
  imports = [ inputs.lys.homeModules.lys-shell ];
  programs.lys-shell = {
    enable = true;
    autoInstallDependencies = true;
    settings = {
      bar.layout = [
        {
          monitor = "*";
          left = [ "dashboard" ];
          center = [ "clock" ];
          right = [ "battery" "audio" "systray" ];
        }
      ];
      modules.weather = {
        location = "Denver";
        units = "imperial";
      };
      styling.theme-provider = "wallust";
    };
  };
}
OptionDefaultEffect
enable, package, settingsApp.*, systemd.targetas aboveAs in the NixOS module.
systemd.enabletrueRun lys-shell shell as a systemd user service. Turn off if your compositor starts the shell.
settings{}Written to $XDG_CONFIG_HOME/lys-shell/config.yaml. Empty leaves the file unmanaged.
autoInstallDependenciesfalseInstall the user-space tools the config needs: the styling.theme-provider tool (matugen, wallust or pywal) and notmuch when mail is in the layout.
portal.enablefalseInstall the portal backend at user level (portal and D-Bus files, a user service, a portals.conf routing every interface to lys-shell). Use this outside NixOS; on NixOS use the system option.

System services (NetworkManager, BlueZ, lys-power, PipeWire) are not installed by home-manager.

Lock screen ​

lys-login has its own NixOS module, nixosModules.lys-login. programs.lys-login.enable puts it on the PATH. programs.lys-login.lock.enable declares a PAM service for the unlock; point login.lock.pam-service at it.

Converting settings to Nix ​

lys-settings and lys-shell config set write to ~/.config/lys-shell/runtime.yaml. To turn config.yaml and runtime.yaml into a Nix expression for settings, using yq (nixpkgs#yq-go):

sh
cd ~/.config/lys-shell
nix-instantiate --eval --strict \
  --argstr json "$(yq eval-all -o json '. as $f ireduce ({}; . * $f)' config.yaml runtime.yaml)" \
  --expr '{ json }: builtins.fromJSON json' | nixfmt

With only one of the files, use yq -o json config.yaml in its place.

Released under the MIT License.