This file contains 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 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 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 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 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 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 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 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"; |
This file contains 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
import System.Exit (exitWith, ExitCode(ExitSuccess)) | |
import Graphics.UI.GLUT | |
main = do | |
(progName, _args) <- getArgsAndInitialize | |
initialDisplayMode $= [ SingleBuffered, RGBMode ] | |
initialWindowSize $= Size 500 500 | |
_ <- createWindow progName | |
exitWith ExitSuccess |
This file contains 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
with import <nixpkgs> { system = "i686-linux"; }; | |
runCommandCC "filename" { buildInputs = [ gcc ]; } '' | |
cat <<EOF > $out | |
#!${stdenv.shell} | |
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${lib.makeLibraryPath [ zlib ]} \$1 | |
EOF | |
chmod +x $out | |
'' |
NewerOlder