This commit is contained in:
parent
821767765f
commit
73929e0cf9
3 changed files with 44 additions and 8 deletions
32
modules/nixos/desktop/cosmic/default.nix
Normal file
32
modules/nixos/desktop/cosmic/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
namespace,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf mkEnableOption mkForce;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.desktop.cosmic;
|
||||||
|
in {
|
||||||
|
options.${namespace}.desktop.cosmic = {
|
||||||
|
enable =
|
||||||
|
mkEnableOption "Enable Cosmic desktop"
|
||||||
|
// {
|
||||||
|
default = config.${namespace}.desktop.use == "cosmic";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services = {
|
||||||
|
displayManager = {
|
||||||
|
cosmic-greeter.enable = true;
|
||||||
|
autoLogin = {
|
||||||
|
enable = true;
|
||||||
|
user = "chris";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
desktopManager.cosmic.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,18 +1,22 @@
|
||||||
{ lib, config, namespace, inputs, ... }:
|
{
|
||||||
let
|
lib,
|
||||||
|
config,
|
||||||
|
namespace,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
inherit (lib) mkIf mkOption mkEnableOption mkMerge;
|
inherit (lib) mkIf mkOption mkEnableOption mkMerge;
|
||||||
inherit (lib.types) nullOr enum;
|
inherit (lib.types) nullOr enum;
|
||||||
|
|
||||||
cfg = config.${namespace}.desktop;
|
cfg = config.${namespace}.desktop;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.grub2-themes.nixosModules.default
|
inputs.grub2-themes.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
options.${namespace}.desktop = {
|
options.${namespace}.desktop = {
|
||||||
use = mkOption {
|
use = mkOption {
|
||||||
type = nullOr (enum [ "plasma" "gamescope" "gnome" ]);
|
type = nullOr (enum ["plasma" "gamescope" "gnome" "cosmic"]);
|
||||||
default = null;
|
default = null;
|
||||||
example = "plasma";
|
example = "plasma";
|
||||||
description = "Which desktop to enable";
|
description = "Which desktop to enable";
|
||||||
|
|
@ -20,11 +24,11 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
({
|
{
|
||||||
services.displayManager = {
|
services.displayManager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
|
|
||||||
# (mkIf (cfg.use != null) {
|
# (mkIf (cfg.use != null) {
|
||||||
# ${namespace}.desktop.${cfg.use}.enable = true;
|
# ${namespace}.desktop.${cfg.use}.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
animated = true;
|
animated = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
desktop.use = "plasma";
|
desktop.use = "cosmic";
|
||||||
|
|
||||||
application = {
|
application = {
|
||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue