implement bootable orphan client
This commit is contained in:
20
flake.nix
20
flake.nix
@@ -21,14 +21,15 @@
|
|||||||
packages = forAllSystems (system:
|
packages = forAllSystems (system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgsFor.${system};
|
pkgs = nixpkgsFor.${system};
|
||||||
in
|
clientPackage = pkgs.buildGoModule {
|
||||||
{
|
|
||||||
default = pkgs.buildGoModule {
|
|
||||||
pname = "client";
|
pname = "client";
|
||||||
inherit version;
|
inherit version;
|
||||||
src = ./client;
|
src = ./client;
|
||||||
vendorHash = null;
|
vendorHash = null;
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
default = clientPackage;
|
||||||
boot-env-iso = nixos-generators.nixosGenerate {
|
boot-env-iso = nixos-generators.nixosGenerate {
|
||||||
inherit system;
|
inherit system;
|
||||||
format = "iso";
|
format = "iso";
|
||||||
@@ -39,18 +40,22 @@
|
|||||||
(modulesPath + "/profiles/base.nix")
|
(modulesPath + "/profiles/base.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
|
||||||
# Disable unneeded features
|
# Disable unneeded features
|
||||||
## boot.loader.grub.enable = true;
|
##boot.loader.grub.enable = true; # Not needed as iso-image.nix in modulesPath defines these and cause conflict
|
||||||
## boot.loader.grub.device = "nodev";
|
##boot.loader.grub.device = "nodev";
|
||||||
documentation.enable = false;
|
documentation.enable = false;
|
||||||
fonts.fontconfig.enable = false;
|
fonts.fontconfig.enable = false;
|
||||||
services.udisks2.enable = false;
|
services.udisks2.enable = false;
|
||||||
|
|
||||||
|
networking.firewall.enable = false; # Technically we COULD use the firewall, but given that this is a network-dependent, one-time-use service, it would cause more issues
|
||||||
|
|
||||||
services.getty.autologinUser = "root";
|
services.getty.autologinUser = "root";
|
||||||
|
|
||||||
|
environment.systemPackages = [ clientPackage ];
|
||||||
environment.etc."profile.local".text = ''
|
environment.etc."profile.local".text = ''
|
||||||
# Minimal shell prompt
|
client
|
||||||
echo "It works!"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
isoImage.squashfsCompression = "gzip -Xcompression-level 1";
|
isoImage.squashfsCompression = "gzip -Xcompression-level 1";
|
||||||
@@ -70,6 +75,7 @@
|
|||||||
pkgs.bashInteractive
|
pkgs.bashInteractive
|
||||||
pkgs.go
|
pkgs.go
|
||||||
pkgs.delve
|
pkgs.delve
|
||||||
|
pkgs.qemu_kvm
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user