• 1 Post
  • 29 Comments
Joined 2 years ago
cake
Cake day: July 1st, 2023

help-circle
  • adepttoNix / NixOSThoughts on flake-parts?
    link
    fedilink
    English
    arrow-up
    2
    ·
    18 hours ago

    I don’t really like flake-parts or flakelight. I think that part of this is sheer brutalism (I don’t mind writing bare Nix) but part of it is a desire to not rely on flakes which don’t carry their own weight, following Wirth’s principle for compilers.

    How can you say this and still use flake-utils? All it does is manage your systems. You can write your own one-liner for that

    eachSystem = f: lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
    

    Where systems is automatically supplied as a flake input (I think), or you can supply your own list of systems to support. You can then use it like this:

    devShells = eachSystem (pkgs: {
        default = # your devshell
    }
    

    You can of course modify eachSystem to have more function parameters other than pkgs.

    See this blog which initially inspired me not to use flake-utils





  • adeptOPtoNix / NixOSChanging Hardware config
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 months ago

    Thanks for your response.

    That’s exactly what i had in mind. I just wasn’t quite sure it would work out as i imagined.

    Since i asked this question i have already prepared a second (empty) disk and a disko config to make it all declarative. Before i actually apply this config to my second disk i’m looking into creating a VM to test the disko-partitions











  • adepttoLinuxHow often do you hop distros?
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    I use NixOs btw Its awesome. Having a stable system config with home-mangere for the user env is pretty nice to just play around with the security of always being able to switch back to a working generation (some exceptions may apply).

    I was messing with the hardware config (which has a warning not to mess with it if you dont know what you are doing) and corrupted my drives.

    I got my previous system back from a clean install in 30 minutes.