[–] 1 point 1 year ago (2 children)

I'm also mapping the wrapper over a list and combining it with unmodified packages.

I suppose that is the Nix-y way, but I can't help but feel like it's a bit...manual? I always wondered if I should just wrap all of my home-manager packages that way!

  • source
  • parent
  • context
  • [–] 1 point 1 year ago (4 children)

    I thought this was going to automatically wrap all my packages in NixGL. But this is about the way more convenient NixGL set-up that happened to home-manager last year, yes?

  • source
  • [–] [S] 1 point 1 year ago (2 children)

    That's reassuring thanks! I'm not planning on using home manager for now because it makes more sense to keep original config files so I can use them both on Nix and Arch, but I'll need to look into it when I set up my media server (I know I know, reasonable people just do a debian server, but that seems really boring 😅 ).

    unrelated but fun fact: you can also ship a NixOS system without Nix, it’s not actually needed for it to run! Wait without which Nix? the package manager or the language or something else? (Why is EVERYTHING called "Nix"? 😭 )

  • source
  • parent
  • context
  • [–] 2 points 1 year ago

    The nix wiki actually contains a way to handle this. If you look up “NixOS configuration editors” it has a couple quick commands to make a folder in your user space and link it to the default location of your nix config. This allows you to edit your config without having to escalate privileges of your editor.

  • source
  • [–] 1 point 1 year ago*

    imo flakes are as hard to get into as the 'normal way' if youre starting from scratch. Switching over is easier, you'll need to change quite a bit, but its a lot of boilerplate mostly. All in all I agree with the first comment tho, its worth it.

    Other than that, looks good if its all working for you!

  • source
  • parent
  • context
  • [–] [S] 4 points 1 year ago* (2 children)

    Flakes would be cool if they were easier to use/understand. Not sure if the situation has changed but when I tried to use flakes around 2-3 years ago I had a significant uphill battle in finding good documentation that I could parse, so much so that I gave up. Even getting this config to work I had to scour through their default docs, several hundreds of fellow nix user's repos, several different blog posts, and numerous youtube vids. (some apps still don't work, maybe because of Electron? hard to tell)

    My previous background was manual Archlinux installs and I felt like I hit a brick wall with NixOS back then, maybe it's better? I'm still adverse but willing to try if someone could point me in a good direction to understand flakes.

    Maybe split it into multiples files? Since your config is one file and 600 lines long

    This I can definitely tackle👍

    Check out home-manager. Very good for configuring your home directory

    I know about Home Manger but I decided not to use it as I remember some incompatibilities with how I initially planned things out, I might have more information on this once I check my documentation.

    Either way thanks for your feedback!🫡

  • source
  • parent
  • context
  • [–] 3 points 1 year ago* (3 children)

    The "nix way" to handle this is actually to have all your dotfiles generated and "installed" by Nix as part of your NixOS config (via home-manager), and keep your NixOS config in a git repo that you then nixos-rebuild from (either with nixos-rebuild switch -I nixos-config=. or nixos-rebuild switch --flake ., depending on if you're using flakes or not).

    So I’m kinda wary of doing it on an even more critical file

    Actually, configuration.nix is not critical to the functioning of the system at all; it is only read at "evaluation time", i.e. when you are using nixos-rebuild. As long as it's under a VCS (i.e. you won't lose the contents by the time you want to nixos-rebuild again), you have nothing to worry about. You can ship a NixOS system without it (in fact that's kind of the default). (unrelated but fun fact: you can also ship a NixOS system without Nix, it's not actually needed for it to run!)

  • source
  • [–] 5 points 1 year ago (3 children)

    I'll keep my suggestions small:

    • Use a flake, absolute life-saver
    • Maybe split it into multiples files? Since your config is one file and 600 lines long
    • Check out home-manager. Very good for configuring your home directory
  • source
  • [–] 6 points 1 year ago (1 child)

    FYI – The reference to the flake doesn't have to be a path, but can also point to git repositories. This let's you do fun stuff like:

    nixos-rebuild switch --flake github:myusername/mynixosrepo

    The default fragment name used is the current hostname of the machine, so it can be omitted most of the time.

  • source
  • parent
  • context
  • [–] [S] 2 points 1 year ago*

    Yes that's what I'm using, it's really a great program! But I was wondering if configuration.nix being a symlink would cause problems or if it was fine

    Edit: Ah someone else already replied that it was fine 🙂

  • source
  • parent
  • context
  • view more: ‹ prev