Skip to content

Instantly share code, notes, and snippets.

@placek
Created December 7, 2020 08:12
Show Gist options
  • Save placek/341a6b32799acf04728fed632aef2d3d to your computer and use it in GitHub Desktop.
Save placek/341a6b32799acf04728fed632aef2d3d to your computer and use it in GitHub Desktop.
nix ISOs
# yubikey-installer.nix
{ nixpkgs ? <nixpkgs>, system ? "x86_64-linux" } :
let
config = { pkgs, ... }:
with pkgs; {
imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-kde.nix> ];
boot.kernelPackages = linuxPackages_latest;
services.pcscd.enable = true;
services.udev.packages = [ yubikey-personalization ];
environment.systemPackages = [ gnupg pinentry-curses pinentry-qt paperkey wget ];
programs = {
ssh.startAgent = false;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
};
evalNixos = configuration: import <nixpkgs/nixos> {
inherit system configuration;
};
in {
iso = (evalNixos config).config.system.build.isoImage;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment