-
-
Save cleverca22/a046f82e997e2a0c72b2b00c117ab50e to your computer and use it in GitHub Desktop.
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
{ | |
nixosConfigurations = pkgs.nixosConfigurations // { | |
# attrs of interest: | |
# * config.system.build.zfsImage | |
# * config.system.build.uploadAmi | |
zfs-ami = import "${nixpkgs}/nixos" { | |
configuration = { pkgs, lib, ... }: | |
{ | |
imports = [ | |
ops-lib.nixosModules.make-zfs-image | |
ops-lib.nixosModules.zfs-runtime | |
"${nixpkgs}/nixos/modules/profiles/headless.nix" | |
"${nixpkgs}/nixos/modules/virtualisation/ec2-data.nix" | |
]; | |
nix.package = self.packages.x86_64-linux.nixFlakes; | |
nix.extraOptions = '' | |
experimental-features = nix-command flakes | |
''; | |
systemd.services.amazon-shell-init.path = [ pkgs.sops ]; | |
nixpkgs.config.allowUnfreePredicate = x: builtins.elem (lib.getName x) [ | |
"ec2-ami-tools" | |
"ec2-api-tools" | |
]; | |
zfs.regions = [ | |
"eu-west-1" | |
"ap-northeast-1" | |
"ap-northeast-2" | |
"eu-central-1" | |
"us-east-2" | |
]; | |
}; | |
system = "x86_64-linux"; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment