this post was submitted on 06 Aug 2023
81 points (88.6% liked)

Asklemmy

45289 readers
1256 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] lily33@lemm.ee 3 points 2 years ago (1 children)

/nix/store is immutable. But there are some files in other places like /etc and /var that are mutable. Also I (or a malicious executable) could, in theory, delete store symlinks and replace them with mutable files. Impermanence helps, but you'll still want some mutable state.

Fully immutable systems have everything outside of /home read-only. NixOS is not one of them.

[โ€“] baduhai@sopuli.xyz 1 points 2 years ago (1 children)

I see.

I don't really get the malicious software point though. All immutable distros have a mechanism for changing, after all they need to be updated. If a malicious executable has root access, which is what you need to change symlinks on NixOS (I know services often get their own user, but unless modified, only root has access to those users), then these malicious executables could also leverage whatever mechanism for change other immutable distros have, to do malicious things, no?

Though I do agree with you, now, that NixOS isn't immutable.

[โ€“] lily33@lemm.ee 1 points 2 years ago (1 children)

There are ways to secure the update process. For example, you can enable secure boot and store your secure boot keys encrypted (or on a smart card). Then (if a full chain of trust is implemented) to update your system, you'd need to enter the private key password (or insert the smart card), and a root-access executable couldn't to that automatically.

[โ€“] baduhai@sopuli.xyz 1 points 2 years ago (1 children)

Yeah, but do other distros do this though? Not that I'm aware.

And surely the same could be done to NixOS, no?

[โ€“] lily33@lemm.ee 1 points 2 years ago* (last edited 2 years ago)

I think it can in theory, but there will be some problems. But most likely Silverblue or something else would have its own problems trying to implement something like that - I don't have any experience with them and don't know how they'd compare.