Merge branch 'main' into cosmic

This commit is contained in:
Wroclaw 2024-03-13 11:01:15 +01:00
commit cb4d369d96
11 changed files with 294 additions and 227 deletions

View file

@ -10,7 +10,8 @@
../nix-os/nvidia.nix ../nix-os/nvidia.nix
../nix-os/docker.nix ../nix-os/docker.nix
../nix-os/razer.nix ../nix-os/razer.nix
../nix-os/desktop/gnome.nix ../nix-os/desktopManagers/gnome.nix
../nix-os/displayManagers/gdm.nix
#../nix-os/desktop/kde-plasma.nix #../nix-os/desktop/kde-plasma.nix
../nix-os/shell.nix ../nix-os/shell.nix
../nix-os/virtualization.nix ../nix-os/virtualization.nix

View file

@ -4,7 +4,8 @@
imports = [ imports = [
../nix-os/core.nix ../nix-os/core.nix
../nix-os/docker.nix ../nix-os/docker.nix
../nix-os/desktop/cosmic.nix ../nix-os/desktopManagers/cosmic.nix
../nix-os/displayManagers/cosmic-greeter.nix
#../nix-os/desktop/kde-plasma.nix #../nix-os/desktop/kde-plasma.nix
../nix-os/shell.nix ../nix-os/shell.nix
../nix-os/virtualization.nix ../nix-os/virtualization.nix

View file

@ -4,7 +4,8 @@
imports = [ imports = [
../nix-os/core.nix ../nix-os/core.nix
../nix-os/docker.nix ../nix-os/docker.nix
../nix-os/desktop/gnome.nix ../nix-os/desktopManagers/gnome.nix
../nix-os/displayManagers/gdm.nix
#../nix-os/desktop/kde-plasma.nix #../nix-os/desktop/kde-plasma.nix
../nix-os/shell.nix ../nix-os/shell.nix
../nix-os/virtualization.nix ../nix-os/virtualization.nix

158
nix-os/dconf-common.nix Normal file
View file

@ -0,0 +1,158 @@
# This file is not a NixOS system module
{config, lib, pkgs, ... }:
selection:
let
settings = with lib.gvariant; {
"org/gnome/desktop/background" = {
picture-options = "zoom";
picture-uri = "file://${../media/wallpaper.png}";
picture-uri-dark = "file://${../media/wallpaper.png}";
};
"org/gnome/desktop/interface" = {
clock-show-date = true;
clock-show-seconds = true;
clock-show-weekday = true;
color-scheme = "prefer-dark";
cursor-theme = "GoogleDot-White";
};
"org/gnome/desktop/media-handling" = {
automount = false;
};
"org/gnome/desktop/peripherals/mouse" = {
accel-profile = "flat";
};
"org/gnome/desktop/sound" = {
allow-volume-above-100-percent = true;
};
"org/gnome/mutter" = {
dynamic-workspaces = true;
workspaces-only-on-primary = true;
};
"org/gnome/SessionManager" = {
logout-prompt = false;
};
"org/gnome/settings-daemon/plugins/power" = {
power-button-action = "notning";
sleep-inactive-ac-type = "nothing";
};
"org/gnome/shell" = {
enabled-extensions = [
"drive-menu@gnome-shell-extensions.gcampax.github.com"
"pop-shell@system76.com"
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
"Vitals@CoreCoding.com"
"trayIconsReloaded@selfmade.pl"
"places-menu@gnome-shell-extensions.gcampax.github.com"
"apps-menu@gnome-shell-extensions.gcampax.github.com"
"top-bar-organizer@julian.gse.jsts.xyz"
"color-picker@tuberry"
];
favorite-apps = [
(if builtins.elem pkgs.kitty config.environment.systemPackages then
"kitty.desktop"
else none)
"vivaldi-stable.desktop"
"code.desktop"
"org.gnome.Nautilus.desktop"
(if config.programs.steam.enable then
"steam.desktop"
else none)
"pavucontrol.desktop"
];
};
"org/gnome/shell/app-switcher" = {
current-workspace-only = false;
};
"org/gnome/shell/extensions/color-picker" = {
color-picker-shortcut = ["<Super><Alt>c"];
enable-shortcut = true;
enable-systray = false;
menu-key = "";
notify-style = mkUint32 1;
preview-style = mkUint32 0;
};
"org/gnome/shell/extensions/pop-shell" = {
active-hint = true;
active-hint-border-radius = mkUint32 1;
gap-inner = mkUint32 2;
gap-outer = mkUint32 1;
show-skip-taskbar = true;
show-title = true;
smart-gaps = false;
snap-to-grid = false;
tile-by-default = true;
};
"org/gnome/shell/extensions/top-bar-organizer" = {
center-box-order = ["dateMenu"];
left-box-order = ["activities" "apps-menu" "places-menu" "vitalsMenu"];
right-box-order = ["TrayIconsReloaded" "workspace-indicator" "pop-shell" "color-picker@tuberry" "drive-menu" "screenRecording" "screenSharing" "dwellClick" "a11y" "keyboard" "quickSettings"];
};
"org/gnome/shell/extensions/trayIconsReloaded" = {
icon-brightness = mkInt32 0;
icon-contrast = mkInt32 0;
icon-margin-horizontal = mkInt32 0;
icon-margin-vertical = mkInt32 0;
icon-padding-horizontal = mkInt32 4;
icon-padding-vertical = mkInt32 0;
icon-saturation = mkInt32 0;
icon-size = mkInt32 16;
icons-limit = mkInt32 16;
invoke-to-workspace = true;
position-weight = mkInt32 0;
tray-margin-left = mkInt32 0;
tray-margin-right = mkInt32 0;
};
"org/gnome/shell/extensions/vitals" = {
hide-icons = false;
hot-sensors = ["_processor_usage_" "_memory_allocated_"];
memory-measurement = mkInt32 1;
update-time = mkInt32 2;
use-higher-precision = true;
};
"org/gnome/shell/keybindings" = {
show-screenshot-ui = ["Print" "<Super><Shift>S"];
};
"org/gnome/desktop/default-applications/terminal" =
if builtins.elem pkgs.kitty config.environment.systemPackages then {
exec = "kitty";
exec-arg = "";
} else null;
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
(
if builtins.elem pkgs.kitty config.environment.systemPackages then
"org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0"
else null
)
];
help = mkEmptyArray "s";
screensaver = ["<Control><Super>l"];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0" =
if builtins.elem pkgs.kitty config.environment.systemPackages then {
binding = "<Control><Alt>t";
command = "kitty";
name = "Terminal";
} else null;
};
in
lib.filterAttrs (n: v: builtins.elem n selection) settings

View file

@ -1,217 +0,0 @@
{lib, config, pkgs, unstablePkgs, ...}:
{
imports = [
../unstable-packages.nix
];
config = rec {
services.xserver.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.gdm = {
enable = true;
wayland = false;
autoSuspend = false;
};
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
programs.dconf.profiles.user.databases = [{
settings = with lib.gvariant; {
"org/gnome/desktop/background" = {
picture-options="zoom";
picture-uri="file://${../../media/wallpaper.png}";
picture-uri-dark="file://${../../media/wallpaper.png}";
};
"org/gnome/desktop/interface" = {
clock-show-date=true;
clock-show-seconds=true;
clock-show-weekday=true;
color-scheme="prefer-dark";
cursor-theme="GoogleDot-White";
};
"org/gnome/desktop/media-handling" = {
automount=false;
};
"org/gnome/desktop/peripherals/mouse" = {
accel-profile="flat";
};
"org/gnome/desktop/sound" = {
allow-volume-above-100-percent=true;
};
"org/gnome/mutter" = {
dynamic-workspaces=true;
workspaces-only-on-primary=true;
};
"org/gnome/SessionManager" = {
logout-prompt=false;
};
"org/gnome/settings-daemon/plugins/power" = {
power-button-action="notning";
sleep-inactive-ac-type="nothing";
};
"org/gnome/shell" = {
enabled-extensions=[
"drive-menu@gnome-shell-extensions.gcampax.github.com"
"pop-shell@system76.com"
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
"Vitals@CoreCoding.com"
"trayIconsReloaded@selfmade.pl"
"places-menu@gnome-shell-extensions.gcampax.github.com"
"apps-menu@gnome-shell-extensions.gcampax.github.com"
"top-bar-organizer@julian.gse.jsts.xyz"
"color-picker@tuberry"
];
favorite-apps=[
(if builtins.elem pkgs.kitty config.environment.systemPackages then
"kitty.desktop"
else none)
"vivaldi-stable.desktop"
"code.desktop"
"org.gnome.Nautilus.desktop"
(if config.programs.steam.enable then
"steam.desktop"
else none)
"pavucontrol.desktop"
];
};
"org/gnome/shell/app-switcher" = {
current-workspace-only=false;
};
"org/gnome/shell/extensions/color-picker" = {
color-picker-shortcut=["<Super><Alt>c"];
enable-shortcut=true;
enable-systray=false;
menu-key="";
notify-style=mkUint32 1;
preview-style=mkUint32 0;
};
"org/gnome/shell/extensions/pop-shell" = {
active-hint=true;
active-hint-border-radius=mkUint32 1;
gap-inner=mkUint32 2;
gap-outer=mkUint32 1;
show-skip-taskbar=true;
show-title=true;
smart-gaps=false;
snap-to-grid=false;
tile-by-default=true;
};
"org/gnome/shell/extensions/top-bar-organizer" = {
center-box-order=["dateMenu"];
left-box-order=["activities" "apps-menu" "places-menu" "vitalsMenu"];
right-box-order=["TrayIconsReloaded" "workspace-indicator" "pop-shell" "color-picker@tuberry" "drive-menu" "screenRecording" "screenSharing" "dwellClick" "a11y" "keyboard" "quickSettings"];
};
"org/gnome/shell/extensions/trayIconsReloaded" = {
icon-brightness=mkInt32 0;
icon-contrast=mkInt32 0;
icon-margin-horizontal=mkInt32 0;
icon-margin-vertical=mkInt32 0;
icon-padding-horizontal=mkInt32 4;
icon-padding-vertical=mkInt32 0;
icon-saturation=mkInt32 0;
icon-size=mkInt32 16;
icons-limit=mkInt32 16;
invoke-to-workspace=true;
position-weight=mkInt32 0;
tray-margin-left=mkInt32 0;
tray-margin-right=mkInt32 0;
};
"org/gnome/shell/extensions/vitals" = {
hide-icons=false;
hot-sensors=["_processor_usage_" "_memory_allocated_"];
memory-measurement=mkInt32 1;
update-time=mkInt32 2;
use-higher-precision=true;
};
"org/gnome/shell/keybindings" = {
show-screenshot-ui=["Print" "<Super><Shift>S"];
};
"org/gnome/desktop/default-applications/terminal" =
if builtins.elem pkgs.kitty config.environment.systemPackages then {
exec = "kitty";
exec-arg = "";
} else null;
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
(
if builtins.elem pkgs.kitty config.environment.systemPackages then
"org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0"
else null
)
];
help = mkEmptyArray "s";
screensaver = ["<Control><Super>l"];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0" =
if builtins.elem pkgs.kitty config.environment.systemPackages then {
binding="<Control><Alt>t";
command="kitty";
name="Terminal";
} else null;
};
}];
environment.gnome.excludePackages = with pkgs; with pkgs.gnome; [
baobab
cheese
epiphany
evince
geary
gedit
gnome-characters
gnome-connections
gnome-console
gnome-disk-utility
gnome-font-viewer
gnome-logs
gnome-maps
gnome-text-editor
gnome-tour
seahorse
totem
yelp
];
programs.dconf.profiles.gdm.databases = with builtins.elemAt programs.dconf.profiles.user.databases 0; [{
settings = {
"org/gnome/desktop/interface" = settings."org/gnome/desktop/interface";
"org/gnome/desktop/peripherals/mouse" = settings."org/gnome/desktop/peripherals/mouse";
"org/gnome/desktop/sound" = settings."org/gnome/desktop/sound";
"org/gnome/settings-daemon/plugins/power" = settings."org/gnome/settings-daemon/plugins/power";
"org/gnome/shell/keybindings" = settings."org/gnome/shell/keybindings";
};
}];
environment.systemPackages = with pkgs; [
gnomeExtensions.pop-shell
gnomeExtensions.vitals
gnomeExtensions.tray-icons-reloaded
gnomeExtensions.color-picker
gnomeExtensions.top-bar-organizer
# unstablePkgs.gnomeExtensions.translate-indicator
# translate-shell
pavucontrol
#FIXME: Apply the cursor theme also in GTK3 config
google-cursor
];
};
}

View file

@ -3,9 +3,8 @@
let let
nixos-cosmic = builtins.fetchGit { nixos-cosmic = builtins.fetchGit {
url = "https://github.com/lilyinstarlight/nixos-cosmic.git"; url = "https://github.com/lilyinstarlight/nixos-cosmic.git";
# rev = "c1f1dc29d6c187fd563776837ab53faafa111721"; # rev = "b61e7a0da2fa1d5f05d41e3db6386b2ac5f5079b";
}; };
cosmicModule = import "${nixos-cosmic}" {system = "x86_64-linux";};
cosmicPkgsMainDir = builtins.readDir "${nixos-cosmic}/pkgs"; cosmicPkgsMainDir = builtins.readDir "${nixos-cosmic}/pkgs";
cosmicPkgsDirs = builtins.filter (v: cosmicPkgsMainDir."${v}" == "directory") (builtins.attrNames cosmicPkgsMainDir); cosmicPkgsDirs = builtins.filter (v: cosmicPkgsMainDir."${v}" == "directory") (builtins.attrNames cosmicPkgsMainDir);
cosmicPkgsOverlay = final: prev: builtins.listToAttrs ( cosmicPkgsOverlay = final: prev: builtins.listToAttrs (
@ -14,13 +13,10 @@ let
in in
{ {
imports = [ imports = [
cosmicModule
"${nixos-cosmic}/nixos/cosmic-greeter/module.nix"
"${nixos-cosmic}/nixos/cosmic/module.nix" "${nixos-cosmic}/nixos/cosmic/module.nix"
]; ];
config = { config = {
services.xserver.desktopManager.cosmic.enable = true; services.xserver.desktopManager.cosmic.enable = true;
services.xserver.displayManager.cosmic-greeter.enable = true;
nixpkgs.overlays = [ cosmicPkgsOverlay ]; nixpkgs.overlays = [ cosmicPkgsOverlay ];
}; };
options = { options = {
@ -31,7 +27,6 @@ in
cosmic-design-demo = lib.mkOption {default = pkgs.cosmic-design;}; cosmic-design-demo = lib.mkOption {default = pkgs.cosmic-design;};
cosmic-edit = lib.mkOption {default = pkgs.cosmic-edit;}; cosmic-edit = lib.mkOption {default = pkgs.cosmic-edit;};
cosmic-files = lib.mkOption {default = pkgs.cosmic-files;}; cosmic-files = lib.mkOption {default = pkgs.cosmic-files;};
cosmic-greeter = lib.mkOption {default = pkgs.cosmic-greeter;};
cosmic-icons = lib.mkOption {default = pkgs.cosmic-icons;}; cosmic-icons = lib.mkOption {default = pkgs.cosmic-icons;};
cosmic-launcher = lib.mkOption {default = pkgs.cosmic-launcher;}; cosmic-launcher = lib.mkOption {default = pkgs.cosmic-launcher;};
cosmic-notifications = lib.mkOption {default = pkgs.cosmic-notifications;}; cosmic-notifications = lib.mkOption {default = pkgs.cosmic-notifications;};

View file

@ -0,0 +1,71 @@
{pkgs, ... } @ moduleArgs:
{
imports = [
../unstable-packages.nix
];
config = {
services.xserver.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
programs.dconf.profiles.user.databases = [{
settings = import ../dconf-common.nix moduleArgs [
"org/gnome/desktop/background"
"org/gnome/desktop/interface"
"org/gnome/desktop/media-handling"
"org/gnome/desktop/peripherals/mouse"
"org/gnome/desktop/sound"
"org/gnome/mutter"
"org/gnome/SessionManager"
"org/gnome/settings-daemon/plugins/power"
"org/gnome/shell"
"org/gnome/shell/app-switcher"
"org/gnome/shell/extensions/color-picker"
"org/gnome/shell/extensions/pop-shell"
"org/gnome/shell/extensions/top-bar-organizer"
"org/gnome/shell/extensions/trayIconsReloaded"
"org/gnome/shell/extensions/vitals"
"org/gnome/shell/keybindings"
"org/gnome/desktop/default-applications/terminal"
"org/gnome/settings-daemon/plugins/media-keys"
"org/gnome/settings-daemon/plugins/media-keys/custom-keybinding/custom0"
];
}];
environment.gnome.excludePackages = with pkgs; with pkgs.gnome; [
baobab
cheese
epiphany
evince
geary
gedit
gnome-characters
gnome-connections
gnome-console
gnome-disk-utility
gnome-font-viewer
gnome-logs
gnome-maps
gnome-text-editor
gnome-tour
seahorse
totem
yelp
];
environment.systemPackages = with pkgs; [
gnomeExtensions.pop-shell
gnomeExtensions.vitals
gnomeExtensions.tray-icons-reloaded
gnomeExtensions.color-picker
gnomeExtensions.top-bar-organizer
# unstablePkgs.gnomeExtensions.translate-indicator
# translate-shell
pavucontrol
#FIXME: Apply the cursor theme also in GTK3 config
google-cursor
];
};
}

View file

@ -4,7 +4,6 @@
config = { config = {
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.desktopManager.plasma5.enable = true; services.xserver.desktopManager.plasma5.enable = true;
services.xserver.displayManager.sddm.enable = true;
# environment.sessionVariables.NIXOS_OZONE_WL = "1"; # environment.sessionVariables.NIXOS_OZONE_WL = "1";

View file

@ -0,0 +1,26 @@
{pkgs, lib, ... }:
let
nixos-cosmic = builtins.fetchGit {
url = "https://github.com/lilyinstarlight/nixos-cosmic.git";
# rev = "b61e7a0da2fa1d5f05d41e3db6386b2ac5f5079b";
};
cosmicPkgsMainDir = builtins.readDir "${nixos-cosmic}/pkgs";
cosmicPkgsDirs = builtins.filter (v: cosmicPkgsMainDir."${v}" == "directory") (builtins.attrNames cosmicPkgsMainDir);
cosmicPkgsOverlay = final: prev: builtins.listToAttrs (
builtins.map (v: {name = v; value = final.callPackage "${nixos-cosmic}/pkgs/${v}/package.nix" {};}) cosmicPkgsDirs
);
in
{
imports = [
"${nixos-cosmic}/nixos/cosmic-greeter/module.nix"
];
config = {
services.xserver.desktopManager.cosmic.enable = true;
services.xserver.displayManager.cosmic-greeter.enable = true;
nixpkgs.overlays = [ cosmicPkgsOverlay ];
};
options = {
cosmic-greeter = lib.mkOption {default = pkgs.cosmic-greeter;};
};
}

View file

@ -0,0 +1,25 @@
{pkgs, ... } @ moduleArgs:
{
config = {
services.xserver.displayManager.gdm = {
enable = true;
wayland = false;
autoSuspend = false;
};
programs.dconf.profiles.gdm.databases = [{
settings = import ../dconf-common.nix moduleArgs [
"org/gnome/desktop/interface"
"org/gnome/desktop/peripherals/mouse"
"org/gnome/desktop/sound"
"org/gnome/settings-daemon/plugins/power"
"org/gnome/shell/keybindings"
];
}];
environment.systemPackages = with pkgs; [
google-cursor
];
};
}

View file

@ -0,0 +1,7 @@
{ ... }:
{
config = {
services.xserver.displayManager.sddm.enable = true;
};
}