Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Minimal Installer Image #130

Draft
wants to merge 1 commit into
base: central
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ in {
);

imports = [
./images
./machines
./modules
./users
Expand Down
3 changes: 3 additions & 0 deletions src/nixos/images/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
imports = [ ./minimal ];
}
84 changes: 84 additions & 0 deletions src/nixos/images/minimal/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{ self, lib, inputs, ... }:

# Experimental image

let
inherit (lib) mkOverride;
in {
perSystem = { system, pkgs, inputs', self', ... }: {
packages.nixos-installer-minimal = inputs.nixos-generators.nixosGenerate {
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};

inherit system;

modules = [
# FIXME(Krey): It wants to create a 16GB ext4 partition for some reason
# self.nixosModules.default # Include NiXium Modules
{
boot.kernelPackages = pkgs.linuxPackages_6_8;
environment.systemPackages = [
pkgs.git
];
nix.settings.experimental-features = "nix-command flakes";

}

# Principles
self.inputs.ragenix.nixosModules.default
self.inputs.sops.nixosModules.sops
self.inputs.hm.nixosModules.home-manager
self.inputs.disko.nixosModules.disko
self.inputs.lanzaboote.nixosModules.lanzaboote
self.inputs.impermanence.nixosModules.impermanence
self.inputs.arkenfox.hmModules.default
self.inputs.nixos-generators.nixosModules.all-formats

{
services.sshd.enable = true; # Start OpenSSH server
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOzh6FRxWUemwVeIDsr681fgJ2Q2qCnwJbvFe4xD15ve kreyren@fsfe.org" # Allow root access for the Super Administrator (KREYREN)
];

networking.wireless.enable = true; # Do Wireless
networking.wireless.userControlled.enable = true; # Allow controlling wpa_supplicant via wpa_cli command
systemd.services.wpa_supplicant.wantedBy = [ "multi-user.target" ]; # Start wpa_supplicant service on startup

# CONFIDENTIAL!
networking.wireless.networks."SSID" = {
hidden = true;
psk = "PSK"; # CONFIDENTIAL!
};
}
];
format = "sd-aarch64";

specialArgs = {
inherit self;

# Priciple args
stable = import inputs.nixpkgs {
inherit system;
config.allowUnfree = false; # Forbid proprietary code
};

unstable = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = false; # Forbid proprietary code
};

staging = import inputs.nixpkgs-staging {
inherit system;
config.allowUnfree = false; # Forbid proprietary code
};

staging-next = import inputs.nixpkgs-staging-next {
inherit system;
config.allowUnfree = false; # Forbid proprietary code
};
};
};
};
}