mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
move desktop environments into modules
This commit is contained in:
parent
5cc282d784
commit
47278f895a
5 changed files with 71 additions and 62 deletions
|
@ -7,11 +7,14 @@
|
||||||
./modules/cli.nix
|
./modules/cli.nix
|
||||||
./modules/fix-gnome-mouse-lag.nix
|
./modules/fix-gnome-mouse-lag.nix
|
||||||
./modules/flakes.nix
|
./modules/flakes.nix
|
||||||
|
./modules/gnome.nix
|
||||||
./modules/phpipam.nix
|
./modules/phpipam.nix
|
||||||
|
./modules/plasma.nix
|
||||||
./modules/profiles.nix
|
./modules/profiles.nix
|
||||||
./modules/scansnap_s1300.nix
|
./modules/scansnap_s1300.nix
|
||||||
./modules/scroll-boost
|
./modules/scroll-boost
|
||||||
./modules/security-tools.nix
|
./modules/security-tools.nix
|
||||||
./modules/status-on-console.nix
|
./modules/status-on-console.nix
|
||||||
|
./modules/sway.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,24 @@
|
||||||
{ pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.sconfig.gnome;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
environment = {
|
options.sconfig.gnome = lib.mkEnableOption "Enable Gnome Desktop";
|
||||||
systemPackages = with pkgs; [
|
|
||||||
numix-icon-theme
|
config = lib.mkIf cfg {
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
libinput.enable = true;
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
displayManager.gdm.autoSuspend = false;
|
||||||
|
desktopManager.gnome3.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
gnome3.gnome-tweaks
|
gnome3.gnome-tweaks
|
||||||
|
gnomeExtensions.appindicator
|
||||||
|
numix-icon-theme
|
||||||
qemu_kvm
|
qemu_kvm
|
||||||
|
|
||||||
(writeShellScriptBin "red" ''
|
(writeShellScriptBin "red" ''
|
||||||
|
@ -39,21 +54,7 @@
|
||||||
gsettings set org.gnome.desktop.interface icon-theme 'Numix'; sleep 1
|
gsettings set org.gnome.desktop.interface icon-theme 'Numix'; sleep 1
|
||||||
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
|
gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
|
||||||
'')
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
] ++ (with pkgs.gnomeExtensions; [
|
|
||||||
appindicator
|
|
||||||
dash-to-panel
|
|
||||||
drop-down-terminal
|
|
||||||
sound-output-device-chooser
|
|
||||||
no-title-bar
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
libinput.enable = true;
|
|
||||||
displayManager.gdm.enable = true;
|
|
||||||
displayManager.gdm.autoSuspend = false;
|
|
||||||
desktopManager.gnome3.enable = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
{ ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.sconfig.plasma;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
options.sconfig.plasma = lib.mkEnableOption "Enable Plasma Desktop";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg {
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
displayManager.sddm.enable = true;
|
displayManager.sddm.enable = true;
|
||||||
desktopManager.plasma5.enable = true;
|
desktopManager.plasma5.enable = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.sconfig.profile = mkOption {
|
options.sconfig.profile = mkOption {
|
||||||
type = types.enum [ "server" "desktop-gnome" "desktop-sway" "desktop-plasma" ];
|
type = types.enum [ "server" "desktop" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
|
@ -22,13 +22,7 @@ in
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf (cfg == "desktop-sway") (import ./sway.nix { inherit pkgs; }))
|
(mkIf (cfg == "desktop") (import ./graphical.nix { inherit pkgs; }))
|
||||||
(mkIf (cfg == "desktop-gnome") (import ./gnome.nix { inherit pkgs; }))
|
|
||||||
(mkIf (cfg == "desktop-plasma") (import ./plasma.nix { inherit pkgs; }))
|
|
||||||
|
|
||||||
(mkIf ("desktop-" == builtins.substring 0 8 cfg) (mkMerge [
|
|
||||||
(import ./graphical.nix { inherit pkgs; })
|
|
||||||
]))
|
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
{ pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.sconfig.sway;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
programs.sway.enable = true;
|
options.sconfig.sway = lib.mkEnableOption "Enable Sway Window Manager";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg {
|
||||||
|
programs.sway.enable = true;
|
||||||
|
programs.bash.interactiveShellInit = '' [ "$(tty)" = "/dev/tty1" ] && exec sway '';
|
||||||
|
|
||||||
environment.variables.GTK_THEME = "Yaru-dark";
|
environment.variables.GTK_THEME = "Yaru-dark";
|
||||||
environment.variables.MOZ_ENABLE_WAYLAND = "1";
|
environment.variables.MOZ_ENABLE_WAYLAND = "1";
|
||||||
|
|
||||||
environment.etc."xdg/gtk-3.0/settings.ini".text = ''
|
environment.etc."xdg/gtk-3.0/settings.ini".text = ''
|
||||||
[Settings]
|
[Settings]
|
||||||
gtk-theme-name=Yaru-dark
|
gtk-theme-name=Yaru-dark
|
||||||
|
@ -30,6 +35,5 @@
|
||||||
wf-recorder
|
wf-recorder
|
||||||
xdg_utils
|
xdg_utils
|
||||||
];
|
];
|
||||||
|
};
|
||||||
programs.bash.interactiveShellInit = '' [ "$(tty)" = "/dev/tty1" ] && exec sway '';
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue