From af121aa652ec46f91199dba8333f3dfbf837789f Mon Sep 17 00:00:00 2001 From: qoijjj <129108030+qoijjj@users.noreply.github.com> Date: Sun, 21 Jan 2024 16:02:25 -0800 Subject: [PATCH] feat: cinnamon images with wayland session, improvements for nvidia optimus laptops --- .github/workflows/build.yml | 8 ++++++ config/common/cinnamon-scripts.yml | 3 +++ .../nvidia-laptop-gnome-cinnamon-scripts.yml | 3 +++ .../desktop/recipe-cinnamon-main-userns.yml | 21 ++++++++++++++++ .../recipes/desktop/recipe-cinnamon-main.yml | 23 +++++++++++++++++ .../desktop/recipe-cinnamon-nvidia-userns.yml | 21 ++++++++++++++++ .../desktop/recipe-cinnamon-nvidia.yml | 23 +++++++++++++++++ .../recipe-bluefin-nvidia-laptop-userns.yml | 1 + .../laptop/recipe-bluefin-nvidia-laptop.yml | 1 + .../recipe-cinnamon-main-laptop-userns.yml | 22 ++++++++++++++++ .../laptop/recipe-cinnamon-main-laptop.yml | 24 ++++++++++++++++++ .../recipe-cinnamon-nvidia-laptop-userns.yml | 23 +++++++++++++++++ .../laptop/recipe-cinnamon-nvidia-laptop.yml | 25 +++++++++++++++++++ ...recipe-silverblue-nvidia-laptop-userns.yml | 1 + .../recipe-silverblue-nvidia-laptop.yml | 1 + config/scripts/includewget.sh | 5 ++++ config/scripts/nvidiaoptimusworkaround.sh | 8 ++++++ config/scripts/removecinnamonxsessions.sh | 6 +++++ 18 files changed, 219 insertions(+) create mode 100644 config/common/cinnamon-scripts.yml create mode 100644 config/common/nvidia-laptop-gnome-cinnamon-scripts.yml create mode 100644 config/recipes/desktop/recipe-cinnamon-main-userns.yml create mode 100644 config/recipes/desktop/recipe-cinnamon-main.yml create mode 100644 config/recipes/desktop/recipe-cinnamon-nvidia-userns.yml create mode 100644 config/recipes/desktop/recipe-cinnamon-nvidia.yml create mode 100644 config/recipes/laptop/recipe-cinnamon-main-laptop-userns.yml create mode 100644 config/recipes/laptop/recipe-cinnamon-main-laptop.yml create mode 100644 config/recipes/laptop/recipe-cinnamon-nvidia-laptop-userns.yml create mode 100644 config/recipes/laptop/recipe-cinnamon-nvidia-laptop.yml create mode 100644 config/scripts/nvidiaoptimusworkaround.sh create mode 100644 config/scripts/removecinnamonxsessions.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 00ce057..00900d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,8 @@ jobs: - recipes/desktop/recipe-silverblue-nvidia.yml - recipes/desktop/recipe-kinoite-main.yml - recipes/desktop/recipe-kinoite-nvidia.yml + - recipes/desktop/recipe-cinnamon-main.yml + - recipes/desktop/recipe-cinnamon-nvidia.yml - recipes/desktop/recipe-bluefin-main.yml - recipes/desktop/recipe-bluefin-nvidia.yml - recipes/desktop/recipe-sericea-main.yml @@ -56,6 +58,8 @@ jobs: - recipes/laptop/recipe-silverblue-nvidia-laptop.yml - recipes/laptop/recipe-kinoite-main-laptop.yml - recipes/laptop/recipe-kinoite-nvidia-laptop.yml + - recipes/laptop/recipe-cinnamon-main-laptop.yml + - recipes/laptop/recipe-cinnamon-nvidia-laptop.yml - recipes/laptop/recipe-bluefin-main-laptop.yml - recipes/laptop/recipe-bluefin-nvidia-laptop.yml - recipes/laptop/recipe-sericea-main-laptop.yml @@ -76,6 +80,8 @@ jobs: - recipes/desktop/recipe-silverblue-nvidia-userns.yml - recipes/desktop/recipe-kinoite-main-userns.yml - recipes/desktop/recipe-kinoite-nvidia-userns.yml + - recipes/desktop/recipe-cinnamon-main-userns.yml + - recipes/desktop/recipe-cinnamon-nvidia-userns.yml - recipes/desktop/recipe-bluefin-main-userns.yml - recipes/desktop/recipe-bluefin-nvidia-userns.yml - recipes/desktop/recipe-sericea-main-userns.yml @@ -87,6 +93,8 @@ jobs: - recipes/laptop/recipe-silverblue-nvidia-laptop-userns.yml - recipes/laptop/recipe-kinoite-main-laptop-userns.yml - recipes/laptop/recipe-kinoite-nvidia-laptop-userns.yml + - recipes/laptop/recipe-cinnamon-main-laptop-userns.yml + - recipes/laptop/recipe-cinnamon-nvidia-laptop-userns.yml - recipes/laptop/recipe-bluefin-main-laptop-userns.yml - recipes/laptop/recipe-bluefin-nvidia-laptop-userns.yml - recipes/laptop/recipe-sericea-main-laptop-userns.yml diff --git a/config/common/cinnamon-scripts.yml b/config/common/cinnamon-scripts.yml new file mode 100644 index 0000000..04219fd --- /dev/null +++ b/config/common/cinnamon-scripts.yml @@ -0,0 +1,3 @@ +type: script +scripts: + - removecinnamonxsessions.sh \ No newline at end of file diff --git a/config/common/nvidia-laptop-gnome-cinnamon-scripts.yml b/config/common/nvidia-laptop-gnome-cinnamon-scripts.yml new file mode 100644 index 0000000..6f35e19 --- /dev/null +++ b/config/common/nvidia-laptop-gnome-cinnamon-scripts.yml @@ -0,0 +1,3 @@ +type: script +scripts: + - nvidiaoptimusworkaround.sh \ No newline at end of file diff --git a/config/recipes/desktop/recipe-cinnamon-main-userns.yml b/config/recipes/desktop/recipe-cinnamon-main-userns.yml new file mode 100644 index 0000000..d46fc99 --- /dev/null +++ b/config/recipes/desktop/recipe-cinnamon-main-userns.yml @@ -0,0 +1,21 @@ +# image will be published to ghcr.io// +name: cinnamon-main-userns-hardened +# description will be included in the image's metadata +description: "Cinnamon main with some hardening applied" + +# the base image to build on top of (FROM) and the version tag to use +base-image: ghcr.io/ublue-os/cinnamon-main +image-version: 39 + +# list of modules, executed in order +# you can include multiple instances of the same module +modules: + - from-file: common/common-files.yml + - from-file: common/gui-packages.yml + - from-file: common/common-packages.yml + - from-file: common/remove-firefox.yml + - from-file: common/common-bling.yml + - from-file: common/common-scripts.yml + - from-file: common/gui-scripts.yml + - from-file: common/cinnamon-scripts.yml + - type: yafti \ No newline at end of file diff --git a/config/recipes/desktop/recipe-cinnamon-main.yml b/config/recipes/desktop/recipe-cinnamon-main.yml new file mode 100644 index 0000000..9326070 --- /dev/null +++ b/config/recipes/desktop/recipe-cinnamon-main.yml @@ -0,0 +1,23 @@ +# image will be published to ghcr.io// +name: cinnamon-main-hardened +# description will be included in the image's metadata +description: "Cinnamon main with some hardening applied" + +# the base image to build on top of (FROM) and the version tag to use +base-image: ghcr.io/ublue-os/cinnamon-main +image-version: 39 + +# list of modules, executed in order +# you can include multiple instances of the same module +modules: + - from-file: common/common-files.yml + - from-file: common/gui-packages.yml + - from-file: common/common-packages.yml + - from-file: common/remove-firefox.yml + - from-file: common/common-bling.yml + - from-file: common/common-scripts.yml + - from-file: common/gui-scripts.yml + - from-file: common/disableuserns-packages.yml + - from-file: common/disableuserns-scripts.yml + - from-file: common/cinnamon-scripts.yml + - type: yafti \ No newline at end of file diff --git a/config/recipes/desktop/recipe-cinnamon-nvidia-userns.yml b/config/recipes/desktop/recipe-cinnamon-nvidia-userns.yml new file mode 100644 index 0000000..b0deb3f --- /dev/null +++ b/config/recipes/desktop/recipe-cinnamon-nvidia-userns.yml @@ -0,0 +1,21 @@ +# image will be published to ghcr.io// +name: cinnamon-nvidia-userns-hardened +# description will be included in the image's metadata +description: "Cinnamon nvidia with some hardening applied" + +# the base image to build on top of (FROM) and the version tag to use +base-image: ghcr.io/ublue-os/cinnamon-nvidia +image-version: 39 + +# list of modules, executed in order +# you can include multiple instances of the same module +modules: + - from-file: common/common-files.yml + - from-file: common/gui-packages.yml + - from-file: common/common-packages.yml + - from-file: common/remove-firefox.yml + - from-file: common/common-bling.yml + - from-file: common/common-scripts.yml + - from-file: common/gui-scripts.yml + - from-file: common/cinnamon-scripts.yml + - type: yafti \ No newline at end of file diff --git a/config/recipes/desktop/recipe-cinnamon-nvidia.yml b/config/recipes/desktop/recipe-cinnamon-nvidia.yml new file mode 100644 index 0000000..ff35e81 --- /dev/null +++ b/config/recipes/desktop/recipe-cinnamon-nvidia.yml @@ -0,0 +1,23 @@ +# image will be published to ghcr.io// +name: cinnamon-nvidia-hardened +# description will be included in the image's metadata +description: "Cinnamon nvidia with some hardening applied" + +# the base image to build on top of (FROM) and the version tag to use +base-image: ghcr.io/ublue-os/cinnamon-nvidia +image-version: 39 + +# list of modules, executed in order +# you can include multiple instances of the same module +modules: + - from-file: common/common-files.yml + - from-file: common/gui-packages.yml + - from-file: common/common-packages.yml + - from-file: common/remove-firefox.yml + - from-file: common/common-bling.yml + - from-file: common/common-scripts.yml + - from-file: common/gui-scripts.yml + - from-file: common/disableuserns-packages.yml + - from-file: common/disableuserns-scripts.yml + - from-file: common/cinnamon-scripts.yml + - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-bluefin-nvidia-laptop-userns.yml b/config/recipes/laptop/recipe-bluefin-nvidia-laptop-userns.yml index 5a47446..dee0692 100644 --- a/config/recipes/laptop/recipe-bluefin-nvidia-laptop-userns.yml +++ b/config/recipes/laptop/recipe-bluefin-nvidia-laptop-userns.yml @@ -19,4 +19,5 @@ modules: - from-file: common/common-scripts.yml - from-file: common/gui-scripts.yml - from-file: common/bluefin-scripts.yml + - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-bluefin-nvidia-laptop.yml b/config/recipes/laptop/recipe-bluefin-nvidia-laptop.yml index 704e88d..2abc29e 100644 --- a/config/recipes/laptop/recipe-bluefin-nvidia-laptop.yml +++ b/config/recipes/laptop/recipe-bluefin-nvidia-laptop.yml @@ -21,4 +21,5 @@ modules: - from-file: common/bluefin-scripts.yml - from-file: common/disableuserns-packages.yml - from-file: common/disableuserns-scripts.yml + - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-cinnamon-main-laptop-userns.yml b/config/recipes/laptop/recipe-cinnamon-main-laptop-userns.yml new file mode 100644 index 0000000..acfe00d --- /dev/null +++ b/config/recipes/laptop/recipe-cinnamon-main-laptop-userns.yml @@ -0,0 +1,22 @@ +# image will be published to ghcr.io// +name: cinnamon-main-laptop-userns-hardened +# description will be included in the image's metadata +description: "Cinnamon main with some hardening applied, for laptops" + +# the base image to build on top of (FROM) and the version tag to use +base-image: ghcr.io/ublue-os/cinnamon-main +image-version: 39 + +# list of modules, executed in order +# you can include multiple instances of the same module +modules: + - from-file: common/common-files.yml + - from-file: common/gui-packages.yml + - from-file: common/common-packages.yml + - from-file: common/remove-firefox.yml + - from-file: common/common-bling.yml + - from-file: recipes/laptop/laptop-bling.yml + - from-file: common/common-scripts.yml + - from-file: common/gui-scripts.yml + - from-file: common/cinnamon-scripts.yml + - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-cinnamon-main-laptop.yml b/config/recipes/laptop/recipe-cinnamon-main-laptop.yml new file mode 100644 index 0000000..8312ea6 --- /dev/null +++ b/config/recipes/laptop/recipe-cinnamon-main-laptop.yml @@ -0,0 +1,24 @@ +# image will be published to ghcr.io// +name: cinnamon-main-laptop-hardened +# description will be included in the image's metadata +description: "Cinnamon main with some hardening applied, for laptops" + +# the base image to build on top of (FROM) and the version tag to use +base-image: ghcr.io/ublue-os/cinnamon-main +image-version: 39 + +# list of modules, executed in order +# you can include multiple instances of the same module +modules: + - from-file: common/common-files.yml + - from-file: common/gui-packages.yml + - from-file: common/common-packages.yml + - from-file: common/remove-firefox.yml + - from-file: common/common-bling.yml + - from-file: recipes/laptop/laptop-bling.yml + - from-file: common/common-scripts.yml + - from-file: common/gui-scripts.yml + - from-file: common/disableuserns-packages.yml + - from-file: common/disableuserns-scripts.yml + - from-file: common/cinnamon-scripts.yml + - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-cinnamon-nvidia-laptop-userns.yml b/config/recipes/laptop/recipe-cinnamon-nvidia-laptop-userns.yml new file mode 100644 index 0000000..4f573e6 --- /dev/null +++ b/config/recipes/laptop/recipe-cinnamon-nvidia-laptop-userns.yml @@ -0,0 +1,23 @@ +# image will be published to ghcr.io// +name: cinnamon-nvidia-laptop-userns-hardened +# description will be included in the image's metadata +description: "Cinnamon nvidia with some hardening applied, for laptops" + +# the base image to build on top of (FROM) and the version tag to use +base-image: ghcr.io/ublue-os/cinnamon-nvidia +image-version: 39 + +# list of modules, executed in order +# you can include multiple instances of the same module +modules: + - from-file: common/common-files.yml + - from-file: common/gui-packages.yml + - from-file: common/common-packages.yml + - from-file: common/remove-firefox.yml + - from-file: common/common-bling.yml + - from-file: recipes/laptop/laptop-bling.yml + - from-file: common/common-scripts.yml + - from-file: common/gui-scripts.yml + - from-file: common/cinnamon-scripts.yml + - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml + - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-cinnamon-nvidia-laptop.yml b/config/recipes/laptop/recipe-cinnamon-nvidia-laptop.yml new file mode 100644 index 0000000..21b862c --- /dev/null +++ b/config/recipes/laptop/recipe-cinnamon-nvidia-laptop.yml @@ -0,0 +1,25 @@ +# image will be published to ghcr.io// +name: cinnamon-nvidia-laptop-hardened +# description will be included in the image's metadata +description: "Cinnamon nvidia with some hardening applied, for laptops" + +# the base image to build on top of (FROM) and the version tag to use +base-image: ghcr.io/ublue-os/cinnamon-nvidia +image-version: 39 + +# list of modules, executed in order +# you can include multiple instances of the same module +modules: + - from-file: common/common-files.yml + - from-file: common/gui-packages.yml + - from-file: common/common-packages.yml + - from-file: common/remove-firefox.yml + - from-file: common/common-bling.yml + - from-file: recipes/laptop/laptop-bling.yml + - from-file: common/common-scripts.yml + - from-file: common/gui-scripts.yml + - from-file: common/disableuserns-packages.yml + - from-file: common/disableuserns-scripts.yml + - from-file: common/cinnamon-scripts.yml + - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml + - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-silverblue-nvidia-laptop-userns.yml b/config/recipes/laptop/recipe-silverblue-nvidia-laptop-userns.yml index 4456aa5..1a5d706 100644 --- a/config/recipes/laptop/recipe-silverblue-nvidia-laptop-userns.yml +++ b/config/recipes/laptop/recipe-silverblue-nvidia-laptop-userns.yml @@ -19,4 +19,5 @@ modules: - from-file: recipes/laptop/laptop-bling.yml - from-file: common/common-scripts.yml - from-file: common/gui-scripts.yml + - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/recipes/laptop/recipe-silverblue-nvidia-laptop.yml b/config/recipes/laptop/recipe-silverblue-nvidia-laptop.yml index fc746e1..5184dbd 100644 --- a/config/recipes/laptop/recipe-silverblue-nvidia-laptop.yml +++ b/config/recipes/laptop/recipe-silverblue-nvidia-laptop.yml @@ -21,4 +21,5 @@ modules: - from-file: common/gui-scripts.yml - from-file: common/disableuserns-packages.yml - from-file: common/disableuserns-scripts.yml + - from-file: common/nvidia-laptop-gnome-cinnamon-scripts.yml - type: yafti \ No newline at end of file diff --git a/config/scripts/includewget.sh b/config/scripts/includewget.sh index b644563..04faba2 100644 --- a/config/scripts/includewget.sh +++ b/config/scripts/includewget.sh @@ -1 +1,6 @@ +#!/usr/bin/env bash + +# Tell build process to exit if there are any errors. +set -oue pipefail + rpm-ostree install wget \ No newline at end of file diff --git a/config/scripts/nvidiaoptimusworkaround.sh b/config/scripts/nvidiaoptimusworkaround.sh new file mode 100644 index 0000000..57296f2 --- /dev/null +++ b/config/scripts/nvidiaoptimusworkaround.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# Tell build process to exit if there are any errors. +set -oue pipefail + +# applies workaround for known issue with optimus laptops for GNOME and Cinnamon +# https://gitlab.gnome.org/GNOME/mutter/-/issues/2969 +echo "__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json" >> /usr/etc/environment diff --git a/config/scripts/removecinnamonxsessions.sh b/config/scripts/removecinnamonxsessions.sh new file mode 100644 index 0000000..4ba21cc --- /dev/null +++ b/config/scripts/removecinnamonxsessions.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# Tell build process to exit if there are any errors. +set -oue pipefail + +rm /usr/share/xsessions/* \ No newline at end of file