Optimize repository
This commit is contained in:
parent
c6204ee504
commit
c61a0fa2a0
26 changed files with 3 additions and 0 deletions
3
containers/etc/dnf/dnf.conf
Normal file
3
containers/etc/dnf/dnf.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
[main]
|
||||
install_weak_deps=False
|
||||
exclude=mpv
|
7
containers/etc/polkit-1/rules.d/80-libvirt-manage.rules
Normal file
7
containers/etc/polkit-1/rules.d/80-libvirt-manage.rules
Normal file
|
@ -0,0 +1,7 @@
|
|||
// https://goldmann.pl/blog/2012/12/03/configuring-polkit-in-fedora-18-to-access-virt-manager/
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.libvirt.unix.manage" && subject.local && subject.active && subject.isInGroup("wheel")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
25
containers/etc/polkit-1/rules.d/80-rpm-ostree.rules
Normal file
25
containers/etc/polkit-1/rules.d/80-rpm-ostree.rules
Normal file
|
@ -0,0 +1,25 @@
|
|||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.projectatomic.rpmostree1.repo-refresh" &&
|
||||
subject.active == true && subject.local == true) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
|
||||
if ((action.id == "org.projectatomic.rpmostree1.install-uninstall-packages" ||
|
||||
action.id == "org.projectatomic.rpmostree1.install-local-packages" ||
|
||||
action.id == "org.projectatomic.rpmostree1.override" ||
|
||||
action.id == "org.projectatomic.rpmostree1.deploy" ||
|
||||
action.id == "org.projectatomic.rpmostree1.upgrade" ||
|
||||
action.id == "org.projectatomic.rpmostree1.rebase" ||
|
||||
action.id == "org.projectatomic.rpmostree1.rollback" ||
|
||||
action.id == "org.projectatomic.rpmostree1.bootconfig" ||
|
||||
action.id == "org.projectatomic.rpmostree1.reload-daemon" ||
|
||||
action.id == "org.projectatomic.rpmostree1.cancel" ||
|
||||
action.id == "org.projectatomic.rpmostree1.cleanup" ||
|
||||
action.id == "org.projectatomic.rpmostree1.client-management") &&
|
||||
subject.active == true &&
|
||||
subject.local == true &&
|
||||
subject.isInGroup("wheel")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.freedesktop.systemd1.manage-units" && subject.local && subject.active && subject.isInGroup("wheel")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
2
containers/etc/profile.d/20-bat-manpager.sh
Normal file
2
containers/etc/profile.d/20-bat-manpager.sh
Normal file
|
@ -0,0 +1,2 @@
|
|||
export MANPAGER="sh -c 'col -bx | LESS="RKCM" bat -l man --decorations=never --paging=always'"
|
||||
export MANROFFOPT="-c"
|
1
containers/etc/profile.d/20-less.sh
Normal file
1
containers/etc/profile.d/20-less.sh
Normal file
|
@ -0,0 +1 @@
|
|||
export LESS=RSMK
|
1
containers/etc/profile.d/20-systemd-less.sh
Normal file
1
containers/etc/profile.d/20-systemd-less.sh
Normal file
|
@ -0,0 +1 @@
|
|||
export SYSTEMD_LESS=FRSMK
|
147
containers/etc/profile.d/bash-color-prompt.sh
Normal file
147
containers/etc/profile.d/bash-color-prompt.sh
Normal file
|
@ -0,0 +1,147 @@
|
|||
# see /usr/share/doc/bash-color-prompt/README.md
|
||||
|
||||
## to truncate \w dirpath set:
|
||||
# PROMPT_DIRTRIM=3
|
||||
|
||||
# only for bash
|
||||
if [ -n "${BASH_VERSION}" -a -z "${bash_prompt_color_disable}" ]; then
|
||||
|
||||
# enable only in interactive shell
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# defines PS1 for color prompt
|
||||
prompt_setup_color_ps1() {
|
||||
local colorpre='\[\e['
|
||||
local colorsuf='m\]'
|
||||
local colorreset="${colorpre}0${colorsuf}"
|
||||
PS1='${PROMPT_START@P}'"${colorpre}"'${PROMPT_COLOR}${PROMPT_HIGHLIGHT:+;$PROMPT_HIGHLIGHT}'"${colorsuf}"'${PROMPT_USERHOST@P}'"${colorreset}"'${PROMPT_SEPARATOR@P}'"${colorpre}"'${PROMPT_DIR_COLOR-${PROMPT_COLOR}}${PROMPT_HIGHLIGHT:+;$PROMPT_HIGHLIGHT}'"${colorsuf}"'${PROMPT_DIRECTORY@P}'"${colorreset}"'${PROMPT_END@P}\$'"${colorreset} "
|
||||
}
|
||||
|
||||
# sets default color or $1 can override
|
||||
prompt_color() {
|
||||
if [ -n "${1:+1}" ]; then
|
||||
PROMPT_COLOR="$1"
|
||||
else
|
||||
if [ "$USER" = "root" ]; then
|
||||
PROMPT_COLOR="93;1"
|
||||
else
|
||||
PROMPT_COLOR="93"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# sets prompt highlighting
|
||||
prompt_highlight() {
|
||||
PROMPT_HIGHLIGHT=${1:-1}
|
||||
}
|
||||
|
||||
prompt_default_highlight() {
|
||||
if [ "$DESKTOP_SESSION" = "gnome" ]; then
|
||||
prompt_highlight "${1:-1}"
|
||||
else
|
||||
unset PROMPT_HIGHLIGHT
|
||||
fi
|
||||
}
|
||||
|
||||
prompt_default_color() {
|
||||
prompt_color "$1"
|
||||
prompt_default_highlight
|
||||
unset PROMPT_DIR_COLOR
|
||||
}
|
||||
|
||||
prompt_dir_color() {
|
||||
if [ -n "${1:+1}" ]; then
|
||||
PROMPT_DIR_COLOR="$1"
|
||||
else
|
||||
unset PROMPT_DIR_COLOR
|
||||
fi
|
||||
}
|
||||
|
||||
# only activate for color terminals and if PS1 unchanged from bash or fedora defaults
|
||||
if [ '(' "${TERM: -5}" = "color" -o "${TERM}" = "linux" ')' \
|
||||
-o -n "${bash_prompt_color_force}" ]; then
|
||||
prompt_color "$PROMPT_COLOR"
|
||||
prompt_default_highlight "$PROMPT_HIGHLIGHT"
|
||||
prompt_dir_color "$PROMPT_DIR_COLOR"
|
||||
PROMPT_USERHOST="${PROMPT_USERHOST-${container:+⬢ }\u@\h}"
|
||||
PROMPT_SEPARATOR="${PROMPT_SEPARATOR-:}"
|
||||
PROMPT_DIRECTORY="${PROMPT_DIRECTORY-\w}"
|
||||
prompt_setup_color_ps1
|
||||
fi
|
||||
|
||||
# sets default prompt format
|
||||
prompt_default_format() {
|
||||
PROMPT_USERHOST='\u@\h'
|
||||
PROMPT_SEPARATOR=':'
|
||||
PROMPT_DIRECTORY='\w'
|
||||
PROMPT_START=''
|
||||
PROMPT_END=''
|
||||
}
|
||||
|
||||
# sets default prompt color and format
|
||||
prompt_default() {
|
||||
prompt_default_color "$1"
|
||||
prompt_default_format
|
||||
}
|
||||
|
||||
# sets color to OS ANSI_COLOR
|
||||
# $1 is appended to the (foreground) color
|
||||
prompt_os_color() {
|
||||
if [ -z "$ANSI_COLOR" ]; then
|
||||
eval local $(grep ANSI_COLOR /etc/os-release)
|
||||
fi
|
||||
PROMPT_COLOR="$ANSI_COLOR${1:+;$1}"
|
||||
}
|
||||
|
||||
prompt_container() {
|
||||
if [ -n "$container" ]; then
|
||||
eval local $(grep "\(^ID=\|VERSION_ID\|VARIANT_ID\)" /etc/os-release)
|
||||
PROMPT_USERHOST="⬢ $ID-$VARIANT_ID$VERSION_ID"
|
||||
else
|
||||
if [ "$HOSTNAME" = "fedora" -a "$1" = "$USER" ]; then
|
||||
unset PROMPT_USERHOST
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# unsets colors
|
||||
prompt_no_color() {
|
||||
unset PROMPT_COLOR
|
||||
unset PROMPT_DIR_COLOR
|
||||
}
|
||||
|
||||
# unsets highlighting
|
||||
prompt_no_highlight() {
|
||||
unset PROMPT_HIGHLIGHT
|
||||
}
|
||||
|
||||
# unsets color and highlighting
|
||||
prompt_plain() {
|
||||
prompt_no_color
|
||||
prompt_no_highlight
|
||||
}
|
||||
|
||||
# sets traditional Red Hat prompt style format
|
||||
prompt_traditional_format() {
|
||||
PROMPT_USERHOST='\u@\h'
|
||||
PROMPT_SEPARATOR=' '
|
||||
PROMPT_DIRECTORY='\W'
|
||||
PROMPT_START='['
|
||||
PROMPT_END=']'
|
||||
}
|
||||
|
||||
# sets traditional Red Hat prompt style without color
|
||||
prompt_traditional() {
|
||||
prompt_plain
|
||||
prompt_traditional_format
|
||||
}
|
||||
|
||||
# revert to traditional Red Hat prompt
|
||||
prompt_reset_traditional_ps1() {
|
||||
PS1="[\u@\h \W]\\$ "
|
||||
}
|
||||
|
||||
fi
|
1
containers/etc/ssh/sshd_config.d/20-disable-gssapi.conf
Normal file
1
containers/etc/ssh/sshd_config.d/20-disable-gssapi.conf
Normal file
|
@ -0,0 +1 @@
|
|||
GSSAPIAuthentication no
|
|
@ -0,0 +1 @@
|
|||
PasswordAuthentication no
|
1
containers/etc/sysctl.d/20-high-swappines.conf
Normal file
1
containers/etc/sysctl.d/20-high-swappines.conf
Normal file
|
@ -0,0 +1 @@
|
|||
vm.swappiness=180
|
1
containers/etc/sysctl.d/20-no-page-cluster.conf
Normal file
1
containers/etc/sysctl.d/20-no-page-cluster.conf
Normal file
|
@ -0,0 +1 @@
|
|||
vm.page-cluster=0
|
5
containers/etc/systemd/resolved.conf
Normal file
5
containers/etc/systemd/resolved.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
[Resolve]
|
||||
DNS=1.1.1.1 1.0.0.1
|
||||
FallbackDNS=
|
||||
Domains=~.
|
||||
DNSOverTLS=yes
|
4
containers/etc/systemd/zram-generator.conf
Normal file
4
containers/etc/systemd/zram-generator.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
# /etc/systemd/zram-generator.conf
|
||||
[zram0]
|
||||
zram-size = ram * 2
|
||||
compression-algorithm=zstd
|
3
containers/etc/vimrc.local
Normal file
3
containers/etc/vimrc.local
Normal file
|
@ -0,0 +1,3 @@
|
|||
au BufRead,BufNewFile *.container set filetype=systemd
|
||||
au BufRead,BufNewFile *.container.disabled set filetype=systemd
|
||||
colorscheme retrobox
|
8
containers/etc/yum.repos.d/vscodium.repo
Normal file
8
containers/etc/yum.repos.d/vscodium.repo
Normal file
|
@ -0,0 +1,8 @@
|
|||
[gitlab.com_paulcarroty_vscodium_repo]
|
||||
name=download.vscodium.com
|
||||
baseurl=https://download.vscodium.com/rpms/
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
repo_gpgcheck=1
|
||||
gpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg
|
||||
metadata_expire=1h
|
Loading…
Add table
Add a link
Reference in a new issue