diff --git a/nixos-bootstrap/flake.nix b/nixos-bootstrap/flake.nix index eb9a07a..51d1413 100644 --- a/nixos-bootstrap/flake.nix +++ b/nixos-bootstrap/flake.nix @@ -16,6 +16,7 @@ ISO = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;}; modules = [ + ./installers/ISO.nix ./installer-config.nix ]; }; diff --git a/nixos-bootstrap/installer-config.nix b/nixos-bootstrap/installer-config.nix index d37f40c..6d33596 100644 --- a/nixos-bootstrap/installer-config.nix +++ b/nixos-bootstrap/installer-config.nix @@ -1,18 +1,11 @@ { - config, inputs, pkgs, - modulesPath, lib, ... }: let loginKey = builtins.readFile ./installer.pub; in { - imports = [ - inputs.disko.nixosModules.disko - "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" - ]; - environment.systemPackages = with pkgs; [ inputs.nvix.packages.${pkgs.system}.default vim @@ -23,7 +16,6 @@ in { disko ]; - nixpkgs.hostPlatform = "x86_64-linux"; boot.supportedFilesystems = lib.mkForce ["zfs" "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs"]; networking = { diff --git a/nixos-bootstrap/installers/DigitalOcean.nix b/nixos-bootstrap/installers/DigitalOcean.nix new file mode 100644 index 0000000..b8da12e --- /dev/null +++ b/nixos-bootstrap/installers/DigitalOcean.nix @@ -0,0 +1,6 @@ +{pkgs ? import {}}: let + config = { + imports = []; + }; +in + (pkgs.nixos config).digitalOceanImage diff --git a/nixos-bootstrap/installers/ISO.nix b/nixos-bootstrap/installers/ISO.nix new file mode 100644 index 0000000..d67b647 --- /dev/null +++ b/nixos-bootstrap/installers/ISO.nix @@ -0,0 +1,13 @@ +{ + lib, + inputs, + modulesPath, + ... +}: { + imports = [ + inputs.disko.nixosModules.disko + "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/nixos-bootstrap/justfile b/nixos-bootstrap/justfile index 8109246..a3432a7 100644 --- a/nixos-bootstrap/justfile +++ b/nixos-bootstrap/justfile @@ -3,3 +3,5 @@ default: iso: nix build .#nixosConfigurations.ISO.config.system.build.isoImage && ln -sf result/iso/*.iso install.iso +do: + nix-build ./installers/DigitalOcean.nix