Nix / NixOS

1982 readers
1 users here now

Main links

Videos

founded 2 years ago
MODERATORS
176
177
 
 

I've found the built in nix firewall to be somewhat lacking (can't have different ports open on different networks for instance, I would rather reduce my attack surface while out on other people's/public WiFi)

Is it possible to use other firewall software on NixOS declaratively?

178
179
180
 
 

I agree that dockerfile's are not very reproducible. But honestly, that's not how most people use it. I believe most people just pull the already built image which is very reproducible. Anyways, I found this video interesting and thought I'd share it and get your guys thoughts.

181
1
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
 

Edit: Solved at https://lemmings.world/comment/1719409


Hi there! I'm trying to make php and composer work. I have this in environment.systemPackages:

    (pkgs.php82.buildEnv {
      extensions = ({ enabled, all }: enabled ++ (with all; [
        xdebug
        redis
      ]));
      extraConfig = ''
        memory_limit=2G
        xdebug.mode=debug
      '';
    })
    php82Extensions.redis

The problem is that while running php -m correctly prints that redis extension is installed, composer does not, because it uses a different php:

  • file $(which php) prints the path /nix/store/igx8j4qjxy9jyj8kjyccwarnzqq5vsml-php-with-extensions-8.2.9/bin/php
  • cat $(which composer) shows that it's a wrapper for '/nix/store/lv4prxa52zifr54ws56iz3b9kdhs1b5w-php-with-extensions-8.2.9/bin/php' --add-flags '/nix/store/avqj0662f4gg2s875zlbbjajx6fm6bl0-php-composer-2.5.5/libexec/composer/composer.phar'

Note that the path to php is different. Is there any way to correct it on my side? I'd like to avoid having to install composer manually

182
 
 

I hope I am not coming across as spamming as this is my third post to this community today. I won't do another today but I just thought this was interesting. I watch most of CTT's videos and this was one from a live stream where he went into gaming on NixOS.

183
 
 

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.

184
 
 

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.

185
 
 

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

186
 
 

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

187
 
 

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

188
 
 

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.

189
 
 

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?

190
 
 

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.

191
 
 

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

192
193
 
 

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?

194
195
 
 
196
 
 

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.

197
1
submitted 2 years ago* (last edited 2 years ago) by [email protected] to c/[email protected]
 
 

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.

198
199
200
 
 

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?

view more: ‹ prev next ›