Files
nixos-blueprint/modules/nixos/desktop/cosmic.nix
2025-03-03 18:50:51 +02:00

38 lines
833 B
Nix

{
config,
inputs,
pkgs,
lib,
...
}: let
cfg = config.desktop.cosmic;
in {
imports = with inputs; [
./common/pipewire.nix
nixos-cosmic.nixosModules.default
];
options = {
desktop.cosmic.enable =
lib.mkEnableOption "enable cosmic desktop";
};
config = lib.mkIf cfg.enable {
nix.settings = {
substituters = ["https://cosmic.cachix.org/"];
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
};
services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-cosmic
xdg-desktop-portal-gtk
];
config.common.default = [
"cosmic"
"gtk"
];
};
};
}