made some progress
This commit is contained in:
parent
5ba5d55108
commit
a9a4777168
35 changed files with 1176 additions and 44 deletions
37
modules/nixos/desktop/default.nix
Normal file
37
modules/nixos/desktop/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ lib, config, namespace, ... }:let
|
||||
inherit (lib) mkOption mkMerge attrNames filterAttrs;
|
||||
inherit (lib.types) nullOr enum bool;
|
||||
|
||||
cfg = config.${namespace}.desktop;
|
||||
in
|
||||
{
|
||||
options.${namespace}.desktop = {
|
||||
use = mkOption {
|
||||
type = nullOr enum (attrNames (filterAttrs (n: type == "directory") (readDir ./.)));
|
||||
default = null;
|
||||
example = "plasma";
|
||||
description = "Which desktop to enable";
|
||||
};
|
||||
|
||||
autoLogin = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Enable plasma's auto login feature.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.desktop != null {
|
||||
"${namespace}".desktop.${cfg.use}.enable = true;
|
||||
|
||||
services.displayManager = {
|
||||
enable = true;
|
||||
|
||||
autoLogin = mkIf cfg.autoLogin {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
27
modules/nixos/desktop/gamescope/default.nix
Normal file
27
modules/nixos/desktop/gamescope/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ lib, config, namespace, inputs, ... }:let
|
||||
inherit (lib) mkEnableOption;
|
||||
|
||||
cfg = config.${namespace}.desktop.gamescope;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.jovian.nixosModules.default ];
|
||||
|
||||
options.${namespace}.desktop.gamescope = {
|
||||
enable = mkEnableOption "Enable Steamdeck ui";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
"${namespace}".desktop.kde.enable = true;
|
||||
|
||||
jovian = {
|
||||
steam = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
user = "chris";
|
||||
updater.splash = "steamos";
|
||||
desktopSession = "plasma";
|
||||
};
|
||||
steamos.useSteamOSConfig = true;
|
||||
};
|
||||
};
|
||||
}
|
14
modules/nixos/desktop/gnome/default.nix
Normal file
14
modules/nixos/desktop/gnome/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ lib, config, namespace, ... }:let
|
||||
inherit (lib) mkEnableOption mkOption;
|
||||
inherit (lib.types) bool;
|
||||
|
||||
cfg = config.${namespace}.desktop.gnome;
|
||||
in
|
||||
{
|
||||
options.${namespace}.desktop.gnome = {
|
||||
enable = mkEnableOption "Enable Gnome";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
};
|
||||
}
|
30
modules/nixos/desktop/plasma/default.nix
Normal file
30
modules/nixos/desktop/plasma/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ lib, config, namespace, ... }:let
|
||||
inherit (lib) mkEnableOption mkOption;
|
||||
inherit (lib.types) bool;
|
||||
|
||||
cfg = config.${namespace}.desktop.plasma;
|
||||
in
|
||||
{
|
||||
options.${namespace}.desktop.plasma = {
|
||||
enable = mkEnableOption "Enable KDE Plasma";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole kate ghostwriter oxygen ];
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
services = {
|
||||
xserver.enable = false;
|
||||
|
||||
desktopManager.plasma6.enable = true;
|
||||
|
||||
displayManager = {
|
||||
defaultSession = "plasma";
|
||||
sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue