From a14bd75c3c75317c4645a91ae940141bdfcf30e3 Mon Sep 17 00:00:00 2001 From: iFargle Date: Tue, 5 Dec 2023 20:30:44 +0900 Subject: [PATCH] Test xfce --- home-manager/common/desktops/xfce/default.nix | 0 .../desktops/xfce/themes/default/default.nix | 63 +++++++++++++++++++ .../desktops/xfce/themes/gruvbox/default.nix | 63 +++++++++++++++++++ .../desktops/xfce/default.nix | 3 + .../nixos-framework/desktops/xfce/default.nix | 3 + .../desktops/xfce/default.nix | 3 + nixos/common/desktops/xfce/default.nix | 40 ++++++++++++ 7 files changed, 175 insertions(+) create mode 100644 home-manager/common/desktops/xfce/default.nix create mode 100644 home-manager/common/desktops/xfce/themes/default/default.nix create mode 100644 home-manager/common/desktops/xfce/themes/gruvbox/default.nix create mode 100644 home-manager/hosts/framework-server/desktops/xfce/default.nix create mode 100644 home-manager/hosts/nixos-framework/desktops/xfce/default.nix create mode 100644 home-manager/hosts/nixos-iso-desktop/desktops/xfce/default.nix create mode 100644 nixos/common/desktops/xfce/default.nix diff --git a/home-manager/common/desktops/xfce/default.nix b/home-manager/common/desktops/xfce/default.nix new file mode 100644 index 00000000..e69de29b diff --git a/home-manager/common/desktops/xfce/themes/default/default.nix b/home-manager/common/desktops/xfce/themes/default/default.nix new file mode 100644 index 00000000..81f5df5a --- /dev/null +++ b/home-manager/common/desktops/xfce/themes/default/default.nix @@ -0,0 +1,63 @@ +# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix +{ lib, hostname, username, ... }: with lib.hm.gvariant; +let + # General Theming + font = "FontAwesome Bold 11"; + font-doc = "FontAwesome Regular 11"; + font-mono = "JetBrainsMono Nerd Font Propo Medium 11"; + + # Day Variant + day-wallpaper = "file:///etc/nixos/git/wallpapers/default/wallpaper1.png"; + day-gtk-theme = "Fluent-Light-compact"; + day-shell-theme = "Fluent-compact"; + day-icon-theme = "Papirus"; + + # Night Variant + night-wallpaper = "file:///etc/nixos/git/wallpapers/default/wallpaper1.png"; + night-gtk-theme = "Fluent-Dark-compact"; + night-shell-theme = "Fluent-Dark-compact"; + night-icon-theme = "Papirus-Dark"; +in { + # Gnome GTK Settings + gtk.theme = "${night-gtk-theme}"; + + # Gnome DCONF Settings + dconf.settings = { + "org/gnome/desktop/background" = { + picture-uri = "${day-wallpaper}"; + picture-uri-dark = "${night-wallpaper}"; + }; + + "org/gnome/shell/extensions/nightthemeswitcher/gtk-variants" = { + enabled = true; + day = "${day-gtk-theme}"; + night = "${night-gtk-theme}"; + }; + + "org/gnome/shell/extensions/nightthemeswitcher/icon-variants" = { + enabled = true; + day = "${day-icon-theme}"; + night = "${night-icon-theme}"; + }; + + "org/gnome/shell/extensions/nightthemeswitcher/shell-variants" = { + enabled = true; + day = "${day-shell-theme}"; + night = "${night-shell-theme}"; + }; + + "org/gnome/desktop/interface" = { + clock-show-date = true; + clock-show-weekday = false; + color-scheme = "prefer-light"; + font-antialiasing = "rgba"; + font-hinting = "slight"; + gtk-theme = "${day-gtk-theme}"; + icon-theme = "${night-icon-theme}"; + monospace-font-name = "${font-mono}"; + font-name = "${font}"; + document-font-name = "${font-doc}"; + show-battery-percentage = false; + }; + }; +} diff --git a/home-manager/common/desktops/xfce/themes/gruvbox/default.nix b/home-manager/common/desktops/xfce/themes/gruvbox/default.nix new file mode 100644 index 00000000..8d7db077 --- /dev/null +++ b/home-manager/common/desktops/xfce/themes/gruvbox/default.nix @@ -0,0 +1,63 @@ +# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix +{ lib, hostname, username, ... }: with lib.hm.gvariant; +let + # General Theming + font = "FontAwesome Bold 11"; + font-doc = "FontAwesome Regular 11"; + font-mono = "JetBrainsMono Nerd Font Propo Medium 11"; + + # Day Variant + day-wallpaper = "file:///etc/nixos/git/wallpapers/gruvbox/wallpaper9.jpg"; + day-gtk-theme = ""; + day-shell-theme = "vimix-doder"; + day-icon-theme = "Vimix-Doder"; + + # Night Variant + night-wallpaper = "file:///etc/nixos/git/wallpapers/gruvbox/wallpaper12.jpg"; + night-gtk-theme = ""; + night-shell-theme = "Gruvbox-Dark-BL"; + night-icon-theme = "Nordzy-yellow-dark"; +in { + # Gnome GTK Settings + gtk.theme = "${night-gtk-theme}"; + + # Gnome DCONF Settings + dconf.settings = { + "org/gnome/desktop/background" = { + picture-uri = "${day-wallpaper}"; + picture-uri-dark = "${night-wallpaper}"; + }; + + "org/gnome/shell/extensions/nightthemeswitcher/gtk-variants" = { + enabled = true; + day = "${day-gtk-theme}"; + night = "${night-gtk-theme}"; + }; + + "org/gnome/shell/extensions/nightthemeswitcher/icon-variants" = { + enabled = true; + day = "${day-icon-theme}"; + night = "${night-icon-theme}"; + }; + + "org/gnome/shell/extensions/nightthemeswitcher/shell-variants" = { + enabled = true; + day = "${day-shell-theme}"; + night = "${night-shell-theme}"; + }; + + "org/gnome/desktop/interface" = { + clock-show-date = true; + clock-show-weekday = false; + color-scheme = "prefer-light"; + font-antialiasing = "rgba"; + font-hinting = "slight"; + gtk-theme = "${day-gtk-theme}"; + icon-theme = "${night-icon-theme}"; + monospace-font-name = "${font-mono}"; + font-name = "${font}"; + document-font-name = "${font-doc}"; + show-battery-percentage = false; + }; + }; +} diff --git a/home-manager/hosts/framework-server/desktops/xfce/default.nix b/home-manager/hosts/framework-server/desktops/xfce/default.nix new file mode 100644 index 00000000..077404aa --- /dev/null +++ b/home-manager/hosts/framework-server/desktops/xfce/default.nix @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/home-manager/hosts/nixos-framework/desktops/xfce/default.nix b/home-manager/hosts/nixos-framework/desktops/xfce/default.nix new file mode 100644 index 00000000..077404aa --- /dev/null +++ b/home-manager/hosts/nixos-framework/desktops/xfce/default.nix @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/home-manager/hosts/nixos-iso-desktop/desktops/xfce/default.nix b/home-manager/hosts/nixos-iso-desktop/desktops/xfce/default.nix new file mode 100644 index 00000000..077404aa --- /dev/null +++ b/home-manager/hosts/nixos-iso-desktop/desktops/xfce/default.nix @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/nixos/common/desktops/xfce/default.nix b/nixos/common/desktops/xfce/default.nix new file mode 100644 index 00000000..75b284ae --- /dev/null +++ b/nixos/common/desktops/xfce/default.nix @@ -0,0 +1,40 @@ +{ lib, config, pkgs, hostname, gpu, ... }: { + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = true; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + # Configure keymap in X11 + services.xserver = { + enable = true; + layout = "us"; + xkbVariant = ""; + autorun = true; + videoDrivers = [ ] ++ lib.optional (builtins.isString gpu) gpu; + }; + + ##### disable nvidia, very nice battery life. + # hardware.nvidiaOptimus.disable = lib.mkDefault true; + + services.xserver = { + # https://nixos.org/manual/nixos/stable/index.html#chap-gnome + # Enable the GNOME Desktop Environment. + desktopManager = { + xterm.enable = false; + xfce.enable = true; + }; + displayManager.defaultSession = "xfce"; + }; + + environment.systemPackages = with pkgs; [ + # Gnome relevant packages + papirus-icon-theme + dconf2nix # https://github.com/gvolpe/dconf2nix + ]; +}