Skip to content

Instantly share code, notes, and snippets.

❯ sudo nixos-rebuild switch --show-trace
warning: Git tree '/etc/nixos' is dirty
error:
… while calling the 'seq' builtin
at /nix/store/mp4clz8rfv9vwl1n589kmkcp9k36ynkc-source/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
@s1341
s1341 / host.nix
Created August 15, 2023 06:20
nixos host config flake
{ system, pkgs, home-manager, inputs, lib, user, ... }:
{
mkHost =
{ name
, vlan20nic
, initrdMods
, kernelMods
, kernelParams
, kernelPackage
, systemConfig
@s1341
s1341 / freeipa-server.nix
Created May 29, 2023 04:08
working freeipa config
{
config,
lib,
...
}: let
cfg = config.services.freeipa-server;
in {
options.services.freeipa-server = {
enable = lib.mkEnableOption "freeipa service";
router = lib.mkOption {
@s1341
s1341 / config
Created May 10, 2023 05:40
waybar config
[
{
"battery": {
"bat": "BAT0",
"format": "{icon} {capacity}%",
"format-charging": "󰂄 {capacity}%",
"format-icons": [
"󰁺",
"󰁻",
"󰁼",
with import <nixpkgs> {
crossSystem = {
config = "x86_64-w64-mingw32";
# libc = "msvcrt";
# useLLVM = true;
};
overlays = [
(import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"))
];
};
error:
… while evaluating the attribute 'buildInputs' of the derivation 'nix-shell-x86_64-w64-mingw32'
at /nix/store/49hikfbih9n03lfggqc6axlvb1ax7wl2-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:302:7:
301| // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
302| name =
| ^
303| let
building Nix...
building the system configuration...
these 3750 derivations will be built:
/nix/store/28y54fghbhcc12rvd48a8ayv5x0cg345-bootstrap-stage1-stdenv-linux.drv
/nix/store/3f9s2xxjz3yz90n0d0j2cfkgndgc2j1f-bootstrap-stage0-stdenv-linux.drv
/nix/store/92j3l663vmsd71hdn2y9hq4r3mqz2mrc-bootstrap-stage0-glibc-bootstrap.drv
/nix/store/yzdsm4k0n9cyy2n6vcqgxwxlgfbwqfkv-bootstrap-stage0-binutils-wrapper-.drv
/nix/store/j5kj3vy9n8r6d5ygn4ipbfyjy9rq6d36-bootstrap-stage1-gcc-wrapper-.drv
/nix/store/c6ww9cinvfj8p9c1adj0s366gr2j5k41-bootstrap-stage1-stdenv-linux.drv
/nix/store/j1fnf3p2yrfirncmhckgx1l60ziq5gyb-zlib-1.2.13.drv
@s1341
s1341 / t48.py
Created November 10, 2022 14:49
import binascii
import struct
import hexdump
import glob
from collections import namedtuple, OrderedDict
def xorbytes(a, b):
c = bytearray()
for i in range(len(a)):
@s1341
s1341 / default.nix
Created July 19, 2022 03:48
Updated realmd derivation
{ stdenv
, fetchFromGitLab
, openldap
, libkrb5
, packagekit
, polkit
, libxslt
, intltool
, glib
, pkg-config
@s1341
s1341 / stalker-arm64x.cxx
Created June 9, 2021 04:04
failing tests for frida unwind issue
/*
* Copyright (C) 2008-2010 Ole André Vadla Ravnås <oleavr@nowsecure.com>
*
* Licence: wxWindows Library Licence, Version 3.1
*/
#include "stalker-arm64-fixture.c"
#include <functional>
#define PRINT_BACKTRACES 1