NixOS and Sway

Currently, I am experimenting with NixOS and Sway. NixOS is a Linux operating system that allows you to build and manage your system using a single configuration file. Sway is a tiling window manager designed for Wayland, offering a dynamic and efficient workspace.

This article is a work in progress. I plan to share my setup and configuration details, but for now, this article serves as a draft to document my journey.

I am aware of tools like flakes and Home Manager, but my current goal is to explore and understand NixOS without using these mechanisms.


Config displays

Use wdisplays. This is a nice graphical tool for wayland to configure and outline your displays

Use swaymsg -t get_outputs to get all the display settings

Example config for 3 displays

# Config eDP-1
output eDP-1 {
    mode [email protected]
    pos 5247 0
    scale 1.375
    scale_filter linear
    transform normal
    max_render_time off
    adaptive_sync disabled

# Config DP-3
output DP-3 {
    mode [email protected]
    pos 8808 0
    scale 1.0
    scale_filter nearest
    transform normal
    max_render_time off
    adaptive_sync disabled

# Config DP-4
output DP-4 {
    mode [email protected]
    pos 6888 0
    scale 1.0
    scale_filter nearest
    transform normal
    max_render_time off
    adaptive_sync disabled

# Workspace assign
workspace 1 output eDP-1
workspace 2 output DP-4
workspace 3 output DP-3

Terminal (foot)

Configure the font

$ touch ~/.config/foot/foot.ini
$ nano ~/.config/foot/foot.ini

font = monospace:size=14

Sway shortcuts (cheatsheet)

  • Mod + w = Tabbed view
  • Mod + e = Normal view
  • Mod + w = Tabbed view
  • Mod + d = Application menu
  • Mod+Shift+e = Restart Sway



environment.systemPackages = with pkgs; [
pkgs.libsForQt5.bismuth # KDE Tiling
upower # nodig voor power management (firefox)

Android LOGD battery drain

Pfff I’ve had a battery drain for weeks on my Oneplus device (you know that your phone battery drains faster than you would expect). But that drain was not visible in the android battery overview.

I had already installed an app (betterbattrystats) that give you more information about the drain. With betterbatterystats I found out that logd could be the issue, but logd is a log service so it should not be a root cause.

So I found out that you could just start a task manager (top) from the Android debug tools. What seems; the youtube music app was draining my battery. Even though I don’t even use it. You can’t delete that app either so I forced stopped it and now everything is quiet.

Really wtf; I am a tech guy and have to put in so much effort to figure this out. How many people don’t have the same issues but just accept it?

How can you fix this?

  • First install ADB
  • Put your phone in development mode
  • Start top
adb shell top -m 20 -d 2

Here you can see the logd and the

To figure out what PID 9036 is

adb shell ps | grep 9036

And voila; the root cause…. Youtube music

So I turned off the Youtube app and now everything looks nice!

Please google don’t hide you shitty services from the android battery overview!

Happy debugging!

Remove Spyware

First I had a problem with spyware. When I remove that software a crappy browser hijacker came by… ARGGG!!!!

So removing the software is quite easy when you follow this staps

  1. Download superantispyware (free)
  2. Install superantispyware (select free editon)
  3. Run a quick scan
  4. Clean and reboot
  5. Run a full scan
  6. Clean and reboot
  7. Download and run ADWCleaner
  8. Scan and clean


Enjoy your adware free system 🙂

Cannot disable mail enabled public folders


    PS C:\Users\jfb> get-mailpublicfolder -Identity "bccp11-036"

    Alias                Identity
    -----                --------
    bccp11-036           matricis.local/Microsoft Exchange System Objects/Correspondance 81807753

    PS C:\Users\jfb> disable-mailpublicfolder -Identity "matricis.local/Microsoft Exchange 
System Objects/Correspondance 81807753"

    Disable-MailPublicFolder : No existing 'PublicFolder' matches the following Identity: 'matricis.local/Microsoft Exchange System Objects/Correspondance 81807753'
    At line:1 char:25
    + disable-mailpublicfolder <<<<  -Identity "matricis.local/Microsoft Exchange System Objects/Correspondance 81807753"
        + CategoryInfo          : NotSpecified: (0:Int32) [Disable-MailPublicFolder], MapiOperationException
        + FullyQualifiedErrorId : 826D5700,Microsoft.Exchange.Management.MapiTasks.DisableMailPublicFolder


I have resolved the issue, to solve this, we have to go into Active Directory Users and Computers. Under View, select Advanced Features. Now, under the /Microsoft Exchange System Objects folder, manually delete the Correspondance 81807753 object.

To prevent this, you have to mail-disable the public folder before deleting it from the public folders



If you want to quick find the old public folder use a custom AD search:

(&proxyaddresses=smtp:[email protected])

Centos Configure time to Europe/Amsterdam

I always have some time issues in Linux. Here the howto:

Check the time

# date
Fri Mar 18 21:50:43 CET 2011

Install and configure NTP

# yum install ntp
# service ntpd stop
# ntpdate
# /etc/init.d/ntpd start
# chkconfig ntpd on

Configure the localtime

# cd /etc/
# ls -la |grep localtime
# /etc/localtime -> /usr/share/zoneinfo/Europe/Amsterdam
# ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime

Configure the shell time

export TZ=CET

Nagios Webinject errors

I installed a fresh copy of Nagios XI but the web transaction didn’t work very well. I made some changes to fix the problems

The first status information error I had was: (null)

To fix this I installed perl-suidperl

yum install perl-suidperl

After that I get I new error: Return code of 255 is out of boundsnagios return code of 255 is out of bounds

To fix this I changed the permissions of the  webinject folder and its files:

chown nagios:nagios /usr/local/nagiosxi/etc/components/webinject/
chown nagios:nagios /usr/local/nagiosxi/etc/components/webinject/*

Did was the trick.

Automatically download series with RSS (ShowRSS) and Synology

I want the latest tvseries series automatically downloaded. There are plugins like couchpotato and sickbeard. Problem with these tools is that you must (semi) hack your synology nas to get this working.

Synology has the option to download automatically trough RSS. So I did a dive in to this option and I worked it out for you 😉

What do you need:

After you create an account at select the series you want to download and click “Add to my list”

showrss series overview

After that click on the feeds button and select the type of RSS you want to generate. I like HD versions and I also want to download a proper repack when the first edition have some audio and video problems

showrss generate rss

Click on generate and copy the RSS feed URL. (If you want to test the url and you use Firefox it looks like the feed is empty but when you use chrome instead you see the output.)

showrss copy url

Now login to your Synology NAS and open the download station. Click on RSS feeds and then on the blue plus button

synology add rss

Paste the RSS feed URL in to the field and don’t press the download automatically option

synology add rss url

Now click on the download filter tab an click add. Fill in these fields:

synology save location

Now when the new tv series releases on the bittorent network your download started automatic .

Have fun and don’t forget to click the donate button on the ShowRSS site if your like their website.