37
modules/nixos/desktop/cosmic/default.nix
Normal file
37
modules/nixos/desktop/cosmic/default.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
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 {
|
||||
module.desktop.displayManager = "cosmic";
|
||||
sound.pipewire.enable = true;
|
||||
|
||||
environment.sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1;
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
systemd = {
|
||||
packages = [pkgs.observatory];
|
||||
services.monitord.wantedBy = ["multi-user.target"];
|
||||
};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-cosmic
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
config.cosmic.default = ["cosmic" "gtk"];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user