diff options
author | Azat Bahawi <azat@bahawi.net> | 2022-12-17 20:35:36 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-12-17 20:35:36 +0300 |
commit | 313e18cb6119d4b03580d8d34fbec0c78bca872c (patch) | |
tree | 7d3f9583af9422c80fe20ae1dd1747e6b2c9b9a5 /nixosConfigurations | |
parent | 2022-12-17 (diff) |
2022-12-17
Diffstat (limited to 'nixosConfigurations')
-rw-r--r-- | nixosConfigurations/default.nix | 61 | ||||
-rw-r--r-- | nixosConfigurations/iso/default.nix | 27 |
2 files changed, 63 insertions, 25 deletions
diff --git a/nixosConfigurations/default.nix b/nixosConfigurations/default.nix index 8ebeda4..1ca634a 100644 --- a/nixosConfigurations/default.nix +++ b/nixosConfigurations/default.nix @@ -25,34 +25,45 @@ with lib; let } // extraSpecialArgs; }); + + mkIso = system: { + this = { + hostname = "iso"; + inherit system; + isHeadless = false; + isHeadful = false; + }; + configuration = ./iso; + modules = with inputs; [ + "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel.nix" + ]; + }; + + mkTest = this: { + modules = with inputs; [ + "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" + nixpkgs.nixosModules.notDetected + ]; + inherit this; + }; in mapAttrs' mkConfiguration { - # A dummy configuration to test the "headless" profile. - test-headless = { - modules = with inputs; [ - "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" - nixpkgs.nixosModules.notDetected - ]; - this = { - hostname = "test-headless"; - system = "x86_64-linux"; - isHeadless = true; - isHeadful = false; - }; - }; + # ISO images. + iso-arm = mkIso "aarch64-linux"; + iso-x86 = mkIso "x86_64-linux"; - # A dummy configuration to test the "headful" profile. - test-headful = { - modules = with inputs; [ - "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix" - nixpkgs.nixosModules.notDetected - ]; - this = { - hostname = "test-headful"; - system = "x86_64-linux"; - isHeadless = false; - isHeadful = true; - }; + # Dummy configuration test profiles. + test-headless = mkTest { + hostname = "test-headless"; + system = "x86_64-linux"; + isHeadless = true; + isHeadful = false; + }; + test-headful = mkTest { + hostname = "test-headful"; + system = "x86_64-linux"; + isHeadless = false; + isHeadful = true; }; # A beefy desktop: 7950x/rx6750xt/128GB. diff --git a/nixosConfigurations/iso/default.nix b/nixosConfigurations/iso/default.nix new file mode 100644 index 0000000..e435d0b --- /dev/null +++ b/nixosConfigurations/iso/default.nix @@ -0,0 +1,27 @@ +{ + lib, + pkgs, + ... +}: +with lib; { + secrets = mkForce {}; + + nixfiles.modules = { + git.client.enable = true; + openssh = { + client.enable = true; + server = { + enable = true; + port = 22; + }; + }; + }; + + programs.mtr.enable = true; + + services.getty.autologinUser = mkForce my.username; + + environment.noXlibs = false; + + nixpkgs.config.allowBroken = true; +} |