Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ibizaman's full-sized avatar

Pierre Penninckx ibizaman

View GitHub Profile
installer-test = (nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
"${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
({
config,
lib,
pkgs,
...
@ibizaman
ibizaman / log
Last active January 9, 2024 22:58
$ nixos-rebuild build-vm-with-bootloader --fast -I nixos-config=./configuration.nix -I nixpkgs=.
building the system configuration...
these 5 derivations will be built:
/nix/store/4sl01j0zzg0aplvzxpwy81gpaaz2i3v5-users-groups.json.drv
/nix/store/rpxd1rvfk9fih85hkvcqs6z0avw35hyy-nixos-system-nixos-22.11.3408.a575c243c23.drv
/nix/store/4wm1pi5hvhfpwic3x3g14zqrx5a25g0y-nixos-boot-disk.drv
/nix/store/r5vj647ln6spdlhzrj2n0hzl7kg8rk7n-run-nixos-vm.drv
/nix/store/xx2z3hz5c27k68si86k9wk4j4jdjrgih-nixos-vm.drv
building '/nix/store/4sl01j0zzg0aplvzxpwy81gpaaz2i3v5-users-groups.json.drv'...
building '/nix/store/rpxd1rvfk9fih85hkvcqs6z0avw35hyy-nixos-system-nixos-22.11.3408.a575c243c23.drv'...
@ibizaman
ibizaman / manual.html
Created December 5, 2023 19:10
nixos-render-doc TOCs with multiple headings
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home Assistant Demo</title>
<link rel="stylesheet" type="text/css" href="static/style.css" />
<link rel="stylesheet" type="text/css" href="static/tomorrow-night.min.css" />
<script src="static/highlight.min.js" type="text/javascript"></script>
<script src="static/highlight.load.js" type="text/javascript"></script>
@ibizaman
ibizaman / gist:875dd835dc51a72c984e13951c77e387
Created August 15, 2023 22:38
Home Assistant Back Home Actions
alias: Back home phone actions
description: ""
use_blueprint:
path: vorion/actionable-notifications.yaml
input:
notify_device: 6924837ef3f...
trigger_entity: input_boolean.is_back_home
notification_title: Back home actions
persistent_notification: true
action_1_title: Open Door
@ibizaman
ibizaman / flake.nix
Last active January 5, 2023 08:53
python deluge/scripts/create_plugin.py
{
description = "Deluge";
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-22.05;
# delugesource.url = "./.";
delugesource.url = "git://deluge-torrent.org/deluge.git?ref=master";
delugesource.flake = false;
};
@ibizaman
ibizaman / gist:2f39cf3e788129d6da4523a7a3313e2e
Created April 15, 2022 05:40
nix-shell --show-trace -v on hs-template-haskellnix-reflexfrp
$ nix-shell --show-trace -v
evaluating file '/nix/store/xdxjx3mlidm5qgp595x3gvz79jlhyl4w-nix-2.3.16/share/nix/corepkgs/derivation.nix'
evaluating file '/home/timi/Projects/hs-template-haskellnix-reflexfrp/default.nix'
evaluating file '/home/timi/Projects/hs-template-haskellnix-reflexfrp/nix/sources.nix'
evaluating file '/nix/store/m1l8gdyx9038q2vl7l7700qkldlm73c1-haskellNix-src/default.nix'
evaluating file '/nix/store/dnzj42036l08pn9xwzgax8nbn2kk504s-source/default.nix'
evaluating file '/nix/store/dnzj42036l08pn9xwzgax8nbn2kk504s-source/lib/minver.nix'
evaluating file '/nix/store/dnzj42036l08pn9xwzgax8nbn2kk504s-source/pkgs/top-level/impure.nix'
evaluating file '/nix/store/dnzj42036l08pn9xwzgax8nbn2kk504s-source/pkgs/top-level/default.nix'
evaluating file '/nix/store/dnzj42036l08pn9xwzgax8nbn2kk504s-source/pkgs/stdenv/booter.nix'
@ibizaman
ibizaman / nix-build -A projectCross.ghcjs.hsPkgs.frontend.components.exes
Last active April 15, 2022 05:28
nix-build -A projectCross.ghcjs.hsPkgs.frontend.components.exes output for hs-template-haskellnix-reflexfrp
$ nix-build -A projectCross.ghcjs.hsPkgs.frontend.components.exes
trace: No index state specified for haskell-project, using the latest index state that we know about (2022-03-10T00:00:00Z)!
trace: No index state specified for haskell-project, using the latest index state that we know about (2022-03-10T00:00:00Z)!
trace: No index state specified for haskell-project, using the latest index state that we know about (2022-03-10T00:00:00Z)!
these derivations will be built:
/nix/store/iz7mhflh05iwzk4kyk1f0wlf7lipzwri-transformers-compat-lib-transformers-compat-0.6.6-js-unknown-ghcjs-ghc-8.10.7-env.drv
/nix/store/dxb7w3savyl51bhxdzqdssdqbqnj2mm1-transformers-compat-lib-transformers-compat-0.6.6.drv
/nix/store/z58j2hm0gj7qg0hv6mc1jzsdgn0zgkdf-js-unknown-ghcjs-transformers-base-lib-transformers-base-0.4.6-config.drv
/nix/store/yw4iypkw4m1mq7yzfs7b49qifd7qhkqv-transformers-base-lib-transformers-base-0.4.6-js-unknown-ghcjs-ghc-8.10.7-env.drv
/nix/store/iws23ajr5pznj06hbj2wp2q2znnwcgxq-transformers-base-lib-tr
@ibizaman
ibizaman / definition.json
Created January 23, 2022 06:14
Torrent Grafana Dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@ibizaman
ibizaman / Time.hs
Last active October 12, 2019 06:27
Using custom time data type in place of UTCTime for elm-bridge
{-# LANGUAGE TemplateHaskell #-}
module Time
( Time(..)
, fromUTCTime
)
where
import qualified Data.Aeson as Aeson
import Data.Char ( toLower )
def jpeg_size(path) do
bin = File.read!(WPI.Database.Media.complete_path(path))
case jpeg_size(path, bin, {}) do
{} -> nil
size -> size
end
end
def jpeg_size(path, << 255, 192, 0, 17, 8, height::size(16), width::size(16), rest::binary >>, size) do
if {width, height} > size do