Skip to content

Instantly share code, notes, and snippets.

View lovesegfault's full-sized avatar
🔨

Bernardo Meurer lovesegfault

🔨
View GitHub Profile
diff --git a/systems/foucault.nix b/systems/foucault.nix
index 24c6b91..559a67e 100644
--- a/systems/foucault.nix
+++ b/systems/foucault.nix
@@ -18,7 +18,6 @@
boot.initrd.postDeviceCommands = lib.mkAfter ''
zfs rollback -r rpool/local/root@blank
- zfs rollback -r rpool/local/home@blank
'';
diff --git a/systems/foucault.nix b/systems/foucault.nix
index 24c6b91..88fe8d8 100644
--- a/systems/foucault.nix
+++ b/systems/foucault.nix
@@ -21,6 +21,11 @@
zfs rollback -r rpool/local/home@blank
'';
+ boot.initrd.postMountCommands = ''
+ mkdir -p -m 0700 /home/bemeurer
self: super:
with builtins; with self.lib;
{
mkSecret = { ... }@args:
let
name = baseNameOf (toString args.file);
stub = toFile name "This is a stub!\n";
file =
if pathExists args.file then
args.file
{ config, lib, pkgs, ... }: {
secrets.files.stcg-aarch64-builder-key.file = pkgs.mkSecret ../secrets/stcg-aarch64-builder.key;
nix = {
distributedBuilds = true;
buildMachines = [
{
hostName = "147.75.47.54";
maxJobs = 32;
speedFactor = 1;
sshKey = config.secrets.files.stcg-aarch64-builder-key;
libva info: VA-API version 1.7.0
libva info: Trying to open /run/opengl-driver/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.7.1)
vainfo: Driver version: Intel iHD driver - 19.4.0
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
vainfo: VA-API version: 1.7 (libva 2.7.1)
vainfo: Driver version: Intel iHD driver - 19.4.0
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
self: super: {
mkSecret = path: let
name = builtins.trace self.lib.tail (self.lib.splitString "/" (builtins.toString path));
stub = builtins.toFile name "";
in if builtins.pathExists path then path else self.lib.warn "Using stub for secrets.${name}" stub;
}
diff --git a/default.nix b/default.nix
index 63c5ad3..d98c01b 100644
--- a/default.nix
+++ b/default.nix
@@ -20,4 +20,4 @@ conf: let
{ _module.args.nixusPkgs = nixusPkgs; }
];
};
-in result.config.deployScript // result
+in result.config.deployScript // result // nixusPkgs.lib.mapAttrs (n: v: v.combinedDeployScript) result.config.nodes
[goethe] Connecting to host...
[goethe] Copying closure to host...
[goethe] Copying secrets...
[goethe] Triggering system switcher...
[goethe] + [[ 8888 -ne 0 ]]
[goethe] + exec sudo /nix/store/fhlahb0q0l6dkcpx6hj9w53hq7m88q4l-switch/bin/switch start /nix/store/67bjaqlk8maa1wsnnrpgpj4zls56az80-nixos-system-goethe-20.09pre-git
[goethe] + [[ 0 -ne 0 ]]
[goethe] + mkdir -p /var/lib/system-switcher
[goethe] + chmod 770 /var/lib/system-switcher
[goethe] + cd /var/lib/system-switcher
[goethe] Connecting to host...
[goethe] Copying closure to host...
[goethe] Copying secrets...
[goethe] Triggering system switcher...
[goethe] + [[ 8888 -ne 0 ]]
[goethe] + exec sudo /nix/store/fhlahb0q0l6dkcpx6hj9w53hq7m88q4l-switch/bin/switch start /nix/store/67bjaqlk8maa1wsnnrpgpj4zls56az80-nixos-system-goethe-20.09pre-git
[goethe] + [[ 0 -ne 0 ]]
[goethe] + mkdir -p /var/lib/system-switcher
[goethe] + chmod 770 /var/lib/system-switcher
[goethe] + cd /var/lib/system-switcher