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, lib, ... }: | |
let basePath = ../secrets; in | |
{ | |
options.secrets = with lib; with types; mkOption { | |
type = attrsOf (submodule ({name, ...}: { | |
options = { | |
user = mkOption { | |
type = str; | |
description = "Owner of the secret"; | |
default = "root"; |
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
#!/usr/bin/env bash | |
set -exuo pipefail | |
PROGRAM_NAME="$0" | |
inst() { | |
local system="" host="" action="install" from="auto" mount="" | |
local -a nixCopyArgs | |
while [[ "$#" -gt 0 ]] ; do | |
case "$1" in |
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
CPU will restart. | |
Bootrom start | |
Boot Media: eMMC (Default Speed) | |
Decrypt auxiliary code ...OK | |
lsadc voltage min: 000001C4, max: 000001C5, aver: 000001C4, index: 0000000A | |
Enter boot auxiliary code | |
Auxiliary code - v1.00 |
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, lib, ... }: { | |
options.copy-nixpkgs = lib.mkEnableOption "copying the nixpkgs used to build the system to it, and placing it in NIX_PATH"; | |
config = lib.mkIf config.copy-nixpkgs { | |
nix.nixPath = ["nixpkgs=/var/lib/nixpkgs"]; | |
systemd.tmpfiles.rules = ["L+ /var/lib/nixpkgs - - - - ${pkgs.path}"]; | |
}; | |
} |
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, config, lib, ... }: | |
let | |
hassConfig = (pkgs.formats.yaml {}).generate "home-assistant-configuration" { | |
config = {}; | |
frontend = {}; | |
history = {}; | |
image = {}; | |
input_boolean = {}; | |
input_datetime = { | |
good_morning = { |
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
{ pkgsPath ? <nixpkgs> | |
, pkgs ? import pkgsPath { system = "aarch64-linux"; } }: | |
let | |
thirtythree = import (pkgs.path + "/nixos") { | |
configuration = { | |
nixpkgs.system = "aarch64-linux"; | |
imports = [ | |
./configuration.nix ./firmware.nix | |
]; | |
boot.loader.grub.enable = 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
#!/usr/bin/env python3 | |
import os | |
import sys | |
import re | |
import codecs | |
import subprocess | |
parse = re.compile(r'^(?P<device>.+): (?P<count>[0-9]+) bytes were erased at offset (?P<offset>0x[0-9a-f]+) \((?P<type>.+)\):(?P<bytes>( [0-9a-f][0-9a-f])+)$') |
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, lib, unstable, ... }: | |
with lib; | |
let | |
cfg = config.pflaumen.dns.server; | |
fmt = pkgs.formats.knotConf {}; | |
overlay = _: flip recursiveUpdate { inherit formats; }; | |
formats.knotConf = {}: rec { |
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> {} }: | |
let | |
inherit (pkgs) lib; | |
defaults = { | |
options.networking.interfaces = lib.mkOption { | |
type = lib.types.attrsOf (lib.types.submodule { | |
useDHCP = 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
{ pkgsPath ? <nixpkgs> }: | |
let | |
pkgs = import pkgsPath {}; | |
pkgsAarch64 = import pkgsPath { system = "aarch64-linux"; }; | |
iso = (pkgsAarch64.nixos { | |
imports = [ (pkgsPath + "/nixos/modules/installer/cd-dvd/installation-cd-base.nix") ]; | |
users.users.root.openssh.authorizedKeys.keyFiles = [(builtins.fetchurl https://github.com/lheckemann.keys)]; | |
}).config.system.build.isoImage; |
NewerOlder