diff --git a/system_files/bluefin/etc/ublue-os/bazaar/bazaar.yaml b/system_files/bluefin/etc/bazaar/bazaar.yaml similarity index 100% rename from system_files/bluefin/etc/ublue-os/bazaar/bazaar.yaml rename to system_files/bluefin/etc/bazaar/bazaar.yaml diff --git a/system_files/bluefin/etc/ublue-os/bazaar/blocklist.yaml b/system_files/bluefin/etc/bazaar/blocklist.yaml similarity index 100% rename from system_files/bluefin/etc/ublue-os/bazaar/blocklist.yaml rename to system_files/bluefin/etc/bazaar/blocklist.yaml diff --git a/system_files/bluefin/etc/ublue-os/bazaar/content.yaml b/system_files/bluefin/etc/bazaar/content.yaml similarity index 100% rename from system_files/bluefin/etc/ublue-os/bazaar/content.yaml rename to system_files/bluefin/etc/bazaar/content.yaml diff --git a/system_files/bluefin/etc/environment b/system_files/bluefin/etc/environment new file mode 100644 index 0000000..070ddee --- /dev/null +++ b/system_files/bluefin/etc/environment @@ -0,0 +1,2 @@ +MUTTER_DEBUG_KMS_THREAD_TYPE=user +GNOME_SHELL_SLOWDOWN_FACTOR=0.8 diff --git a/system_files/bluefin/etc/systemd/user.conf b/system_files/bluefin/etc/systemd/user.conf new file mode 100644 index 0000000..b9fcbc8 --- /dev/null +++ b/system_files/bluefin/etc/systemd/user.conf @@ -0,0 +1,41 @@ +[Manager] +#LogLevel=info +#LogTarget=auto +#LogColor=yes +#LogLocation=no +#LogTime=no +#SystemCallArchitectures= +#TimerSlackNSec= +#StatusUnitFormat=combined +#DefaultTimerAccuracySec=1min +#DefaultStandardOutput=inherit +#DefaultStandardError=inherit +#DefaultTimeoutStartSec=45s +DefaultTimeoutStopSec=15s +#DefaultTimeoutAbortSec= +#DefaultDeviceTimeoutSec=45s +#DefaultRestartSec=100ms +#DefaultStartLimitIntervalSec=10s +#DefaultStartLimitBurst=5 +#DefaultEnvironment= +#DefaultLimitCPU= +#DefaultLimitFSIZE= +#DefaultLimitDATA= +#DefaultLimitSTACK= +#DefaultLimitCORE= +#DefaultLimitRSS= +DefaultLimitNOFILE=4096:524288 +#DefaultLimitAS= +#DefaultLimitNPROC= +#DefaultLimitMEMLOCK= +#DefaultLimitLOCKS= +#DefaultLimitSIGPENDING= +#DefaultLimitMSGQUEUE= +#DefaultLimitNICE= +#DefaultLimitRTPRIO= +#DefaultLimitRTTIME= +#DefaultMemoryPressureThresholdSec=200ms +#DefaultMemoryPressureWatch=auto +#DefaultSmackProcessLabel= +#ReloadLimitIntervalSec= +#ReloadLimitBurst diff --git a/system_files/bluefin/etc/ublue-os/bling.json b/system_files/bluefin/etc/ublue-os/bling.json new file mode 100644 index 0000000..00d314d --- /dev/null +++ b/system_files/bluefin/etc/ublue-os/bling.json @@ -0,0 +1,3 @@ +{ + "bling-cli-name": "bluefin-cli" +} diff --git a/system_files/bluefin/etc/ublue-os/setup.json b/system_files/bluefin/etc/ublue-os/setup.json new file mode 100644 index 0000000..3567239 --- /dev/null +++ b/system_files/bluefin/etc/ublue-os/setup.json @@ -0,0 +1,4 @@ +{ + "check-secureboot": true, + "setup-version": 1 +} diff --git a/system_files/bluefin/etc/ublue-os/zsh/zlogin b/system_files/bluefin/etc/ublue-os/zsh/zlogin new file mode 100644 index 0000000..35fbb0a --- /dev/null +++ b/system_files/bluefin/etc/ublue-os/zsh/zlogin @@ -0,0 +1,26 @@ +#!/usr/bin/env zsh +# vim:syntax=zsh +# vim:filetype=zsh + +# Execute code in the background to not affect the current session +( + # + setopt LOCAL_OPTIONS EXTENDED_GLOB + autoload -U zrecompile + local ZSHCONFIG="${ZDOTDIR:-$HOME}/.zsh" + + # Compile zcompdump, if modified, to increase startup speed. + zcompdump="${ZDOTDIR:-$HOME}/.zcompdump" + if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then + zrecompile -pq "$zcompdump" + fi + # zcompile .zshrc + zrecompile -pq ${ZDOTDIR:-${HOME}}/.zshrc + zrecompile -pq ${ZDOTDIR:-${HOME}}/.zprofile + zrecompile -pq ${ZDOTDIR:-${HOME}}/.zshenv + # recompile all zsh or sh + for f in $ZSHCONFIG/**/*.*sh + do + zrecompile -pq $f + done +) &! diff --git a/system_files/bluefin/etc/ublue-os/zsh/zlogout b/system_files/bluefin/etc/ublue-os/zsh/zlogout new file mode 100644 index 0000000..4ac56fa --- /dev/null +++ b/system_files/bluefin/etc/ublue-os/zsh/zlogout @@ -0,0 +1,3 @@ +#!/usr/bin/env zsh +# vim:syntax=zsh +# vim:filetype=zsh diff --git a/system_files/bluefin/etc/ublue-os/zsh/zprofile b/system_files/bluefin/etc/ublue-os/zsh/zprofile new file mode 100644 index 0000000..53bd212 --- /dev/null +++ b/system_files/bluefin/etc/ublue-os/zsh/zprofile @@ -0,0 +1,28 @@ +# vim:syntax=zsh +# vim:filetype=zsh + +# +# Executes commands at login before zshrc. +# +if [[ -z "$LANG" ]]; then + export LANG='en_US.UTF-8' + export LANGUAGE=en_US.UTF-8 +fi + +export LC_COLLATE=en_US.UTF-8 +export LC_CTYPE=en_US.UTF-8 +export LC_MESSAGES=en_US.UTF-8 +export LC_MONETARY=en_US.UTF-8 +export LC_NUMERIC=en_US.UTF-8 +export LC_TIME=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 +export LESSCHARSET=utf-8 + +# eliminates duplicates in *paths +typeset -gU cdpath fpath path + +# Zsh search path for executable +path=( + /usr/local/{bin,sbin} + $path +) diff --git a/system_files/bluefin/etc/ublue-os/zsh/zshenv b/system_files/bluefin/etc/ublue-os/zsh/zshenv new file mode 100644 index 0000000..23f3364 --- /dev/null +++ b/system_files/bluefin/etc/ublue-os/zsh/zshenv @@ -0,0 +1,20 @@ +#!/usr/bin/env zsh +# vim:syntax=zsh +# vim:filetype=zsh + +# https://blog.patshead.com/2011/04/improve-your-oh-my-zsh-startup-time-maybe.html +skip_global_compinit=1 + +# http://disq.us/p/f55b78 +setopt noglobalrcs + +export SYSTEM=$(uname -s) + +# https://github.com/sorin-ionescu/prezto/blob/master/runcoms/zshenv +# Ensure that a non-login, non-interactive shell has a defined environment. +if [[ ("$SHLVL" -eq 1 && ! -o LOGIN) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then + source "${ZDOTDIR:-$HOME}/.zprofile" +fi + +export PATH=$PATH:${HOME}/.bin +export PATH=$HOME/bin:/usr/local/bin:$PATH diff --git a/system_files/bluefin/etc/ublue-os/zsh/zshrc b/system_files/bluefin/etc/ublue-os/zsh/zshrc new file mode 100644 index 0000000..b363bee --- /dev/null +++ b/system_files/bluefin/etc/ublue-os/zsh/zshrc @@ -0,0 +1,225 @@ +#!/usr/bin/env zsh +# vim:syntax=zsh +# vim:filetype=zsh + +# +# .zshrc is sourced in interactive shells. +# It should contain commands to set up aliases, +# functions, options, key bindings, etc. +# + +# for profiling zsh +# https://unix.stackexchange.com/a/329719/27109 +# +# zmodload zsh/zprof + +# Load and initialize the completion system ignoring insecure directories with a +# cache time of 20 hours, so it should almost always regenerate the first time a +# shell is opened each day. +autoload -Uz compinit +_comp_path="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/zcompdump" +# #q expands globs in conditional expressions +if [[ $_comp_path(#qNmh-20) ]]; then + # -C (skip function check) implies -i (skip security check). + compinit -C -d "$_comp_path" +else + mkdir -p "$_comp_path:h" + compinit -i -d "$_comp_path" + # Keep $_comp_path younger than cache time even if it isn't regenerated. + touch "$_comp_path" +fi +unset _comp_path + +# +# Completions +# + +# load brew autocomplete +if [ -d "/home/linuxbrew/.linuxbrew/share/zsh/site-functions" ]; then + fpath+=(/home/linuxbrew/.linuxbrew/share/zsh/site-functions) +fi + +# +# Options +# + +setopt INC_APPEND_HISTORY # To save every command before it is executed +setopt SHARE_HISTORY # Share history between all sessions. +setopt APPEND_HISTORY # Append history to the history file. +setopt COMPLETE_IN_WORD # Complete from both ends of a word. +setopt ALWAYS_TO_END # Move cursor to the end of a completed word. +setopt PATH_DIRS # Perform path search even on command names with slashes. +setopt AUTO_MENU # Show completion menu on a successive tab press. +setopt AUTO_LIST # Automatically list choices on ambiguous completion. +setopt AUTO_PARAM_SLASH # If completed parameter is a directory, add a trailing slash. +setopt EXTENDED_GLOB # Needed for file modification glob modifiers with compinit. +unsetopt MENU_COMPLETE # Do not autoselect the first completion entry. +unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor. +setopt interactivecomments # Allow inline comments +setopt AUTO_CD # Auto changes to a directory without typing cd. + +# +# Variables +# + +export ZSHCONFIG=${ZDOTDIR:-$HOME}/.zsh + +ZSH_THEME="spaceship" + +# Standard style used by default for 'list-colors' +LS_COLORS=${LS_COLORS:-'di=34:ln=35:so=32:pi=33:ex=31:bd=36;01:cd=33;01:su=31;40;07:sg=36;40;07:tw=32;40;07:ow=33;40;07:'} + +# +# Styles +# + +# Defaults. +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} +zstyle ':completion:*:default' list-prompt '%S%M matches%s' + +# Use caching to make completion for commands such as dpkg and apt usable. +zstyle ':completion::complete:*' use-cache on +zstyle ':completion::complete:*' cache-path "${XDG_CACHE_HOME:-$HOME/.cache}/prezto/zcompcache" + +# Case-insensitive (all), partial-word, and then substring completion. +if zstyle -t ':prezto:module:completion:*' case-sensitive; then + zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + setopt CASE_GLOB +else + zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + unsetopt CASE_GLOB +fi + +# Group matches and describe. +zstyle ':completion:*:*:*:*:*' menu select +zstyle ':completion:*:matches' group 'yes' +zstyle ':completion:*:options' description 'yes' +zstyle ':completion:*:options' auto-description '%d' +zstyle ':completion:*:corrections' format ' %F{green}-- %d (errors: %e) --%f' +zstyle ':completion:*:descriptions' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*:messages' format ' %F{purple} -- %d --%f' +zstyle ':completion:*:warnings' format ' %F{red}-- no matches found --%f' +zstyle ':completion:*' format ' %F{yellow}-- %d --%f' +zstyle ':completion:*' group-name '' +zstyle ':completion:*' verbose yes + +# Fuzzy match mistyped completions. +zstyle ':completion:*' completer _complete _match _approximate +zstyle ':completion:*:match:*' original only +zstyle ':completion:*:approximate:*' max-errors 1 numeric + +# Increase the number of errors based on the length of the typed word. But make +# sure to cap (at 7) the max-errors to avoid hanging. +zstyle -e ':completion:*:approximate:*' max-errors 'reply=($((($#PREFIX+$#SUFFIX)/3>7?7:($#PREFIX+$#SUFFIX)/3))numeric)' + +# Don't complete unavailable commands. +zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))' + +# Array completion element sorting. +zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters + +# Directories +zstyle ':completion:*:*:cd:*' tag-order local-directories directory-stack path-directories +zstyle ':completion:*:*:cd:*:directory-stack' menu yes select +zstyle ':completion:*:-tilde-:*' group-order 'named-directories' 'path-directories' 'users' 'expand' +zstyle ':completion:*' squeeze-slashes true + +# History +zstyle ':completion:*:history-words' stop yes +zstyle ':completion:*:history-words' remove-all-dups yes +zstyle ':completion:*:history-words' list false +zstyle ':completion:*:history-words' menu yes + +# Environment Variables +zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-value-*]#*,}%%,*}:#-*-} + +# Populate hostname completion. But allow ignoring custom entries from static +# */etc/hosts* which might be uninteresting. +zstyle -a ':prezto:module:completion:*:hosts' etc-host-ignores '_etc_host_ignores' + +zstyle -e ':completion:*:hosts' hosts 'reply=( + ${=${=${=${${(f)"$(cat {/etc/ssh/ssh_,~/.ssh/}known_hosts(|2)(N) 2> /dev/null)"}%%[#| ]*}//\]:[0-9]*/ }//,/ }//\[/ } + ${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2> /dev/null))"}%%(\#${_etc_host_ignores:+|${(j:|:)~_etc_host_ignores}})*} + ${=${${${${(@M)${(f)"$(cat ~/.ssh/config 2> /dev/null)"}:#Host *}#Host }:#*\**}:#*\?*}} +)' + +# Don't complete uninteresting users... +zstyle ':completion:*:*:*:users' ignored-patterns \ + adm amanda apache avahi beaglidx bin cacti canna clamav daemon \ + dbus distcache dovecot fax ftp games gdm gkrellmd gopher \ + hacluster haldaemon halt hsqldb ident junkbust ldap lp mail \ + mailman mailnull mldonkey mysql nagios \ + named netdump news nfsnobody nobody nscd ntp nut nx openvpn \ + operator pcap postfix postgres privoxy pulse pvm quagga radvd \ + rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs '_*' + +# Ignore multiple entries. +zstyle ':completion:*:(rm|kill|diff):*' ignore-line other +zstyle ':completion:*:rm:*' file-patterns '*:all-files' + +# Kill +zstyle ':completion:*:*:*:*:processes' command 'ps -u $LOGNAME -o pid,user,command -w' +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;36=0=01' +zstyle ':completion:*:*:kill:*' menu yes select +zstyle ':completion:*:*:kill:*' force-list always +zstyle ':completion:*:*:kill:*' insert-ids single + +# Man +zstyle ':completion:*:manuals' separate-sections true +zstyle ':completion:*:manuals.(^1*)' insert-sections true + +# Media Players +zstyle ':completion:*:*:mpg123:*' file-patterns '*.(mp3|MP3):mp3\ files *(-/):directories' +zstyle ':completion:*:*:mpg321:*' file-patterns '*.(mp3|MP3):mp3\ files *(-/):directories' +zstyle ':completion:*:*:ogg123:*' file-patterns '*.(ogg|OGG|flac):ogg\ files *(-/):directories' +zstyle ':completion:*:*:mocp:*' file-patterns '*.(wav|WAV|mp3|MP3|ogg|OGG|flac):ogg\ files *(-/):directories' + +# Mutt +if [[ -s "$HOME/.mutt/aliases" ]]; then + zstyle ':completion:*:*:mutt:*' menu yes select + zstyle ':completion:*:mutt:*' users ${${${(f)"$(<"$HOME/.mutt/aliases")"}#alias[[:space:]]}%%[[:space:]]*} +fi + +# SSH/SCP/RSYNC +zstyle ':completion:*:(ssh|scp|rsync):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' +zstyle ':completion:*:(scp|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr +zstyle ':completion:*:ssh:*' group-order users hosts-domain hosts-host users hosts-ipaddr +zstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-loopback localhost ip6-localhost broadcasthost +zstyle ':completion:*:(ssh|scp|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' +zstyle ':completion:*:(ssh|scp|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.0.<->' '255.255.255.255' '::1' 'fe80::*' + +autoload -U colors +colors + +##################### +# Sourcing +##################### + +# Brew +if [[ -o interactive ]] && [[ -d /home/linuxbrew/.linuxbrew ]]; then + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + if type brew &>/dev/null; then + if [[ -w /home/linuxbrew/.linuxbrew ]]; then + if [[ ! -L "$(brew --prefix)/share/zsh/site-functions/_brew" ]]; then + brew completions link + fi + fi + fi +fi + +# Starship +if type "starship" > /dev/null; then + eval "$(starship init zsh)" +fi + +##################### +# User configuration +##################### + +# Load user zsh scripts +if [ -d $ZSHCONFIG ]; then + for f in $ZSHCONFIG/**/*.*sh + do + source "$f" + done +fi diff --git a/system_files/bluefin/usr/lib/sysctl.d/80-inotify.conf b/system_files/bluefin/usr/lib/sysctl.d/80-inotify.conf new file mode 100644 index 0000000..984e27b --- /dev/null +++ b/system_files/bluefin/usr/lib/sysctl.d/80-inotify.conf @@ -0,0 +1,2 @@ +fs.inotify.max_user_instances=8192 +fs.inotify.max_user_watches=524288 diff --git a/system_files/bluefin/usr/lib/systemd/system/dconf-update.service b/system_files/bluefin/usr/lib/systemd/system/dconf-update.service new file mode 100644 index 0000000..8311c6f --- /dev/null +++ b/system_files/bluefin/usr/lib/systemd/system/dconf-update.service @@ -0,0 +1,10 @@ +[Unit] +Description=Update the dconf database onboot +Documentation=https://github.com/coreos/rpm-ostree/issues/1944 + +[Service] +Type=oneshot +ExecStart=/usr/bin/dconf update + +[Install] +WantedBy=multi-user.target diff --git a/system_files/bluefin/usr/lib/systemd/system/ublue-fix-hostname.service b/system_files/bluefin/usr/lib/systemd/system/ublue-fix-hostname.service new file mode 100644 index 0000000..1d24b20 --- /dev/null +++ b/system_files/bluefin/usr/lib/systemd/system/ublue-fix-hostname.service @@ -0,0 +1,10 @@ +[Unit] +Description=Workaround for the missing /etc/hostname file on Universal Blue systems +After=network.target +ConditionPathExists=!/etc/hostname + +[Service] +ExecStart=/usr/bin/touch /etc/hostname + +[Install] +WantedBy=default.target diff --git a/system_files/bluefin/usr/lib/systemd/system/ublue-guest-user.service b/system_files/bluefin/usr/lib/systemd/system/ublue-guest-user.service new file mode 100644 index 0000000..ad5d154 --- /dev/null +++ b/system_files/bluefin/usr/lib/systemd/system/ublue-guest-user.service @@ -0,0 +1,18 @@ +[Unit] +Description=Setup Guest User dotfiles +After=local-fs.target +ConditionHost=ContainerTestUblueOS +ConditionVirtualization=yes +ConditionPathExists=/var/home/ublue-os +ConditionPathExists=!/run/ostree-booted +ConditionPathExists=!/var/home/ublue-os/.%N.stamp + +[Service] +User=ublue-os +Type=oneshot +ExecStart=/usr/bin/cp -r /etc/skel/.* /var/home/ublue-os/ +ExecStart=/usr/bin/touch /var/home/ublue-os/.%N.stamp +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target default.target diff --git a/system_files/bluefin/usr/lib/systemd/user/bazaar.service b/system_files/bluefin/usr/lib/systemd/user/bazaar.service new file mode 100644 index 0000000..f8fee80 --- /dev/null +++ b/system_files/bluefin/usr/lib/systemd/user/bazaar.service @@ -0,0 +1,14 @@ +[Unit] +Description=Bazaar background service +Documentation=https://github.com/kolunmi/bazaar +After=graphical-session.target +StartLimitBurst=10 + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=flatpak run --command=bazaar io.github.kolunmi.Bazaar --no-window +StandardOutput=journal + +[Install] +WantedBy=graphical-session.target diff --git a/system_files/bluefin/usr/share/color/icc/colord/framework13.icc b/system_files/bluefin/usr/share/color/icc/colord/framework13.icc new file mode 100644 index 0000000..c9868a1 Binary files /dev/null and b/system_files/bluefin/usr/share/color/icc/colord/framework13.icc differ diff --git a/system_files/bluefin/usr/share/color/icc/colord/framework16.icc b/system_files/bluefin/usr/share/color/icc/colord/framework16.icc new file mode 100644 index 0000000..91ad5b2 Binary files /dev/null and b/system_files/bluefin/usr/share/color/icc/colord/framework16.icc differ diff --git a/system_files/bluefin/usr/share/fish/vendor_functions.d/fish_prompt.fish b/system_files/bluefin/usr/share/fish/vendor_functions.d/fish_prompt.fish new file mode 100644 index 0000000..21a7665 --- /dev/null +++ b/system_files/bluefin/usr/share/fish/vendor_functions.d/fish_prompt.fish @@ -0,0 +1,41 @@ +function fish_prompt --description 'Default prompt with container detection' + set -l last_pipestatus $pipestatus + set -lx __fish_last_status $status # Export for __fish_print_pipestatus. + set -l normal (set_color normal) + set -q fish_color_status + or set -g fish_color_status red + set -g fish_color_user brgreen + + # Color the prompt differently when we're root + set -l color_cwd $fish_color_cwd + set -l suffix '>' + if functions -q fish_is_root_user; and fish_is_root_user + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + end + set suffix '#' + end + + # Detect if we are in a container + if test -n "$CONTAINER_ID" + set -g prompt_host "[$CONTAINER_ID]" + set -g prefix_icon "📦 " + else + set -g prompt_host "$hostname" + set -g prefix_icon "" + end + + # Write pipestatus + # If the status was carried over (if no command is issued or if `set` leaves the status untouched), don't bold it. + set -l bold_flag --bold + set -q __fish_prompt_status_generation; or set -g __fish_prompt_status_generation $status_generation + if test $__fish_prompt_status_generation = $status_generation + set bold_flag + end + set __fish_prompt_status_generation $status_generation + set -l status_color (set_color $fish_color_status) + set -l statusb_color (set_color $bold_flag $fish_color_status) + set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus) + + echo -n -s $prefix_icon (set_color $fish_color_user) "$USER" $normal "@" $prompt_host' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) $normal " "$prompt_status $suffix " " +end diff --git a/system_files/bluefin/usr/share/ublue-os/firefox-config/01-bluefin-global.js b/system_files/bluefin/usr/share/ublue-os/firefox-config/01-bluefin-global.js new file mode 100644 index 0000000..d5d6b6b --- /dev/null +++ b/system_files/bluefin/usr/share/ublue-os/firefox-config/01-bluefin-global.js @@ -0,0 +1,3 @@ +// Bluefin Global +pref("gfx.webrender.all", true); +pref("media.ffmpeg.vaapi.enabled", true); diff --git a/system_files/bluefin/usr/share/ublue-os/flatpak-overrides/io.github.kolunmi.Bazaar b/system_files/bluefin/usr/share/ublue-os/flatpak-overrides/io.github.kolunmi.Bazaar new file mode 100644 index 0000000..92cc365 --- /dev/null +++ b/system_files/bluefin/usr/share/ublue-os/flatpak-overrides/io.github.kolunmi.Bazaar @@ -0,0 +1,2 @@ +[Context] +filesystems=host-etc diff --git a/system_files/bluefin/usr/share/ublue-os/privileged-setup.hooks.d/10-tailscale.sh b/system_files/bluefin/usr/share/ublue-os/privileged-setup.hooks.d/10-tailscale.sh new file mode 100755 index 0000000..d1ed1b8 --- /dev/null +++ b/system_files/bluefin/usr/share/ublue-os/privileged-setup.hooks.d/10-tailscale.sh @@ -0,0 +1,9 @@ +#!/usr/bin/bash + +source /usr/lib/ublue/setup-services/libsetup.sh + +version-script tailscale privileged 1 || exit 0 + +set -xeuo pipefail + +tailscale set --operator="$(getent passwd "$PKEXEC_UID" | cut -d: -f1)" diff --git a/system_files/bluefin/usr/share/ublue-os/privileged-setup.hooks.d/99-flatpaks.sh b/system_files/bluefin/usr/share/ublue-os/privileged-setup.hooks.d/99-flatpaks.sh new file mode 100755 index 0000000..0d00551 --- /dev/null +++ b/system_files/bluefin/usr/share/ublue-os/privileged-setup.hooks.d/99-flatpaks.sh @@ -0,0 +1,15 @@ +#!/usr/bin/bash + +source /usr/lib/ublue/setup-services/libsetup.sh + +version-script flatpaks privileged 1 || exit 0 + +set -x + +# Set up Firefox default configuration +ARCH=$(arch) +if [ "$ARCH" != "aarch64" ] ; then + mkdir -p "/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/${ARCH}/stable/defaults/pref" + rm -f "/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/${ARCH}/stable/defaults/pref/*bluefin*.js" + /usr/bin/cp -rf /usr/share/ublue-os/firefox-config/* "/var/lib/flatpak/extension/org.mozilla.firefox.systemconfig/${ARCH}/stable/defaults/pref/" +fi diff --git a/system_files/bluefin/usr/share/ublue-os/system-setup.hooks.d/10-framework.sh b/system_files/bluefin/usr/share/ublue-os/system-setup.hooks.d/10-framework.sh new file mode 100755 index 0000000..01ec6a7 --- /dev/null +++ b/system_files/bluefin/usr/share/ublue-os/system-setup.hooks.d/10-framework.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash + +source /usr/lib/ublue/setup-services/libsetup.sh + +version-script framework system 2 || exit 0 + +set -x + +CPU_VENDOR=$(grep "vendor_id" "/proc/cpuinfo" | uniq | awk -F": " '{ print $2 }') +VEN_ID="$(cat /sys/devices/virtual/dmi/id/chassis_vendor)" +BIOS_VERSION="$(cat /sys/devices/virtual/dmi/id/bios_version 2>/dev/null)" + +# GLOBAL +KARGS=$(rpm-ostree kargs) +NEEDED_KARGS=() +echo "Current kargs: $KARGS" + +if [[ $KARGS =~ "nomodeset" ]]; then + echo "Removing nomodeset" + NEEDED_KARGS+=("--delete-if-present=nomodeset") +fi + +if [[ ":Framework:" =~ :$VEN_ID: ]]; then + if [[ "GenuineIntel" == "$CPU_VENDOR" ]]; then + if [[ ! $KARGS =~ "hid_sensor_hub" ]]; then + echo "Intel Framework Laptop detected, applying needed keyboard fix" + NEEDED_KARGS+=("--append-if-missing=module_blacklist=hid_sensor_hub") + fi + fi +fi + +#shellcheck disable=SC2128 +if [[ -n "$NEEDED_KARGS" ]]; then + echo "Found needed karg changes, applying the following: ${NEEDED_KARGS[*]}" + plymouth display-message --text="Updating kargs - Please wait, this may take a while" || true + rpm-ostree kargs "${NEEDED_KARGS[*]}" --reboot || exit 1 +else + echo "No karg changes needed" +fi + +SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" + +# FRAMEWORK 13 FIXES +if [[ "$VEN_ID" == "Framework" && "$SYS_ID" == "Laptop 13 ("* ]]; then + echo "Framework Laptop 13 detected" + + # Older versions of this script applied a modprobe flag to fix 3.5 mm jack headset detection + # which is no longer needed because the kernel applies this automatically. + if [[ ! -f /etc/modprobe.d/alsa.conf ]]; then + echo "Removing obsolete 3.5mm audio jack fix" + rm -f /etc/modprobe.d/alsa.conf + fi + + # Suspend fix for Framework 13 Ryzen 7040 + # On BIOS versions >= 3.09, the workaround is not needed + # (https://knowledgebase.frame.work/framework-laptop-13-bios-and-driver-releases-amd-ryzen-7040-series-r1rXGVL16) + if [[ "$SYS_ID" == "Laptop 13 (AMD Ryzen 7040Series)" && "$(printf '%s\n' 03.08 "$BIOS_VERSION" | sort -V | tail -n1)" == "03.08" ]]; then + # BIOS is older, apply workaround + if [[ ! -f /etc/udev/rules.d/20-suspend-fixes.rules ]]; then + echo "Framework 13 Ryzen 7040 with BIOS $BIOS_VERSION < 3.09 — applying suspend workaround" + echo 'ACTION=="add", SUBSYSTEM=="serio", DRIVERS=="atkbd", ATTR{power/wakeup}="disabled"' \ + > /etc/udev/rules.d/20-suspend-fixes.rules + fi + else + # BIOS is >= 3.09, remove workaround if present + # Older versions of this script also mistakenly applied then + # workaround to Framework 13 Ryzen AI 300. Will get cleaned up here too. + if [[ -f /etc/udev/rules.d/20-suspend-fixes.rules ]]; then + echo "Removing old suspend workaround" + rm -f /etc/udev/rules.d/20-suspend-fixes.rules + fi + fi +fi diff --git a/system_files/bluefin/usr/share/ublue-os/user-setup.hooks.d/10-theming.sh b/system_files/bluefin/usr/share/ublue-os/user-setup.hooks.d/10-theming.sh new file mode 100755 index 0000000..36db7b8 --- /dev/null +++ b/system_files/bluefin/usr/share/ublue-os/user-setup.hooks.d/10-theming.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +source /usr/lib/ublue/setup-services/libsetup.sh + +version-script theming user 1 || exit 0 + +set -xeuo pipefail + +VEN_ID="$(cat /sys/devices/virtual/dmi/id/chassis_vendor)" + +if [[ ":Framework:" =~ :$VEN_ID: ]]; then + echo 'Setting Framework logo menu' + dconf write /org/gnome/shell/extensions/Logo-menu/symbolic-icon true + dconf write /org/gnome/shell/extensions/Logo-menu/menu-button-icon-image 31 + echo 'Setting touch scroll type' + dconf write /org/gnome/desktop/peripherals/mouse/natural-scroll true + if [[ $SYS_ID == "Laptop ("* ]]; then + echo 'Applying font fix for Framework 13' + dconf write /org/gnome/desktop/interface/text-scaling-factor 1.25 + fi +fi + +SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)" + +if [[ ":Thelio Astra:" =~ :$SYS_ID: ]]; then + echo 'Setting Ampere Logo' + dconf write /org/gnome/shell/extensions/Logo-menu/symbolic-icon true + dconf write /org/gnome/shell/extensions/Logo-menu/menu-button-icon-image 32 + fi diff --git a/system_files/bluefin/usr/share/ublue-os/user-setup.hooks.d/99-privileged.sh b/system_files/bluefin/usr/share/ublue-os/user-setup.hooks.d/99-privileged.sh new file mode 100755 index 0000000..6d29c39 --- /dev/null +++ b/system_files/bluefin/usr/share/ublue-os/user-setup.hooks.d/99-privileged.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo "Running all privileged units" + +pkexec /usr/libexec/ublue-privileged-setup diff --git a/system_files/shared/usr/lib/tmpfiles.d/bazaar-flatpak.conf b/system_files/shared/usr/lib/tmpfiles.d/bazaar-flatpak.conf new file mode 100644 index 0000000..a0df375 --- /dev/null +++ b/system_files/shared/usr/lib/tmpfiles.d/bazaar-flatpak.conf @@ -0,0 +1 @@ +L /var/lib/flatpak/overrides/io.github.kolunmi.Bazaar - - - - /usr/share/ublue-os/flatpak-overrides/io.github.kolunmi.Bazaar