summaryrefslogtreecommitdiff
path: root/hosts/muhammed/configuration.nix
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2024-06-03 17:47:56 +0200
committerLinnnus <[email protected]>2024-06-03 17:58:35 +0200
commit62287fec47474be11fbc8638444639c0b56fc47e (patch)
tree99288992896b2eb48234c8abcfb2615c9147cdf7 /hosts/muhammed/configuration.nix
parent6a5b21a6a5308b1fc190f8e25a81f4dc041c344f (diff)
muhammed: Make linux-builder more accesible
Using breakpointHook [0], one can jump into the sandbox of a failing build. This is very useful for debugging. However, building packages inside the linux-builder VM adds an extra layer of abstraction. This patch makes a few changes which make it easier to work: - cntr, which is used to attach to the sandbox, is now included on the builder - You can now sign in to the root user of the VM using the password "root". This is required because cntr must be run as root. [0]: https://www.youtube.com/watch?v=ULqoCjANK-I
Diffstat (limited to 'hosts/muhammed/configuration.nix')
-rw-r--r--hosts/muhammed/configuration.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/hosts/muhammed/configuration.nix b/hosts/muhammed/configuration.nix
index 4959dbb..96564fb 100644
--- a/hosts/muhammed/configuration.nix
+++ b/hosts/muhammed/configuration.nix
@@ -43,6 +43,25 @@
nix.settings.trusted-users = ["linus"];
nix.linux-builder = {
enable = true;
+
+ # Clearing the VM state upon startup should improve reliability at the cost
+ # of some startup speed. Will have to re-evaluate if this trade off is
+ # worth it at some point.
+ ephemeral = true;
+
+ config = {pkgs, ...}: {
+ environment.systemPackages = with pkgs; [
+ # cntr is used to jump into the sandbox of packages that use breakpointHook.
+ pkgs.cntr
+
+ # Nix is used to debug and fetch other tools as needed.
+ pkgs.nix
+ ];
+
+ # Allow root login. This would normally be horrible but it's a local VM so who cares.
+ users.users.root.hashedPassword = "$y$j9T$TosKLKCZ.g9be.Wz5/qVJ.$YWvn4nAp8tn.xhHGBMOz748PHma6QGhN/WShilEbz8A";
+ services.openssh.permitRootLogin = "yes";
+ };
};
# System-specific version info.