Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: ultramarine-system-configs #37

Merged
merged 16 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions comps.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
<packagereq type="default">ultramarine-shell-config</packagereq>
<packagereq type="default">ultramarine-release</packagereq>
<packagereq type="default">ultramarine-fun</packagereq>
<packagereq type="default">dnf5-default-package-manager</packagereq>
korewaChino marked this conversation as resolved.
Show resolved Hide resolved
<packagereq type="default">ultramarine-system-configs-core</packagereq>
<packagereq type="default">ultramarine-phony-bookmarks</packagereq>
<packagereq type="default">git</packagereq>
<packagereq type="default">golang-github-ultramarine-linux-um</packagereq>
Expand All @@ -48,6 +50,7 @@
<packagereq type="mandatory">ultramarine-repos-extras</packagereq>
<packagereq type="default">ultramarine-backgrounds-common</packagereq>
<packagereq type="default">ultramarine-backgrounds-compat</packagereq>
<packagereq type="default">ultramarine-system-configs-desktop</packagereq>
<packagereq type="default">system76-scheduler</packagereq>
<packagereq type="default">orca</packagereq>
<packagereq type="default">speech-dispatcher-espeak-ng</packagereq>
Expand Down
3 changes: 0 additions & 3 deletions ultramarine/release/ultramarine-release.spec
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ Source28: longer-default-shutdown-timeout.conf

Source31: enable-kwin-system76-scheduler-integration.service
Source32: org.projectatomic.rpmostree1.rules
Source33: 50-ultramarine-networking.conf
Source34: ultramarine.urls

Source40: https://github.com/Ultramarine-Linux/xfce-config/archive/%{xfce_conf_commit}.tar.gz
Expand Down Expand Up @@ -769,7 +768,6 @@ cp -pr %{SOURCE54} %{buildroot}%{_sysconfdir}/anaconda/profile.d/ultramarine-xfc

# sysctls
mkdir -p %{buildroot}%{_prefix}/lib/sysctl.d/
cp -pr %{SOURCE33} %{buildroot}%{_prefix}/lib/sysctl.d/50-ultramarine-networking.conf


#########################
Expand Down Expand Up @@ -897,7 +895,6 @@ install -Dm0644 %{SOURCE32} -t %{buildroot}%{_datadir}/polkit-1/rules.d/
%{_sysconfdir}/anaconda/profile.d/ultramarine-gnome.conf
%{_sysconfdir}/anaconda/profile.d/ultramarine-plasma.conf
%{_sysconfdir}/anaconda/profile.d/ultramarine-xfce.conf
%{_prefix}/lib/sysctl.d/50-ultramarine-networking.conf
%license licenses/LICENSE licenses/README.license
%{_prefix}/lib/ultramarine-release
%{_prefix}/lib/systemd/user.conf.d/*
Expand Down
7 changes: 7 additions & 0 deletions ultramarine/ultramarine-system-configs/50-mtu-probing.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Enables MTU Probing for IPv4
# Fixes a quirk with some home network setups and
# some applications/games that have QoS issues with large packets
# e.g. Minecraft, Ubisoft Connect, etc.
# https://blog.cloudflare.com/path-mtu-discovery-in-practice/
# https://www.reddit.com/r/linux_gaming/comments/10oc0dq/comment/j6e0ds2
net.ipv4.tcp_mtu_probing=1
6 changes: 6 additions & 0 deletions ultramarine/ultramarine-system-configs/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
project "pkg" {
rpm {
spec = "ultramarine-system-configs.spec"
sources = "."
}
}
4 changes: 4 additions & 0 deletions ultramarine/ultramarine-system-configs/bbr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Enables the tcp_bbr kernel module
# to enable the BBR congestion control algorithm by Google
# https://cloud.google.com/blog/products/gcp/tcp-bbr-congestion-control-comes-to-gcp-your-internet-just-got-faster
tcp_bbr
10 changes: 10 additions & 0 deletions ultramarine/ultramarine-system-configs/networking-tweaks.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Enable BBR Congestion Control
# Requires the tcp_bbr module to be loaded, defined in /etc/modules-load.d/bbr.conf

net.ipv4.tcp_congestion_control = bbr


# Filter TCP reverse paths
# Validate the source address of the packets, this will prevent some spoofing attacks
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
korewaChino marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 8 additions & 0 deletions ultramarine/ultramarine-system-configs/tmpfiles-cleanup.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# remove files in /var/tmp older than 10 days
korewaChino marked this conversation as resolved.
Show resolved Hide resolved
D /var/tmp 1777 root root 10d

# namespace mountpoints (PrivateTmp=yes) are excluded from removal
korewaChino marked this conversation as resolved.
Show resolved Hide resolved
x /tmp/systemd-private-*
x /var/tmp/systemd-private-*
X /tmp/systemd-private-*/tmp
X /var/tmp/systemd-private-*/tmp
22 changes: 22 additions & 0 deletions ultramarine/ultramarine-system-configs/ultramarine-logrotate.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# /etc/logrotate.d/ultramarine-logrotate.conf

# see "man logrotate" for details

# global options do not affect preceding include directives

# rotate log files daily
daily

# keep 3 weeks worth of backlogs
rotate 3

# create new (empty) log files after rotating old ones
create

# use date as a suffix of the rotated file
dateext

# uncomment this if you want your log files compressed
compress
korewaChino marked this conversation as resolved.
Show resolved Hide resolved

# system-specific logs may also be configured here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
Name: ultramarine-system-configs
Version: 1
Release: 1%{?dist}
Summary: Various configuration files for a more comfortable Ultramarine desktop experience
BuildArch: noarch
License: MIT
URL: https://ultramarine-linux.org
Source1: tmpfiles-cleanup.conf
Source2: ultramarine-logrotate.conf
Source3: networking-tweaks.conf
Source4: bbr.conf
Source5: 50-mtu-probing.conf

BuildRequires: /usr/bin/install

%package core
Summary: Core system tweaks for Ultramarine Linux

%description core
This package provides various systemd configurations that improve system performance
and resource usage on Ultramarine Linux.

%package desktop
Summary: Desktop-specific tweaks for Ultramarine Linux

%description desktop
This package provides various systemd configurations that optimize desktop resource usage
and performance on Ultramarine Linux.


%description
This package provides various systemd configurations
to optimize desktop resource usage and performance on Ultramarine Linux.

The configs attempt to reduce disk usage for journaling and logging, and
cleaning up of unused temporary files periodically.

%prep

%build



%install
install -Dm644 %{SOURCE1} %{buildroot}/etc/tmpfiles.d/tmpfiles-cleanup.conf
install -Dm644 %{SOURCE2} %{buildroot}/etc/logrotate.d/ultramarine-logrotate.conf
install -Dm644 %{SOURCE3} %{buildroot}/etc/sysctl.d/50-networking-tweaks.conf
install -Dm644 %{SOURCE4} %{buildroot}/etc/modules-load.d/bbr.conf
install -Dm644 %{SOURCE5} %{buildroot}/etc/sysctl.d/50-mtu-probing.conf

%files


%files core
%defattr(-,root,root,-)
%config /etc/sysctl.d/50-networking-tweaks.conf
%config /etc/modules-load.d/bbr.conf

%files desktop
%defattr(-,root,root,-)
%config /etc/tmpfiles.d/tmpfiles-cleanup.conf
%config /etc/logrotate.d/ultramarine-logrotate.conf
%config /etc/sysctl.d/50-mtu-probing.conf

%changelog
* Sat Aug 03 2024 Cappy Ishihara <[email protected]>
- Initial release
Loading