Nix / NixOS

2373 readers
2 users here now

Main links

Videos

founded 2 years ago
MODERATORS
226
 
 

I was looking up gaming on NixOS and I came across this video. I have never seen this creator before but the video was interesting. So, I thought I'd share.

227
 
 

I know you can go github and just do a file search. I am just wondering if there is a place where people share and give descriptions. I would like to see what is out there in terms of "gaming configurations". But, I also would love to just read some random configs that can help me learn new concepts of what can be done in the config.

228
 
 

I've got a small haskell project and I am building it using a flake using cabal2nix based on a package.yaml file.

nix build works fine, but I have trouble with my nix develop shell. The shell is built using shellFor from haskellPackages.

Is it possible to construct a shell that contains all dependencies to build the package, but not the package itself? I tried returning the buildInputs from the packages function, but that didn't seem to have any effect. When I return my package from that function, all dependencies are available, however the package is also built - is that how it is supposed to be?

#nix #haskell

229
 
 

I was configuring DWM, among other things, for the last 3-4 days, and every single rebuild switch caused a new generation to appear. There were too many Systemd-boot entries so they couldn't even fit on the screen and continued down to Gen 41. It's just crazy.

Edit: This post: https://feddit.uk/post/1454176 shows the rest of the boot entries

230
 
 

I still unfortunately need a windows VM as backup Is it possible to declaratively setup a VM given a path/url to a virtual disk image

231
 
 

I've tried to dual boot with Fedora, NixOS being installed first, but now GRUB menu shows only options for Fedora and I lost my precious NixOS installation. Already tried everything described on Fedora wiki and various Internet sources, but to no avail. Worth mentioning that both os-prober and grub2-mkconfig finds Nix installation but it is not added to grub config.

232
 
 

Anyone know why my dualsense controller won't show up in Bluetooth discovery? Have confirmed it shows up and pairs on my phone and used to show up on my windows machine before I switched

  • It is only on NixOS this seems to happen, both my laptop and PC do this.

  • Yes I have put it into pairing mode, it shows up in discovery on my phone

  • The controller works perfectly when wired

  • Every other Bluetooth device works with no issues

I feel like I'm missing a driver or something but no idea what, can anyone help?

233
 
 

I found no documentation on how to do this but found this option in the home-manager source code that I might not be using correctly:

home-manager.users.my_username.xfconf = {
  enable = true;
  settings."xfce4-keyboard-shortcuts" = {
    "<Super>space" = "rofi -show drun";
    "<Super>space" = "rofi -show drun";
  };
};

Any ideas?

Here is my full configuration.nix file for full context if that helps. I just started with Nix and NixOS this week so I the config is a bit haphazard at the moment.

234
 
 

When I run nixos-rebuild switch, i get this:

trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05

I’m running 23.11 with flakes

235
236
 
 

Disclaimer. I'm doing it anyway.

Long time hacker, and ambi-os user. Latest sexyness is my new macbook. After getting everything setup the way I want it, I start seeing buzz for Nix and got excited, but also bummed out that I didn't start from scratch.

I like new stuff, figuring it out and solving problems, but I also hate broken and unstable stuff. Doubly so when you go to use something you spent time setting up and it fails. Triply on having to switch your daily driver or setup any new system with all of your crazy custom setup.

  • How much pain will I suffer trying to replace brew with nixpkg?
  • Currently I use podman to build containers, should i switch to nix?
  • I use whatever virtual environment is appropriate for the task. Venv, etc. Seems like nix can do a better job?
  • What's the experience like with VSCode?

I am most excited at the prospect of using home-manager. The 'idea' of portability for my profile is pretty nice. I'd like to see it work across osx/win/linux and all the things be the same up to my browser and maybe some other cross-platform common things.

Don't roast me for not being hyper-specific here. I am not an uber-dev. I'd say I lean more into security and dev-ops. Happy to elaborate on anything.

I really want to hear others' experiences. I see the upside and, like I said, I'm going to take on the challenge anyway, but will I end up regretting it?

237
 
 

I'm new to nix, but I really went full beans on it: installed NixOS on my daily and I'm using nix-shell for some projects and yesterday I learned how nix docker images work.

I was actively avoiding flakes because I try never to use unstable/experimental features until they are stabilised so I can rely on them.

Thing is, they seem to be ubiquitous. Their reason to exist makes sense to me and I think I should learn how to use them to fully take advantage of the ecosystem.

My question: is it fairly safe to assume nix flakes won't suddenly break on me? is there any known roadmap to flakes stabilisation?

238
239
 
 
240
 
 

I'm quite new to NixOS and am currently running it inside a VM. I've been using Arch as my daily-driver for almost a year now.

How do i write a NixOS derivation to configure Doom Emacs for me?

I already have my init, config and packages.el files in my dotfiles private repo on Gitlab. Assuming I've already cloned these repos to my home directory, is it possible to create a Nix derivation for this purpose??

EDIT: I've setup my custom Emacs build, and the rest of the script automatically configures doom for me.

241
 
 

I was looking into the prospect of deploying an instance of Lemmy myself. Being an ULTRA nix fanboi (and a Docker-hater), I was immediately struck by how much the process still depends on (and, IMO, is being held hostage by) Docker containers.

Can we (or at least someone more capable and with more free time than I) help the Lemmy community by harnessing the power of nix and flakes to create declarative, reproducible Lemmy scratch-built instance deployment?

I suspect it would be exceptionally easy for some of you out there. If you are a flakes power-user, just think of how much this could help the community (and perhaps awaken a few people to the power of flakes).

ps. if this already exists, please point me in the right direction.

242
243
244
 
 

I have enabled the strongswan plugin for Network Manager via networking.networkmanager.enableStrongSwan.

I manually set up my work VPN using nm-applet, but obviously this won't come with me if I reinstall NixOS, so I'd like to set up the VPN using nix.

The problem is that networking.networkmanager doesn't seem to have any sort of vpn configuration system. How would I go about this?

245
246
247
248
249