# Cosmic is a software platform for designing beautiful user experiences { config, inputs, lib, pkgs, ... }: with lib; let cfg = config.profiles.cosmicDesktop; cosmicDesktop = inputs.cosmicDesktop; in { options.profiles.cosmicDesktop = { enable = mkEnableOption "to enable the Cosmic desktop."; }; config = mkIf (cfg.enable) { nix.settings = { substituters = ["https://cosmic.cachix.org/"]; trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="]; }; services = { desktopManager.cosmic.enable = true; displayManager.cosmic-greeter.enable = true; }; }; }