Skip to content

Instantly share code, notes, and snippets.

View roosemberth's full-sized avatar

Roosemberth Palacios roosemberth

View GitHub Profile
@roosemberth
roosemberth / flake.nix
Created March 30, 2025 01:46
Two NixOS VMs with COSMIC desktop, one works the other crashes
{
description = "Example NixOS configuration crashing COSMIC";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/698214a32beb4f4c8e3942372c694f40848b360d";
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic/c709db4b95e58f410978bb49c87cb74214d03e78";
nixos-cosmic.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, nixos-cosmic }: let

I was to lazy to figure out a title, if I ever publish this somewhere else, I'll probably try to figure one out.

Let's look at the program bellow:

#include <stdio.h>
#define DEFAULT_MSG "Default message"

static void say(const char *msg) {
@roosemberth
roosemberth / test-taffy.nix
Created October 19, 2019 12:38
Reproductible example showing crash in Taffybar when using mpris2New without librsvg
{ config, pkgs, lib, ... }:
let
home-manager = builtins.fetchGit {
url = "https://github.com/rycee/home-manager.git";
rev = "ba0375bf06e0e0c3b2377edf913b7fddfd5a0b40";
ref = "release-19.03";
};
taffybar-config = ''
{-# LANGUAGE OverloadedStrings #-}
import System.Taffybar
@roosemberth
roosemberth / testingPadding.c
Last active September 5, 2017 02:28
Effects of padding on variable declaration:
/* Roosembert Palacios © 2015, Released under GPLv3 License: http://www.gnu.org/licenses/gpl-3.0.fr.html
* This piece of code is intended to show the effects of memory padding and the importance of the variable
* Allocation order. Please note that compiler warning "-Wpadded" is intentional and can be disabled by
* commenting line (10: #pragma GCC diagnostic warning "-Wpadded").
*/
#include <stdio.h>
#pragma GCC diagnostic ignored "-Wpointer-to-int-cast"
#pragma GCC diagnostic ignored "-Wint-to-pointer-cast"
#pragma GCC diagnostic ignored "-Wformat"
#pragma GCC diagnostic warning "-Wpadded"