<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.csclub.uwaterloo.ca/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cdkauder</id>
	<title>CSCWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.csclub.uwaterloo.ca/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cdkauder"/>
	<link rel="alternate" type="text/html" href="https://wiki.csclub.uwaterloo.ca/Special:Contributions/Cdkauder"/>
	<updated>2026-04-05T19:45:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.csclub.uwaterloo.ca/index.php?title=Git_Hosting&amp;diff=5485</id>
		<title>Git Hosting</title>
		<link rel="alternate" type="text/html" href="https://wiki.csclub.uwaterloo.ca/index.php?title=Git_Hosting&amp;diff=5485"/>
		<updated>2026-01-30T09:09:58Z</updated>

		<summary type="html">&lt;p&gt;Cdkauder: Updated link to the gitea actions comparison page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We have a [https://git.csclub.uwaterloo.ca Gitea] instance running on [[Machine List#caffeine|caffeine]]. You can sign in via LDAP to the web interface. Projects used by CSC as a whole are owned by the [https://git.csclub.uwaterloo.ca/public public] organization, except for website-committee related repos, which are owned by the [https://git.csclub.uwaterloo.ca/www www] org.&lt;br /&gt;
&lt;br /&gt;
== Installation Details ==&lt;br /&gt;
&amp;lt;code&amp;gt;/etc/gitea&amp;lt;/code&amp;gt; on caffeine contains the configs for Gitea. It&#039;s installed as a Debian package, with additional files in &amp;lt;code&amp;gt;/var/lib/gitea/&amp;lt;/code&amp;gt;and a systemd service at &amp;lt;code&amp;gt;/lib/systemd/system/gitea.service&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
There is a custom locale (used to define CSC-custom strings in some pages) at &amp;lt;code&amp;gt;/var/lib/gitea/custom/options/locale/locale_en-US.ini&amp;lt;/code&amp;gt; that may need to be updated when the Gitea APT package is updated. To update this, run the &amp;lt;code&amp;gt;update_custom_locale.sh&amp;lt;/code&amp;gt; in that directory (as root).&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&amp;quot;It&#039;s basically GitHub&amp;quot;&lt;br /&gt;
&lt;br /&gt;
- raymo&lt;br /&gt;
&lt;br /&gt;
=== SSH keys ===&lt;br /&gt;
It is recommended to setup [https://git.csclub.uwaterloo.ca/user/settings/keys SSH keys] so that you do not have to enter your password each time you push to a repo. Once you have uploaded your public key, add the following to your ~/.ssh/config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host csclub.uwaterloo.ca&lt;br /&gt;
        HostName csclub.uwaterloo.ca&lt;br /&gt;
        IdentityFile ~/.ssh/id_rsa&lt;br /&gt;
        User git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Replace ~/.ssh/id_rsa by the location of your private SSH key.) Now you should be able to clone, push and pull over SSH.&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
We have a Gitea Act Runner integrated directly into Gitea. It should have identical syntax as Github Actions (see [https://docs.gitea.com/usage/actions/comparison to GitHub Actions - Gitea]).&lt;br /&gt;
&lt;br /&gt;
Before Spring 2025:&lt;br /&gt;
We are running a CI server at https://ci.csclub.uwaterloo.ca. It uses OAuth via Gitea for logins, so you need to have logged in to Gitea first. See https://docs.drone.io/ for documentation. All you have to do is create a .drone.yml file in your repo, then enable CI on the repo from the CSC Drone website. There is an example [https://git.csclub.uwaterloo.ca/merenber/drone-test here].&lt;br /&gt;
&lt;br /&gt;
== Pushing and pulling from the filesystem ==&lt;br /&gt;
(for syscom only)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you need to keep the ability to push/pull from the filesystem, in addition to Gitea, you will need to take the following steps.&lt;br /&gt;
In this example, we are migrating a repo called &#039;public/repo.git&#039;, which is a folder under /srv/git on caffeine (which is a symlink to /users/git).&lt;br /&gt;
The way we&#039;re doing this right now is kind of hacky, but it works:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Clone the original repo locally: &amp;lt;code&amp;gt;git clone /srv/git/public/repo.git&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Delete the old repo (from phosphoric-acid, which has no_root_squash): &amp;lt;code&amp;gt;rm -rf /srv/git/public/repo.git&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create a new repo with the name &#039;repo&#039; from the Gitea web UI. This should create a bare repository at &amp;lt;code&amp;gt;/srv/git/public/repo.git&amp;lt;/code&amp;gt;. (Make sure you choose the &#039;public&#039; org from the dropdown.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Push the original repo to the new remote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd repo&lt;br /&gt;
git remote add gitea https://git.csclub.uwaterloo.ca/public/repo.git&lt;br /&gt;
git push gitea master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Remove any git gooks which require gitea:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm $(grep -IRl gitea /srv/git/public/repo.git/hooks)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&lt;br /&gt;
Change file permissions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chown -R git:git /srv/git/public/repo.git&lt;br /&gt;
chmod -R g+w /srv/git/public/repo.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You will need to do this from phosphoric-acid (due to NFS root squashing).&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
Note that the repo folder SHOULD be owned by git:git. Anything else will likely break Gitea. (If a user pushes something to the folder and their umask doesn&#039;t allow group members to read, for example, then Gitea will be unable to read the repo.)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This means that only trusted users should be in the git group - ideally, only syscom members.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
If you are having trouble pulling/pushing with SSH and have something like this when trying &amp;lt;code&amp;gt;ssh git@csclub.uwaterloo.ca&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PTY allocation request failed on channel 0&lt;br /&gt;
shell request failed on channel 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Just restart &amp;lt;code&amp;gt;gitea.service&amp;lt;/code&amp;gt; on caffeine.&lt;/div&gt;</summary>
		<author><name>Cdkauder</name></author>
	</entry>
	<entry>
		<id>https://wiki.csclub.uwaterloo.ca/index.php?title=Music&amp;diff=5484</id>
		<title>Music</title>
		<link rel="alternate" type="text/html" href="https://wiki.csclub.uwaterloo.ca/index.php?title=Music&amp;diff=5484"/>
		<updated>2026-01-24T02:07:25Z</updated>

		<summary type="html">&lt;p&gt;Cdkauder: Added config and details for bluetooth fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Music is run off &amp;lt;code&amp;gt;powernap&amp;lt;/code&amp;gt;, since that&#039;s the computer with the speakers attached. &lt;br /&gt;
&lt;br /&gt;
Office staff/termcom/syscom permissions are required to play music in the office.&lt;br /&gt;
&lt;br /&gt;
We also have MPD available, however this method is rarely used after 2022. &#039;&#039;kids these days&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==How to play music==&lt;br /&gt;
&lt;br /&gt;
# Run &amp;lt;code&amp;gt;ssh [watid]@powernap.csclub.uwaterloo.ca&amp;lt;/code&amp;gt;&lt;br /&gt;
# Run &amp;lt;code&amp;gt;bluetoothctl&amp;lt;/code&amp;gt;&lt;br /&gt;
# Type &amp;lt;code&amp;gt;pairable on&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;discoverable on&amp;lt;/code&amp;gt; into the console to enable pairing and discovery&lt;br /&gt;
# Connect to &amp;lt;code&amp;gt;powernap&amp;lt;/code&amp;gt; from your device&lt;br /&gt;
# Respond yes to all the prompts on the terminal from &amp;lt;code&amp;gt;powernap&amp;lt;/code&amp;gt;&lt;br /&gt;
# Type &amp;lt;code&amp;gt;trust [device_mac]&amp;lt;/code&amp;gt; to automatically allow audio from your device next time&lt;br /&gt;
# You should be able to play audio like a normal audio device now&lt;br /&gt;
# After you are done pairing, type &amp;lt;code&amp;gt;discoverable off&amp;lt;/code&amp;gt; to prevent distortions. See troubleshooting section for detail&lt;br /&gt;
&lt;br /&gt;
==How to control audio server==&lt;br /&gt;
powernap uses PipeWire and can talk to PulseAudio client. To set volume, mute some audio stream, or change output setting, use an office terminal and do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;PULSE_SERVER=powernap.csclub.uwaterloo.ca pavucontrol&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using a Linux laptop then this should work too.&lt;br /&gt;
&lt;br /&gt;
== MPD Controls ==&lt;br /&gt;
To view the keybindings of ncmpcpp, press F1 while it&#039;s running. &lt;br /&gt;
The number keys switch between tabs in it. &lt;br /&gt;
&lt;br /&gt;
*1 is current playlist&lt;br /&gt;
*2 is browsing files&lt;br /&gt;
*3 is search&lt;br /&gt;
*4 is browsing the media library&lt;br /&gt;
*5 is browsing saved playlists, etc.&lt;br /&gt;
&lt;br /&gt;
You can add your own &#039;&#039;absolutely legitimately obtained&#039;&#039; music by copying them to &amp;lt;code&amp;gt;/music&amp;lt;/code&amp;gt; on powernap. Then type &amp;lt;code&amp;gt;u&amp;lt;/code&amp;gt; in ncmpcpp to refresh the database.&lt;br /&gt;
&lt;br /&gt;
==Termcom Info==&lt;br /&gt;
&lt;br /&gt;
*We require https://github.com/hrkfdn/mpdas to get scrobbling working as it &amp;quot;official&amp;quot; last.fm integration was removed from mpd in 2013. &lt;br /&gt;
**n.b. https://github.com/hrkfdn/mpdas/issues/58&lt;br /&gt;
*To control the mixer on other terminals, use &amp;lt;code&amp;gt;PULSE_SERVER=nullsleep pavucontrol&amp;lt;/code&amp;gt;&lt;br /&gt;
*The official last.fm account credentials are stored in the exec password spot :)&lt;br /&gt;
&lt;br /&gt;
== Technical Details ==&lt;br /&gt;
The pipewire user starts 3 services on boot with logind linger enabled, this allows for running user services on boot without the user being signed in.&lt;br /&gt;
&lt;br /&gt;
# pipewire&lt;br /&gt;
# wireplumber&lt;br /&gt;
# pipewire-pulse-custom (the normal pipewire-pulse.service is perma masked, this just exec pipewire-pulse after the pipewire service)&lt;br /&gt;
&lt;br /&gt;
Since pipewire doesn&#039;t support both multi user playback and bluetooth, we have opted to use pipewire-pulse to handle local playback on powernap, while pipewire handles all the bluetooh.&lt;br /&gt;
&lt;br /&gt;
wireplumber is the pipewire session manager, it let&#039;s you change your sinks volume, what sources go to which sinks, etc.&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth ===&lt;br /&gt;
To configure wireplumber for bluetooth the following config was used&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
monitor.bluez.properties = {&lt;br /&gt;
  bluez5.roles = [ a2dp_sink a2dp_source bap_sink bap_source hsp_hs hsp_ag hfp_hf hfp_ag ]&lt;br /&gt;
  bluez5.codecs = [ sbc sbc_xq aac ldac aptx aptx_hd aptx_ll aptx_ll_duplex faststream faststream_duplex ]&lt;br /&gt;
  bluez5.enable-sbc-xq = true&lt;br /&gt;
  bluez5.hfphsp-backend = &amp;quot;native&amp;quot;&lt;br /&gt;
  bluez5.enable-msbc = true&lt;br /&gt;
  bluez5.enable-hw-volume = true&lt;br /&gt;
  bluez5.headset-roles = [ hsp_hs hsp_ag hfp_hf hfp_ag ]&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
wireplumber.profiles = {&lt;br /&gt;
  main = {&lt;br /&gt;
    monitor.bluez.seat-monitoring = disabled&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unit pipewire-pulse-custom ===&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Custom pipewire-pulse service to get around pipewire-pulse.socket being perma masked&lt;br /&gt;
Requires=pipewire.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=pipewire-pulse&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting Playback==&lt;br /&gt;
*Sometimes after connecting to powernap there is immense distortion and audio playback is not bearable.&lt;br /&gt;
*To fix type &amp;lt;code&amp;gt;discoverable off&amp;lt;/code&amp;gt; in the bluetoothctl environment (after a successful connection of course).&lt;br /&gt;
*Current consensus is that this happens because there are so many bluetooth devices in MC that the compute on powernap gets overwhelmed.&lt;/div&gt;</summary>
		<author><name>Cdkauder</name></author>
	</entry>
</feed>