Framework NixOS (Linux) users self-help

Making this the dedicated Nix thread, will merge Nix issues to better make this a resource.

35 Likes

Please subscribe if you are willing to help other NixOS on Framework users. Feel free to post if you need help or would like to discuss anything. Cheers.

2 Likes

GitHub - NixOS/nixos-hardware: A collection of NixOS modules covering hardware quirks. has support for framework

1 Like

Moved the thread here. Great idea, but best seen in the Linux forum.

My own contribution.

2 Likes

I have my Framework 13’s system configuration based on flake here. It enables impermanence + Secure Boot + TPM Unlocking LUKS on top of LVM and BTRFS. I daily drive this with multiple systems and try to keep it as simple or straightforward as possible. Would be happy to help anyone else get set up with similar configuration.

9 Likes

Fingerprint assistance:

How to add a kernel param with space? I want to add acpi_osi="!Windows 2020" to the kernel params, but the space in the middle is always failing the checks of nixos-rebuild switch.

The option type for boot.kernelParams indicates this should be possible as long as it adheres to the regex, which is basically spaces only inside double quotes. How are you formatting it? I would think this should work:

{
    boot.kernelParams = [ ''acpi_osi="!Windows 2020"'' ];
}

Ugh brain hurts but learning so much about NixOS. Have a 12th gen intel framework right now and trying to see just how far I can get since I can far more rapidly iterate and customize with Nix (I love arch but after a few months when I want to try something else reproducing it is to much of a pain.)

I have a few full builds done now but I am trying to start down the path of customizing it to my framework and adding in all the security stuff I feel like no distro does right easily and reproducible (sane secure-boot enforcement & TPM2 backed full disk encryption).

I get to the point where I have set up all of the resources and it errors out when processing:
options = [ “subvol=root” “compress=zstd” “noatime” ];

the config expects [ "subvol; and doesnt like the = for root or any other subvol. Made me laugh that its just defining subvolume labels it was having a problem parsing.

I almost feel it would be easier to differ kjhoerr’s work, but I don’t feel like I am quite ready for full flakes and wrapping up my home in home-manager. (I feel like customizing the hardware and getting all the security stuff the way I want it first is a better plan).

It will be fun to see what the configurations are like for those on the Zen 4 boards, when they drop.

I felt the same way when I started with NixOS about a year and a half ago, and it took about a year to come around on using flakes and home manager. Personally I think you should take your time, I think it’s worth it - it’s certainly mind-boggling starting out but eventually I felt more stable in making changes and figured out where I wanted to play around with and change my configuration in different ways.

Is that copied directly? Because those are special double quotes which may be messing things up

agreed. My challenge is I am not a coder, I am more process oriented and an End User Computing person. Once you start going into the complexity of nesting and cross referencing things my eyes can start glassing over for a bit. Nix with flakes takes you out of that scripting mindset and throws you into some of the deep end of coder, but without the solid tools and documentation because its still a work in progress.
That being said NixOS is the first linux OS to excite me since Arch. Targeted and strategic immutable os is pretty much the first design of a linux OS I could see for wide spread use in a corp environment from an end user perspective. Fedora and Ubuntu are ok, but when a user kills their OS the rebuild causes most people to shut down. Windows and Mac OS can be done through muscle memory, but people despise it. And Apple is so enterprise hostile its amazing.
I think NixOS might be a few years away from being useful with decent tools and workarounds to make a real good middle ground people can define and then make sub-distros out of targeting various niches (Kinda like how Valve took Arch for the Steam Deck).

I fixed it Monday but didn’t have time to update. TLDR it was an issue with the LVM example I copied from an article. I decided to just go without the LVM since I dont need a swap and everything started working.

Eventually I want to get it so someone can just clone another version of my repo and have a basic Gnome NixOS install after a little partition setup. TPM2 for storage decryption, secure boot, add in your hardware flake reference, and tweak the super stripped down list of packages I am going to propose in the example repo.
But yah. 80% of everything can be installed as flatpak or appimage with the remaining 20% being system and a few user apps (still need to wrap my brain around how I will do portmaster and a few other tools). Will make it super interesting if I can get it going good enough I can wrap this up as golden VM images and automate it as dynamic instant clones. Spin up hundreds of NixOS sessions per hour with a half dozen files, some CLI, and a dynamic entitlement. The EUC dream. :wink:

3 Likes

Dropping this here for Fingerprint readers:

Anyone got fw-fanctrl running? Tried to create a nixpkgs, but i’m still a to big beginner atm

I found the following which seems to work fine:

3 Likes

Thanks alot, don’t know, why i wasn;t finding it on github. Was mostly look for the ectool GitHub - ssddq/fw-ectool

Hiya, author of this repo here. Just stumbled upon this thread, cool to see that some people seem to find the packaging of fw-fanctrl helpful :slight_smile:

If you encounter any problems I’d appreciate it if you could open an issue on Github. I’m not very experienced with packaging software for Nix, so any feedback or tips would be great!

3 Likes

What xkbmodel should I set for the US english keyboard? My media keys (other than volume up/down/mute) don’t produce correct/any output, and I believe that’s the cause.