From b50871bc58335b7e4293858c87f84d790776721b Mon Sep 17 00:00:00 2001 From: Gerald Pinder <717217-gmpinder@users.noreply.gitlab.com> Date: Sat, 28 Oct 2023 04:46:49 +0000 Subject: [PATCH] Modules setup --- .gitignore | 2 +- .gitlab-ci.yml | 6 +- .../containerfiles/xboxdrv/Containerfile | 0 .../rules.d/99-8bitdo-ultimate-xinput.rules | 0 .../system/8bitdo-ultimate-xinput@.service | 0 .../etc/modprobe.d/hda-jack-retaks.conf | 0 .../lib/firmware/hda-jack-retask.fw | 0 .../distrobox}/etc/distrobox/distrobox.ini | 0 .../etc/systemd/system/frpintd.service | 0 .../framework-13}/etc/tlp.d/50-framework.conf | 0 .../services/steam-local-transfer.xml | 0 .../firstboot/launcher/autostart.desktop | 0 .../ublue-os/firstboot/launcher/autostart.sh | 0 .../firstboot/launcher/launcher-flowchart.png | Bin .../firstboot/launcher/login-profile.sh | 0 .../usr}/share/ublue-os/firstboot/yafti.yml | 0 .../usr}/share/ublue-os/just/custom.just | 0 config/framework.yml | 10 ++ config/jp-apps.yml | 56 ++++++++ config/recipe-cp-laptop.yml | 18 +++ config/recipe-jp-desktop.yml | 14 ++ config/recipe-jp-laptop.yml | 7 + {scripts => config/scripts}/README.md | 0 .../post => config/scripts}/enable-crond.sh | 0 .../scripts}/install-codelldb.sh | 0 .../scripts}/install-intellij.sh | 0 .../scripts}/install-rubymine.sh | 0 .../scripts}/install-syncthing.sh | 0 {scripts => config/scripts}/setup-kubectl.sh | 0 .../scripts}/setup-selinux-dockersock.sh | 0 {scripts => config/scripts}/setup-vscode.sh | 0 {scripts/post => modules}/.gitkeep | 0 recipe-cp.yml | 36 ----- recipe-desktop.yml | 77 ----------- recipe-framework-13.yml | 73 ---------- scripts/pre/.gitkeep | 0 usr/bin/ublue-nix-install | 130 ------------------ usr/bin/ublue-nix-uninstall | 86 ------------ 38 files changed, 109 insertions(+), 406 deletions(-) rename containerfiles/xboxdrv => config/containerfiles/xboxdrv/Containerfile (100%) rename {usr-8bitdo-ultimate => config/files/8bitdo-ultimate}/etc/udev/rules.d/99-8bitdo-ultimate-xinput.rules (100%) rename {usr-8bitdo-ultimate => config/files/8bitdo-ultimate}/lib/systemd/system/8bitdo-ultimate-xinput@.service (100%) rename {usr-desktop-audio => config/files/desktop-audio}/etc/modprobe.d/hda-jack-retaks.conf (100%) rename {usr-desktop-audio => config/files/desktop-audio}/lib/firmware/hda-jack-retask.fw (100%) rename {usr-distrobox => config/files/distrobox}/etc/distrobox/distrobox.ini (100%) rename {usr-framework => config/files/framework-13}/etc/systemd/system/frpintd.service (100%) rename {usr-framework => config/files/framework-13}/etc/tlp.d/50-framework.conf (100%) rename {usr-steam-firewall => config/files/steam-firewall}/etc/firewalld/services/steam-local-transfer.xml (100%) rename {usr => config/files/usr}/share/ublue-os/firstboot/launcher/autostart.desktop (100%) rename {usr => config/files/usr}/share/ublue-os/firstboot/launcher/autostart.sh (100%) rename {usr => config/files/usr}/share/ublue-os/firstboot/launcher/launcher-flowchart.png (100%) rename {usr => config/files/usr}/share/ublue-os/firstboot/launcher/login-profile.sh (100%) rename {usr => config/files/usr}/share/ublue-os/firstboot/yafti.yml (100%) rename {usr => config/files/usr}/share/ublue-os/just/custom.just (100%) create mode 100644 config/framework.yml create mode 100644 config/jp-apps.yml create mode 100644 config/recipe-cp-laptop.yml create mode 100644 config/recipe-jp-desktop.yml create mode 100644 config/recipe-jp-laptop.yml rename {scripts => config/scripts}/README.md (100%) rename {scripts/post => config/scripts}/enable-crond.sh (100%) rename {scripts => config/scripts}/install-codelldb.sh (100%) rename {scripts => config/scripts}/install-intellij.sh (100%) rename {scripts => config/scripts}/install-rubymine.sh (100%) rename {scripts => config/scripts}/install-syncthing.sh (100%) rename {scripts => config/scripts}/setup-kubectl.sh (100%) rename {scripts => config/scripts}/setup-selinux-dockersock.sh (100%) rename {scripts => config/scripts}/setup-vscode.sh (100%) rename {scripts/post => modules}/.gitkeep (100%) delete mode 100644 recipe-cp.yml delete mode 100644 recipe-desktop.yml delete mode 100644 recipe-framework-13.yml delete mode 100644 scripts/pre/.gitkeep delete mode 100644 usr/bin/ublue-nix-install delete mode 100755 usr/bin/ublue-nix-uninstall diff --git a/.gitignore b/.gitignore index 2c3f78d..80a39f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .idea cosign.key -Containerfile +/Containerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1da877b..7fbcad7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,6 @@ include: parallel: matrix: - RECIPE: - - recipe-desktop.yml - - recipe-framework-13.yml - - recipe-cp.yml + - recipe-jp-desktop.yml + - recipe-jp-laptop.yml + - recipe-cp-laptop.yml diff --git a/containerfiles/xboxdrv b/config/containerfiles/xboxdrv/Containerfile similarity index 100% rename from containerfiles/xboxdrv rename to config/containerfiles/xboxdrv/Containerfile diff --git a/usr-8bitdo-ultimate/etc/udev/rules.d/99-8bitdo-ultimate-xinput.rules b/config/files/8bitdo-ultimate/etc/udev/rules.d/99-8bitdo-ultimate-xinput.rules similarity index 100% rename from usr-8bitdo-ultimate/etc/udev/rules.d/99-8bitdo-ultimate-xinput.rules rename to config/files/8bitdo-ultimate/etc/udev/rules.d/99-8bitdo-ultimate-xinput.rules diff --git a/usr-8bitdo-ultimate/lib/systemd/system/8bitdo-ultimate-xinput@.service b/config/files/8bitdo-ultimate/lib/systemd/system/8bitdo-ultimate-xinput@.service similarity index 100% rename from usr-8bitdo-ultimate/lib/systemd/system/8bitdo-ultimate-xinput@.service rename to config/files/8bitdo-ultimate/lib/systemd/system/8bitdo-ultimate-xinput@.service diff --git a/usr-desktop-audio/etc/modprobe.d/hda-jack-retaks.conf b/config/files/desktop-audio/etc/modprobe.d/hda-jack-retaks.conf similarity index 100% rename from usr-desktop-audio/etc/modprobe.d/hda-jack-retaks.conf rename to config/files/desktop-audio/etc/modprobe.d/hda-jack-retaks.conf diff --git a/usr-desktop-audio/lib/firmware/hda-jack-retask.fw b/config/files/desktop-audio/lib/firmware/hda-jack-retask.fw similarity index 100% rename from usr-desktop-audio/lib/firmware/hda-jack-retask.fw rename to config/files/desktop-audio/lib/firmware/hda-jack-retask.fw diff --git a/usr-distrobox/etc/distrobox/distrobox.ini b/config/files/distrobox/etc/distrobox/distrobox.ini similarity index 100% rename from usr-distrobox/etc/distrobox/distrobox.ini rename to config/files/distrobox/etc/distrobox/distrobox.ini diff --git a/usr-framework/etc/systemd/system/frpintd.service b/config/files/framework-13/etc/systemd/system/frpintd.service similarity index 100% rename from usr-framework/etc/systemd/system/frpintd.service rename to config/files/framework-13/etc/systemd/system/frpintd.service diff --git a/usr-framework/etc/tlp.d/50-framework.conf b/config/files/framework-13/etc/tlp.d/50-framework.conf similarity index 100% rename from usr-framework/etc/tlp.d/50-framework.conf rename to config/files/framework-13/etc/tlp.d/50-framework.conf diff --git a/usr-steam-firewall/etc/firewalld/services/steam-local-transfer.xml b/config/files/steam-firewall/etc/firewalld/services/steam-local-transfer.xml similarity index 100% rename from usr-steam-firewall/etc/firewalld/services/steam-local-transfer.xml rename to config/files/steam-firewall/etc/firewalld/services/steam-local-transfer.xml diff --git a/usr/share/ublue-os/firstboot/launcher/autostart.desktop b/config/files/usr/share/ublue-os/firstboot/launcher/autostart.desktop similarity index 100% rename from usr/share/ublue-os/firstboot/launcher/autostart.desktop rename to config/files/usr/share/ublue-os/firstboot/launcher/autostart.desktop diff --git a/usr/share/ublue-os/firstboot/launcher/autostart.sh b/config/files/usr/share/ublue-os/firstboot/launcher/autostart.sh similarity index 100% rename from usr/share/ublue-os/firstboot/launcher/autostart.sh rename to config/files/usr/share/ublue-os/firstboot/launcher/autostart.sh diff --git a/usr/share/ublue-os/firstboot/launcher/launcher-flowchart.png b/config/files/usr/share/ublue-os/firstboot/launcher/launcher-flowchart.png similarity index 100% rename from usr/share/ublue-os/firstboot/launcher/launcher-flowchart.png rename to config/files/usr/share/ublue-os/firstboot/launcher/launcher-flowchart.png diff --git a/usr/share/ublue-os/firstboot/launcher/login-profile.sh b/config/files/usr/share/ublue-os/firstboot/launcher/login-profile.sh similarity index 100% rename from usr/share/ublue-os/firstboot/launcher/login-profile.sh rename to config/files/usr/share/ublue-os/firstboot/launcher/login-profile.sh diff --git a/usr/share/ublue-os/firstboot/yafti.yml b/config/files/usr/share/ublue-os/firstboot/yafti.yml similarity index 100% rename from usr/share/ublue-os/firstboot/yafti.yml rename to config/files/usr/share/ublue-os/firstboot/yafti.yml diff --git a/usr/share/ublue-os/just/custom.just b/config/files/usr/share/ublue-os/just/custom.just similarity index 100% rename from usr/share/ublue-os/just/custom.just rename to config/files/usr/share/ublue-os/just/custom.just diff --git a/config/framework.yml b/config/framework.yml new file mode 100644 index 0000000..68eed8a --- /dev/null +++ b/config/framework.yml @@ -0,0 +1,10 @@ +modules: + - type: files + files: + - framework-13: /usr + - type: rpm-ostree + install: + - fprintd + - fprintd-pam + - tlp + - powertop diff --git a/config/jp-apps.yml b/config/jp-apps.yml new file mode 100644 index 0000000..2e35992 --- /dev/null +++ b/config/jp-apps.yml @@ -0,0 +1,56 @@ +modules: + - type: files + files: + - usr: /usr + - distrobox: /usr + - type: script + scripts: + - install-syncthing.sh + - setup-kubectl.sh + - setup-vscode.sh + - type: rpm-ostree + repos: + - https://pkg.earthly.dev/earthly.repo + - https://copr.fedorainfracloud.org/coprs/varlad/helix/repo/fedora-%OS_VERSION%/varlad-helix-fedora-%OS_VERSION%.repo + - https://pkgs.tailscale.com/stable/fedora/%OS_VERSION%/tailscale.repo + install: + - libadwaita + - cmake + - code + - cronie + - neofetch + - virt-manager + - plasma-browser-integration + - "gcc-c++" + - id3v2 + - docker + - xinput + - earthly + - kubectl + - helm + - neovim + - ripgrep + - helix + - tailscale + - strawberry + remove: + - firefox + - firefox-langpacks + - type: script + scripts: + - setup-selinux-dockersock.sh + - install-codelldb.sh + # - type: yafti + # flatpaks: + # - Krita: org.kde.krita + # - Discord: com.discordapp.Discord + # - Steam: com.valvesoftware.Steam + # - Mangohud: com.valvesoftware.Steam.Utility.MangoHud + # - Gamescope: com.valvesoftware.Steam.Utility.gamescope + # - Brave: com.brave.Browser + # - Flatseal: com.github.tchx84.Flatseal + # - Nextcloud: com.nextcloud.desktopclient.nextcloud + # - Bottles: com.usebottles.bottles + # - Obsidian: md.obsidian.Obsidian + # - R2Modman: io.github.Foldex.r2modman + # - Mediawriter: org.fedoraproject.MediaWriter diff --git a/config/recipe-cp-laptop.yml b/config/recipe-cp-laptop.yml new file mode 100644 index 0000000..b0b50ba --- /dev/null +++ b/config/recipe-cp-laptop.yml @@ -0,0 +1,18 @@ +name: cp-laptop +base-image: ghcr.io/ublue-os/cinnamon-main +image-version: 38 +description: The image of Wunker OS for CP's laptop. +modules: + - type: files + files: + - usr: /usr + - from-file: framework.yml + - type: rpm-ostree + install: + - libadwaita + - cronie + - type: yafti + custom-flatpaks: + - Discord: com.discordapp.Discord + - Nextcloud: com.nextcloud.desktopclient.nextcloud + - Chrome: com.google.Chrome diff --git a/config/recipe-jp-desktop.yml b/config/recipe-jp-desktop.yml new file mode 100644 index 0000000..f601ed9 --- /dev/null +++ b/config/recipe-jp-desktop.yml @@ -0,0 +1,14 @@ +name: jp-desktop +base-image: ghcr.io/ublue-os/kinoite-nvidia +image-version: 38 +description: The image of Wunker OS for JP's desktop. +modules: + - type: files + files: + - 8bitdo-ultimate: /usr + - steam-firewall: /usr + - desktop-audio: /usr + - type: containerfile + containerfiles: + - xboxdrv + - from-file: jp-apps.yml diff --git a/config/recipe-jp-laptop.yml b/config/recipe-jp-laptop.yml new file mode 100644 index 0000000..e7d8fe2 --- /dev/null +++ b/config/recipe-jp-laptop.yml @@ -0,0 +1,7 @@ +name: jp-laptop +base-image: ghcr.io/ublue-os/kinoite-main +image-version: 38 +description: The image of Wunker OS for JP's Laptop. +modules: + - from-file: jp-apps.yml + - from-file: framework.yml diff --git a/scripts/README.md b/config/scripts/README.md similarity index 100% rename from scripts/README.md rename to config/scripts/README.md diff --git a/scripts/post/enable-crond.sh b/config/scripts/enable-crond.sh similarity index 100% rename from scripts/post/enable-crond.sh rename to config/scripts/enable-crond.sh diff --git a/scripts/install-codelldb.sh b/config/scripts/install-codelldb.sh similarity index 100% rename from scripts/install-codelldb.sh rename to config/scripts/install-codelldb.sh diff --git a/scripts/install-intellij.sh b/config/scripts/install-intellij.sh similarity index 100% rename from scripts/install-intellij.sh rename to config/scripts/install-intellij.sh diff --git a/scripts/install-rubymine.sh b/config/scripts/install-rubymine.sh similarity index 100% rename from scripts/install-rubymine.sh rename to config/scripts/install-rubymine.sh diff --git a/scripts/install-syncthing.sh b/config/scripts/install-syncthing.sh similarity index 100% rename from scripts/install-syncthing.sh rename to config/scripts/install-syncthing.sh diff --git a/scripts/setup-kubectl.sh b/config/scripts/setup-kubectl.sh similarity index 100% rename from scripts/setup-kubectl.sh rename to config/scripts/setup-kubectl.sh diff --git a/scripts/setup-selinux-dockersock.sh b/config/scripts/setup-selinux-dockersock.sh similarity index 100% rename from scripts/setup-selinux-dockersock.sh rename to config/scripts/setup-selinux-dockersock.sh diff --git a/scripts/setup-vscode.sh b/config/scripts/setup-vscode.sh similarity index 100% rename from scripts/setup-vscode.sh rename to config/scripts/setup-vscode.sh diff --git a/scripts/post/.gitkeep b/modules/.gitkeep similarity index 100% rename from scripts/post/.gitkeep rename to modules/.gitkeep diff --git a/recipe-cp.yml b/recipe-cp.yml deleted file mode 100644 index 1ba0657..0000000 --- a/recipe-cp.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: cp-laptop -base-image: ghcr.io/ublue-os/cinnamon-main -fedora-version: 38 -description: The image of Wunker OS for CP's laptop. -usr-dirs: - - usr-framework -# scripts: -# pre: [] -# post: [] -rpm: - # A list of urls of ".repo" files that should be added to your system. - # This is the proper way to add custom COPR repos to your image. - # Tip: Use `%FEDORA_VERSION%` instead of static Fedora version numbers, - # so that your repos automatically use your image's actual Fedora version, - # which greatly simplifies future maintenance of your custom recipe. - # repos: [] - install: - # Needed for yafti (the first boot installer). Remove if you're not using yafti. - - python3-pip - # GNOME's GTK4 theme, Libadwaita. Already included in Silverblue, but not - # other spins. You can remove if you aren't using yafti, but many native - # apps and binaries require it, so it's a good idea to always include it - # if you ever download or compile any custom software on your machine. - - libadwaita - - cronie - - fprintd - - fprintd-pam - - tlp - - powertop - # remove: [] -firstboot: - yafti: true - flatpaks: - - com.discordapp.Discord - - com.nextcloud.desktopclient.nextcloud - - com.google.Chrome diff --git a/recipe-desktop.yml b/recipe-desktop.yml deleted file mode 100644 index 7b7d4a3..0000000 --- a/recipe-desktop.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: jp-desktop -base-image: ghcr.io/ublue-os/kinoite-nvidia -fedora-version: 38 -description: The image of Wunker OS for JP's desktop. -usr-dir-overlays: - - usr-distrobox - - usr-8bitdo-ultimate - - usr-steam-firewall - - usr-desktop-audio -containerfiles: - pre: - - xboxdrv -scripts: - pre: - - install-syncthing.sh - - setup-kubectl.sh - - setup-vscode.sh - post: - - setup-selinux-dockersock.sh - - install-codelldb.sh -rpm: - # A list of urls of ".repo" files that should be added to your system. - # This is the proper way to add custom COPR repos to your image. - # Tip: Use `%FEDORA_VERSION%` instead of static Fedora version numbers, - # so that your repos automatically use your image's actual Fedora version, - # which greatly simplifies future maintenance of your custom recipe. - repos: - - https://pkg.earthly.dev/earthly.repo - - https://copr.fedorainfracloud.org/coprs/varlad/helix/repo/fedora-%FEDORA_VERSION%/varlad-helix-fedora-%FEDORA_VERSION%.repo - - https://pkgs.tailscale.com/stable/fedora/%FEDORA_VERSION%/tailscale.repo - install: - # Needed for yafti (the first boot installer). Remove if you're not using yafti. - - python3-pip - # GNOME's GTK4 theme, Libadwaita. Already included in Silverblue, but not - # other spins. You can remove if you aren't using yafti, but many native - # apps and binaries require it, so it's a good idea to always include it - # if you ever download or compile any custom software on your machine. - - libadwaita - - cmake - - code - - cronie - - neofetch - - virt-manager - - plasma-browser-integration - - "gcc-c++" - - id3v2 - - docker - - xinput - - earthly - - kubectl - - helm - - neovim - - ripgrep - - helix - - tailscale - - strawberry - remove: - # Remove the native firefox (from Fedora) in favor of the Flatpak. - - firefox - - firefox-langpacks -firstboot: - yafti: false - flatpaks: - - io.github.celluloid_player.Celluloid - - org.kde.krita - - com.discordapp.Discord - - com.valvesoftware.Steam - - com.valvesoftware.Steam.Utility.MangoHud - - com.valvesoftware.Steam.Utility.gamescope - - com.brave.Browser - - com.github.tchx84.Flatseal - - com.nextcloud.desktopclient.nextcloud - - com.usebottles.bottles - - md.obsidian.Obsidian - - io.github.Foldex.r2modman - - org.fedoraproject.MediaWriter - - org.strawberrymusicplayer.strawberry diff --git a/recipe-framework-13.yml b/recipe-framework-13.yml deleted file mode 100644 index 1eb84e1..0000000 --- a/recipe-framework-13.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: jp-laptop -base-image: ghcr.io/ublue-os/kinoite-main -fedora-version: 38 -description: The image of Wunker OS for JP's Laptop. -usr-dir-overlays: - - usr-distrobox - - usr-framework -scripts: - pre: - - install-syncthing.sh - - setup-kubectl.sh - - setup-vscode.sh - post: - - setup-selinux-dockersock.sh - - install-codelldb.sh -rpm: - # A list of urls of ".repo" files that should be added to your system. - # This is the proper way to add custom COPR repos to your image. - # Tip: Use `%FEDORA_VERSION%` instead of static Fedora version numbers, - # so that your repos automatically use your image's actual Fedora version, - # which greatly simplifies future maintenance of your custom recipe. - repos: - - https://pkg.earthly.dev/earthly.repo - - https://copr.fedorainfracloud.org/coprs/varlad/helix/repo/fedora-%FEDORA_VERSION%/varlad-helix-fedora-%FEDORA_VERSION%.repo - - https://pkgs.tailscale.com/stable/fedora/%FEDORA_VERSION%/tailscale.repo - install: - # Needed for yafti (the first boot installer). Remove if you're not using yafti. - - python3-pip - # GNOME's GTK4 theme, Libadwaita. Already included in Silverblue, but not - # other spins. You can remove if you aren't using yafti, but many native - # apps and binaries require it, so it's a good idea to always include it - # if you ever download or compile any custom software on your machine. - - libadwaita - - cmake - - code - - cronie - - fprintd - - fprintd-pam - - tlp - - powertop - - neofetch - - virt-manager - - plasma-browser-integration - - "gcc-c++" - - docker - - id3v2 - - xinput - - earthly - - kubectl - - helm - - neovim - - ripgrep - - helix - - strawberry - - tailscale - - alacritty - remove: - # Remove the native firefox (from Fedora) in favor of the Flatpak. - - firefox - - firefox-langpacks -firstboot: - yafti: false - flatpaks: - - io.github.celluloid_player.Celluloid - - org.kde. - - com.discordapp.Discord - - com.brave.Browser - - com.github.tchx84.Flatseal - - com.nextcloud.desktopclient.nextcloud - - com.usebottles.bottles - - md.obsidian.Obsidian - - org.fedoraproject.MediaWriter - - org.strawberrymusicplayer.strawberry diff --git a/scripts/pre/.gitkeep b/scripts/pre/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/usr/bin/ublue-nix-install b/usr/bin/ublue-nix-install deleted file mode 100644 index 28c79fa..0000000 --- a/usr/bin/ublue-nix-install +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash -# original script here: https://github.com/dnkmmr69420/nix-with-selinux/blob/main/silverblue-installer.sh -# thanks dnkmmr! - -sudo sleep 2 -echo "Adding SELinux content to /nix" -sudo semanage fcontext -a -t etc_t '/nix/store/[^/]+/etc(/.*)?' ; sudo semanage fcontext -a -t lib_t '/nix/store/[^/]+/lib(/.*)?' ; sudo semanage fcontext -a -t systemd_unit_file_t '/nix/store/[^/]+/lib/systemd/system(/.*)?' ; sudo semanage fcontext -a -t man_t '/nix/store/[^/]+/man(/.*)?' ; sudo semanage fcontext -a -t bin_t '/nix/store/[^/]+/s?bin(/.*)?' ; sudo semanage fcontext -a -t usr_t '/nix/store/[^/]+/share(/.*)?' ; sudo semanage fcontext -a -t var_run_t '/nix/var/nix/daemon-socket(/.*)?' ; sudo semanage fcontext -a -t usr_t '/nix/var/nix/profiles(/per-user/[^/]+)?/[^/]+' -sleep 1 -sudo mkdir /var/lib/nix -sleep 1 -echo "Adding SELinux content to /var/lib/nix" -sudo semanage fcontext -a -t etc_t '/var/lib/nix/store/[^/]+/etc(/.*)?' ; sudo semanage fcontext -a -t lib_t '/var/lib/nix/store/[^/]+/lib(/.*)?' ; sudo semanage fcontext -a -t systemd_unit_file_t '/var/lib/nix/store/[^/]+/lib/systemd/system(/.*)?' ; sudo semanage fcontext -a -t man_t '/var/lib/nix/store/[^/]+/man(/.*)?' ; sudo semanage fcontext -a -t bin_t '/var/lib/nix/store/[^/]+/s?bin(/.*)?' ; sudo semanage fcontext -a -t usr_t '/var/lib/nix/store/[^/]+/share(/.*)?' ; sudo semanage fcontext -a -t var_run_t '/var/lib/nix/var/nix/daemon-socket(/.*)?' ; sudo semanage fcontext -a -t usr_t '/var/lib/nix/var/nix/profiles(/per-user/[^/]+)?/[^/]+' -echo "Creating service files" -sleep 1 -sleep 1 -echo "Creating rootfs mkdir service" - -sudo tee /etc/systemd/system/mkdir-rootfs@.service <&2 -} - -if [ "$EUID" = 0 ] ; then - log WARNING "Do not run this command as root, as it won't delete proper files in your system" - exit -fi - -if [ "$USER_WARNING" = 1 ] ; then - cat <