mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Desktop/Plasma] add Plasma 6
Allow both desktops to exist at the same time. Add "plasma6" environment option.
This commit is contained in:
parent
de2556ac4d
commit
8b9551bc86
7 changed files with 123 additions and 90 deletions
|
|
@ -5,7 +5,7 @@ with lib;
|
|||
./general.nix
|
||||
./developer.nix
|
||||
./multimedia.nix
|
||||
./plasma.nix
|
||||
./plasma
|
||||
./games.nix
|
||||
./browser.nix
|
||||
./gnome.nix
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ in {
|
|||
environment = mkOption {
|
||||
default = "plasma";
|
||||
example = "gnome";
|
||||
type = with types; enum [ "plasma" "gnome" ];
|
||||
type = with types; enum [ "plasma" "plasma6" "gnome" ];
|
||||
description = "What Desktop Environment to use";
|
||||
};
|
||||
layout = mkOption {
|
||||
|
|
|
|||
|
|
@ -1,88 +0,0 @@
|
|||
{config, pkgs, nixpkgs-unstable, lib, ...}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.aviallon.desktop;
|
||||
optimizeCfg = config.aviallon.optimizations;
|
||||
in {
|
||||
|
||||
config = mkIf (cfg.enable && (cfg.environment == "plasma")) {
|
||||
# Enable the Plasma 5 Desktop Environment.
|
||||
services.xserver.desktopManager.plasma5 = {
|
||||
enable = true;
|
||||
runUsingSystemd = true;
|
||||
useQtScaling = true;
|
||||
|
||||
# Removed in: https://github.com/NixOS/nixpkgs/pull/172078
|
||||
# and: https://github.com/NixOS/nixpkgs/pull/221721
|
||||
# Once this (https://invent.kde.org/plasma/powerdevil/-/issues/19) is solved, make PR to add it back (prehaps by default?)
|
||||
# supportDDC = true;
|
||||
};
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# Already brought in by ${nixpkgs}/nixos/modules/services/x11/desktop-managers/plasma5.nix
|
||||
# programs.firefox.nativeMessagingHosts.packages = [ pkgs.libsForQt5.plasma-browser-integration ];
|
||||
|
||||
programs.firefox.policies.Extensions.Install = [ "plasma-browser-integration@kde.org" ];
|
||||
|
||||
environment.etc = {
|
||||
"chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json".source =
|
||||
"${pkgs.libsForQt5.plasma-browser-integration}/etc/chromium/native-messaging-hosts/org.kde.plasma.browser_integration.json";
|
||||
};
|
||||
|
||||
programs.chromium.extensions = [
|
||||
"cimiefiiaegbelhefglklhhakcgmhkai" # Plasma Browser Integration
|
||||
];
|
||||
|
||||
aviallon.desktop.sddm.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; with libsForQt5; [
|
||||
skanpage
|
||||
packagekit-qt
|
||||
discover
|
||||
akonadi
|
||||
kmail
|
||||
kdepim-addons
|
||||
kdepim-runtime
|
||||
|
||||
korganizer
|
||||
kalendar
|
||||
dolphin
|
||||
kio-fuse
|
||||
konsole
|
||||
kate
|
||||
yakuake
|
||||
pinentry-qt
|
||||
plasma-pa
|
||||
ark
|
||||
kolourpaint
|
||||
krdc
|
||||
sddm-kcm
|
||||
];
|
||||
|
||||
aviallon.programs.libreoffice.qt = true;
|
||||
|
||||
xdg.portal.enable = mkDefault true;
|
||||
xdg.icons.enable = true;
|
||||
|
||||
# We prefer Plasma Wayland
|
||||
services.xserver.displayManager.defaultSession = "plasmawayland";
|
||||
|
||||
systemd.user.services.setup-xdg-cursors = mkIf config.xdg.icons.enable {
|
||||
script = ''
|
||||
[ -d "$HOME/.icons/default" ] || mkdir -p "$HOME/.icons/default"
|
||||
cat >"$HOME/.icons/default/index.theme" <<EOF
|
||||
[icon theme]
|
||||
Inherits=''${XCURSOR_THEME:-breeze_cursors}
|
||||
EOF
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "graphical-session-pre.target" ];
|
||||
partOf = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
48
desktop/plasma/default.nix
Normal file
48
desktop/plasma/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{config, pkgs, nixpkgs-unstable, lib, ...}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.aviallon.desktop;
|
||||
optimizeCfg = config.aviallon.optimizations;
|
||||
in {
|
||||
|
||||
imports = [
|
||||
./plasma5.nix
|
||||
./plasma6.nix
|
||||
];
|
||||
|
||||
config = mkIf (cfg.enable && (cfg.environment == "plasma" || cfg.environment == "plasma6" )) {
|
||||
programs.firefox.enable = true;
|
||||
programs.firefox.policies.Extensions.Install = [ "plasma-browser-integration@kde.org" ];
|
||||
|
||||
programs.chromium.extensions = [
|
||||
"cimiefiiaegbelhefglklhhakcgmhkai" # Plasma Browser Integration
|
||||
];
|
||||
|
||||
aviallon.desktop.sddm.enable = true;
|
||||
aviallon.programs.libreoffice.qt = true;
|
||||
|
||||
xdg.portal.enable = mkDefault true;
|
||||
xdg.icons.enable = true;
|
||||
|
||||
#environment.systemPackages = [
|
||||
#config.programs.gnupg.agent.pinentryPackage
|
||||
#];
|
||||
|
||||
systemd.user.services.setup-xdg-cursors = mkIf config.xdg.icons.enable {
|
||||
script = ''
|
||||
[ -d "$HOME/.icons/default" ] || mkdir -p "$HOME/.icons/default"
|
||||
cat >"$HOME/.icons/default/index.theme" <<EOF
|
||||
[icon theme]
|
||||
Inherits=''${XCURSOR_THEME:-breeze_cursors}
|
||||
EOF
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "graphical-session-pre.target" ];
|
||||
partOf = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
24
desktop/plasma/generic.nix
Normal file
24
desktop/plasma/generic.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ kdePackages }:
|
||||
{
|
||||
commonPackages = with kdePackages; [
|
||||
skanpage
|
||||
packagekit-qt
|
||||
discover
|
||||
akonadi
|
||||
kmail
|
||||
kdepim-addons
|
||||
kdepim-runtime
|
||||
calendarsupport
|
||||
|
||||
korganizer
|
||||
dolphin
|
||||
konsole
|
||||
kate
|
||||
yakuake
|
||||
plasma-pa
|
||||
ark
|
||||
kolourpaint
|
||||
krdc
|
||||
sddm-kcm
|
||||
];
|
||||
}
|
||||
29
desktop/plasma/plasma5.nix
Normal file
29
desktop/plasma/plasma5.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.aviallon.desktop;
|
||||
generic = import ./generic.nix {
|
||||
kdePackages = pkgs.libsForQt5;
|
||||
};
|
||||
in {
|
||||
config = mkIf (cfg.enable && (cfg.environment == "plasma")) {
|
||||
# Enable the Plasma 5 Desktop Environment.
|
||||
services.xserver.desktopManager.plasma5 = {
|
||||
enable = true;
|
||||
runUsingSystemd = true;
|
||||
useQtScaling = true;
|
||||
|
||||
# Removed in: https://github.com/NixOS/nixpkgs/pull/172078
|
||||
# and: https://github.com/NixOS/nixpkgs/pull/221721
|
||||
# Once this (https://invent.kde.org/plasma/powerdevil/-/issues/19) is solved, make PR to add it back (prehaps by default?)
|
||||
# supportDDC = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = generic.commonPackages ++ [
|
||||
pkgs.kio-fuse
|
||||
];
|
||||
|
||||
# We prefer Plasma Wayland
|
||||
services.displayManager.defaultSession = "plasmawayland";
|
||||
};
|
||||
}
|
||||
20
desktop/plasma/plasma6.nix
Normal file
20
desktop/plasma/plasma6.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.aviallon.desktop;
|
||||
generic = import ./generic.nix {
|
||||
kdePackages = pkgs.kdePackages;
|
||||
};
|
||||
in {
|
||||
config = mkIf (cfg.enable && (cfg.environment == "plasma6")) {
|
||||
# Enable the Plasma 6 Desktop Environment.
|
||||
services.desktopManager.plasma6 = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = generic.commonPackages;
|
||||
|
||||
# We prefer Plasma Wayland
|
||||
services.displayManager.defaultSession = "plasma";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue