cosmic module
This commit is contained in:
parent
25e19e9256
commit
bb8033d547
8 changed files with 168 additions and 70 deletions
34
modules/de_cosmic.nix
Normal file
34
modules/de_cosmic.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
cosmic,
|
||||
config,
|
||||
lib,
|
||||
settings,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
# name = "de_cosmic";
|
||||
# cfg = config.my_modules.${name};
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
my_modules.de_cosmic = {
|
||||
enable = mkEnableOption (lib.mdDoc "Enable COSMIC desktop environment");
|
||||
};
|
||||
};
|
||||
|
||||
# Import the module from nix flake https://github.com/lilyinstarlight/nixos-cosmic
|
||||
imports = optional settings.uses_cosmic cosmic.nixosModules.default;
|
||||
|
||||
config = mkIf config.my_modules.de_cosmic.enable {
|
||||
# Use cosmic binary cache
|
||||
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;
|
||||
};
|
||||
}
|
21
modules/de_gnome_wayland.nix
Normal file
21
modules/de_gnome_wayland.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
name = "de_gnome_wayland";
|
||||
cfg = config.my_modules.${name};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
my_modules.${name} = {
|
||||
enable = mkEnableOption (lib.mdDoc "Enable GNOME with wayland desktop environment");
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# TODO
|
||||
};
|
||||
}
|
22
modules/de_gnome_xorg.nix
Normal file
22
modules/de_gnome_xorg.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
name = "de_gnome_xorg";
|
||||
cfg = config.my_modules.${name};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
my_modules.${name} = {
|
||||
enable = mkEnableOption "Enable GNOME with wayland desktop environment";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# TODO
|
||||
};
|
||||
}
|
||||
|
22
modules/validations.nix
Normal file
22
modules/validations.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
# config.assertions = [
|
||||
# {
|
||||
# assertion =
|
||||
# lib.length (
|
||||
# lib.filter (x: x) [
|
||||
# config.my_modules.de_cosmic.enable
|
||||
# config.my_modules.de_gnome_xorg.enable
|
||||
# config.my_modules.de_gnome_wayland.enable
|
||||
# ]
|
||||
# ) <= 1;
|
||||
# message = ''
|
||||
# Configuration Error: Multiple desktop environments are enabled.
|
||||
# Please enable only one of the following:
|
||||
# - my_modules.de_cosmic.enable
|
||||
# - my_modules.de_gnome_xorg.enable
|
||||
# - my_modules.de_gnome_wayland.enable
|
||||
# '';
|
||||
# }
|
||||
# ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue