From 7c328ba30596970af40e3bade54621ecfa3e7ad1 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 6 Aug 2024 20:32:29 -0400 Subject: initial commit --- configuration/busybox.nix | 4 ++++ configuration/default.nix | 19 +++++++++++++++++++ configuration/minimal.nix | 9 +++++++++ configuration/module-fixes.nix | 18 ++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 configuration/busybox.nix create mode 100644 configuration/default.nix create mode 100644 configuration/minimal.nix create mode 100644 configuration/module-fixes.nix (limited to 'configuration') diff --git a/configuration/busybox.nix b/configuration/busybox.nix new file mode 100644 index 0000000..d9135eb --- /dev/null +++ b/configuration/busybox.nix @@ -0,0 +1,4 @@ +{ pkgs, ... }: +{ + environment.systemPackages = [ pkgs.busybox ]; +} diff --git a/configuration/default.nix b/configuration/default.nix new file mode 100644 index 0000000..1a5b2da --- /dev/null +++ b/configuration/default.nix @@ -0,0 +1,19 @@ +{ + imports = [ + ./busybox.nix + ./minimal.nix # Making this configuration a bit smaller to save on build time & download size + ./module-fixes.nix # Module-level fixes for musl + ]; + + boot.loader.systemd-boot.enable = true; + + fileSystems = { + "/" = { + device = "none"; + fsType = "ramfs"; + }; + }; + + # You probably know the drill. Don't change this. + system.stateVersion = "24.11"; +} diff --git a/configuration/minimal.nix b/configuration/minimal.nix new file mode 100644 index 0000000..ff0ebc2 --- /dev/null +++ b/configuration/minimal.nix @@ -0,0 +1,9 @@ +{ modulesPath, ... }: +{ + imports = [ + # The configuration is mainly for testing. We don't need to actually use much + (modulesPath + "/profiles/minimal.nix") + # This includes perl + (modulesPath + "/profiles/perlless.nix") + ]; +} diff --git a/configuration/module-fixes.nix b/configuration/module-fixes.nix new file mode 100644 index 0000000..ee3005c --- /dev/null +++ b/configuration/module-fixes.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: +{ + environment = { + # NOTE: This is what prints the fun error message about + # binaries not compiled for NixOS not working with it + # + # It's here because on x86_64 systems, a 32-bit `ld` stub + # is built against `pkgs.pkgsi686Linux`; nixpkgs doesn't + # support a pure i686 musl bootstrap, so it throws an eval + # error. womp womp + stub-ld.enable = false; + }; + + # HACK: nixpkgs instantiated for musl doesn't have glibc locales, so the + # default value throws eval errors + # This will probably break something + i18n.glibcLocales = pkgs.emptyFile; +} -- cgit v1.2.3