!BgJZHVOYkwVcEKLAyM:nixos.org

NixOS Deployments

1187 Members
NixOS Deployment tooling280 Servers

Load older messages


SenderMessageTime
21 Nov 2024
@emilazy:matrix.orgemily512 MB is not likely to be a pleasant experience, I would recommend using something else.23:49:43
22 Nov 2024
@jfquesada:matrix.orgice9 joined the room.00:39:39
@itepastra:matrix.orgNoa joined the room.06:41:07
@khartahk:matrix.orgkhartahkThe other option is to swap the drive that's embedded with a larger USB Stick. Which is doable but I'm just trying to see what can be done. It would probably not run much perhaps a SAMBA/NFS share or even that perhaps could utilize zfs to do that. Unless zfs would consume to much space then I'd opt for a mdadm style raid or something like that. Is there a way I could perhaps just boot NixOS from the drive then run it all from memory? 08:38:33
@k900:0upti.meK900Wait08:40:08
@k900:0upti.meK900 512MB disk 08:40:11
@k900:0upti.meK900 Or 512MB memory 08:40:13
@k900:0upti.meK900If it's 512MB disk, and you have a network, just netboot?08:40:26
@khartahk:matrix.orgkhartahkIt's disk and I want this to be a self sufficient NAS for backups which won't have a network drive available to boot from that.08:56:10
@khartahk:matrix.orgkhartahkMemory is 2GB08:56:27
@k900:0upti.meK900Uhh08:58:02
@k900:0upti.meK900And you can't use anything bigger than 512MB?08:58:08
@k900:0upti.meK900Maybe you can do some sort of squashfs thing then08:58:14
@k900:0upti.meK900Because like, if you're going to be updating it, ever, you'll need double the disk space in case of staging merges08:58:31
@k900:0upti.meK900Which means 256MB per config08:58:40
@k900:0upti.meK900Not accounting for any data08:58:44
@khartahk:matrix.orgkhartahk

data would live on 2 hdds. It's just the OS and the services required for it that would live on that drive. I'm guessing someone has done something like this before. My duckduckfoo is just to week to find it :) And yes you are right. I guess the best approach would be:

  • minize the install as much as possible
  • use squashfs to compress it
  • set it up to boot and uncompress that (perhaps even set it to me ran directly from memory)
  • ...

Not sure how to achieve all that seems quite daunting as I haven't dabbled in doing something this complex. I guess I need to start at step 1. and first figure out how to make the size as small as possible. Let's for now just say that is my objective. How to change configuration.nix to use as little space as possible.

09:04:46
@k900:0upti.meK900It really depends on how badly you want to fuck things up 09:06:41
@k900:0upti.meK900You can override basically anything 09:06:45
@k900:0upti.meK900But the more you override, the further from a supported configuration you are 09:07:40
@k900:0upti.meK900There's even things like liminix that fit in tens of megabytes09:08:13
@k900:0upti.meK900But they're not really NixOS anymore09:08:17
@k900:0upti.meK900And barely even nixpkgs09:08:22
@khartahk:matrix.orgkhartahk hm, I'm starting with this config for now: https://github.com/khartahk/nixos-minimal/blob/main/etc/nixos/configuration.nix the hardware-configuration.nix just has the partitions specified and imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; 09:27:53
@khartahk:matrix.orgkhartahkI'm willing to break things or remove stuff that I don't need. I'm really trying first to create as small image as I can. And in doing so i can that build on top of it by re-adding stuff that i need. I guess first thing is to know what I need ... kernel wise etc ... or can I just remove some other bloat that's just obvious and not required to run the OS?09:31:08
@k900:0upti.meK900There's no turnkey solution for this 09:47:50
@k900:0upti.meK900You'll have to experiment 09:47:57
@khartahk:matrix.orgkhartahkany suggestion, pointer, especially examples to remove non-essential things that you may perhaps know would be greatly appreciated.10:07:03
@k900:0upti.meK900https://github.com/NixOS/nixpkgs/blob/1f8150661e78f70bda0b51893344326fc2ca264c/nixos/modules/profiles/minimal.nix#L4 could be a good start10:07:52
@k900:0upti.meK900But that's still very far from how low you could push it if you wanted to10:08:15

Show newer messages


Back to Room ListRoom Version: 6