This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2025 Michael Bishop | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files | |
* (the "Software"), to deal in the Software without restriction, | |
* including without limitation the rights to use, copy, modify, merge, | |
* publish, distribute, sublicense, and/or sell copies of the Software, | |
* and to permit persons to whom the Software is furnished to do so, | |
* subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib, config, pkgs, ... }: | |
{ | |
imports = [ ./iscsi-boot.nix ]; | |
fileSystems = { | |
"/" = { device = "UUID=132e7c5b-b4a9-4154-8105-4479e17f4f5b"; fsType = "ext4"; }; | |
"/boot/" = { device = "UUID=fdac080d-d111-455c-a890-bc3e5e08c2d5"; fsType = "ext4"; }; | |
}; | |
boot = { | |
loader = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
virtualisation.virtualbox.guest.enable = true; | |
nixpkgs.config.packageOverrides = pkgs: { | |
linuxPackages = pkgs.linuxPackages // { | |
virtualboxGuestAdditions = pkgs.callPackage ./virtualbox-guest.nix {}; | |
}; | |
}; | |
# ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start: | |
alias FlushSwitch d0 | |
alias FlushRegulator d1 | |
alias Furnace d2 | |
alias FillSwitch d3 | |
alias FillRegulator d4 | |
loop: | |
l r0 FillSwitch Open | |
s FillRegulator On r0 | |
l r0 FlushSwitch Open |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
let | |
inherit (lib) optional optionals; | |
erlang = pkgs.beam.interpreters.erlangR24; | |
elixir = pkgs.beam.packages.erlangR24.elixir_1_13; | |
nodejs = pkgs.nodejs-18_x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -pv $out/repository/{$DIR1,$DIR2} | |
function tryfetch { | |
if [ ! -e "$2" ] ; then | |
echo trying "$1" | |
curl -fk "$1" > "$2" || (echo failed; rm "$2") | |
else | |
true | |
fi | |
} | |
for mirror in $mirrors; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@laptop:~]# nix-instantiate '<nixos>' -A system | |
waiting for the big garbage collector lock... | |
warning: you did not specify ‘--add-root’; the result might be removed by the garbage collector | |
/nix/store/gjyr1f2mp052bdh4j6vxy95m8jl7s04w-nixos-system-laptop-16.09pre82105.7465bcd.drv | |
[clever@laptop:~]$ nix-copy-closure --to root@amd /nix/store/gjyr1f2mp052bdh4j6vxy95m8jl7s04w-nixos-system-laptop-16.09pre82105.7465bcd.drv | |
Password: | |
copying 241 missing paths (3.87 MiB) to ‘root@amd’... | |
[clever@amd-nixos:~]$ nix-copy-closure --to root@router /nix/store/gjyr1f2mp052bdh4j6vxy95m8jl7s04w-nixos-system-laptop-16.09pre82105.7465bcd.drv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Escrow where | |
import Language.Marlowe.Extended | |
main :: IO () | |
main = print . pretty $ contract | |
-- We can set explicitRefunds True to run Close refund analysis | |
-- but we get a shorter contract if we set it to False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{config,pkgs,...}: | |
let | |
myVim = pkgs.vim_configurable.customize { | |
name = "vim"; | |
vimrcConfig = { | |
customRC = '' | |
syntax on | |
set nu | |
set foldmethod=syntax |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rec { | |
test1 = builtins.scopedImport { __nixPath = [ { path = test4; prefix="ssh-config-file"; } ] ++ __nixPath; }; | |
test2 = test1 <nixpkgs/pkgs/build-support/fetchgit/private.nix>; | |
pkgs = import <nixpkgs> {}; | |
test3 = pkgs.callPackage test2 {}; | |
test4 = pkgs.writeText "sshd_config" '' | |
# empty file, use programs.ssh.knownHosts in configuration.nix not StrictHostKeyChecking no | |
''; | |
test5 = test3 { | |
url = "git@github.com:cleverca22/not-os.git"; |
NewerOlder