39 lines
870 B
Nix
39 lines
870 B
Nix
{
|
|
config,
|
|
inputs,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib) mkIf mkEnableOption;
|
|
cfg = config.desktop.cosmic;
|
|
in {
|
|
imports = with inputs; [
|
|
nixos-cosmic.nixosModules.default
|
|
];
|
|
options = {
|
|
desktop.cosmic.enable =
|
|
mkEnableOption "enable cosmic desktop";
|
|
};
|
|
config = mkIf cfg.enable {
|
|
sound.pipewire.enable = true;
|
|
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"
|
|
];
|
|
};
|
|
};
|
|
}
|