1
24
2
30
3
21
4
9
Flatpaks in app menu (lemmy.sdf.org)

I believe I solved this problem before, but I can't find the solution again. I have some Flatpaks installed on my NixOS system, but they aren't showing up in the app menu. Does anyone know what might be causing this or how to fix it?

5
8
6
20
submitted 4 days ago* (last edited 4 days ago) by Chewy7324@discuss.tchncs.de to c/nix@programming.dev
7
17
8
3
Git hashes in Nix (wastedintel.ca)
9
2
submitted 5 days ago by gramgan@lemmy.ml to c/nix@programming.dev

I'm trying to set up a simple script (linked to a hotkey in my window manager) that can launch a terminal window with a nix-shell containing packages I specify. So far, I got this:

set packages (fuzzel -d --lines 0 --prompt 'packages for nix-shell > ')
kitty nix-shell --packages $packages --run fish

If I type a single package into my runlauncher (fuzzel) (e.g. grim), the window spawns with a nix-shell as expected; if, however, I attempt to launch a shell with multiple packages (e.g. grim slurp), it fails to launch with the following error:

error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'shell'
         whose name attribute is located at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'buildInputs' of derivation 'shell'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/pkgs/stdenv/generic/make-derivation.nix:383:7:

          382|       depsHostHost                = elemAt (elemAt dependencies 1) 0;
          383|       buildInputs                 = elemAt (elemAt dependencies 1) 1;
             |       ^
          384|       depsTargetTarget            = elemAt (elemAt dependencies 2) 0;

       error: attempt to call something which is not a function but a set

       at «string»:1:107:

            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (grim slurp) ]; } ""
             |                                                                                                           ^

This happens with or without launching a new kitty window, and it happens with other runlaunchers as well. Why on earth isn't this working?

Any help appreciated---thanks, everyone.

10
7
11
17
12
20
Tips&Tricks for NixOS Desktop (discourse.nixos.org)
13
26
14
29
15
19

cross-posted from: https://discuss.tchncs.de/post/22368053

NixOS Facter aims to be an alternative to projects such as NixOS Hardware and nixos-generate-config. It solves the problem of bootstrapping NixOS configurations by deferring decisions about hardware and other aspects of the target platform to NixOS modules.

16
11
submitted 3 weeks ago* (last edited 3 weeks ago) by bajspulver@lemmy.world to c/nix@programming.dev

Maaaybe a stupid question as it might just be the same thing done differently. I'm not bright enough to understand the differences.

hardware.graphics was recently introduced which replaced hardware.opengl. Now, I've got my amdvlk, libva and such configured via hardware.graphics — recently I came across hardware.amdgpu which offers a bunch of options.

Should one combine, use one or the other, or does it make any difference at all?

hardware.amdgpu.opencl.enable
hardware.amdgpu.legacySupport.enable
hardware.amdgpu.initrd.enable
hardware.amdgpu.amdvlk.supportExperimental.enable
hardware.amdgpu.amdvlk.support32Bit.package
hardware.amdgpu.amdvlk.support32Bit.enable
hardware.amdgpu.amdvlk.settings
hardware.amdgpu.amdvlk.package
hardware.amdgpu.amdvlk.enable
hardware.graphics.extraPackages32
hardware.graphics.extraPackages
hardware.graphics.enable32Bit
hardware.graphics.enable

That is, are these two examples the same for all intents and purposes or do either bring anything else?

hardware.amdgpu.amdvlk = {
  enable = true;
  support32Bit.enable = true;
};

# VS.

hardware.graphics = {
  enable = true;
  enable32Bit = true;
  extraPackages = with pkgs; [
    amdvlk
  ];
  extraPackages32 = with pkgs; [
    driversi686Linux.amdvlk
  ];
};
17
15
submitted 1 month ago by ytg@sopuli.xyz to c/nix@programming.dev

Title says it all. The Determinate Systems installer is supposed to have support, but it doesn’t work – from what I can tell, the contexts are wrong. Running restorecon reports changes, but I’m still getting denials. Running on Fedora Asahi Remix 40, if that’s relevant.

Is there any way to make this work? AppArmor is unsupported on Fedora, so I can’t switch to it…

18
6
submitted 1 month ago* (last edited 1 month ago) by letThemPlay@lemmy.one to c/nix@programming.dev

Hi all;

This is a bit of a long shot; but I'm having an issue with trying to modularize my config in preparation for a new laptop.

In particular the issue I have is around passing a path through to an import statement for a home-managed user.

In particular I'm getting undefinedVariable hmPath; but it doesn't seem to be having the same issue when I'm mapping groups and shell; so I can only assume that imports has to be treated differently but I'm at a loss.

Any help on what I've misunderstood would be greatly appreciated.

Snippet below

{ pkgs, config, options, lib, home-manager, ... }:

with lib; let
  cfg = config.ltp.home;

  user = types.submodule ({name, ...}: {
    options = {
      doas.enable = mkEnableOption {
        default = false;
        type = types.bool;
      };

      groups = mkOption {
        default = [];
        type = types.listOf string;
      };

      shell = mkOption {
        default = pkgs.bash;
        type = types.package;
      };

      hmPath = mkOption {
        type = types.path;
      };
    };
  });
in
{
  options.ltp.home = {
    users = mkOption {
      description = Attrset of home-manager users;
      default = {};
      type = types.attrsOf user;
    };
  };

  config = mkIf (cfg.users != {}) (mkMerge [
    {
      users.users = let mkUser =
        lib.attrsets.mapAttrs'
        (
          name: value:
          lib.attrsets.nameValuePair
            "${builtins.baseNameOf name}"
            {
              isNormalUser = true;
              extraGroups = "${groups}";
              shell = "${shell}";
            }
        )
        cfg.users;
      in
      mkUser;
      
      home-manager.users = let mkHmUser =
        lib.attrsets.mapAttrs'
        (
          name: value:
          lib.attrsets.nameValuePair
            "${builtins.baseNameOf name}"
            {
              imports = [ "${hmPath}" ];
            }
        )
        cfg.users;
      in
      mkHmUser;
    }
  ]);
}

Edit...

Solved the initial issue I was confusing myself and should've been using value.hmPath and equivalent inside the lib functions.

Next issue; I'm having is I can't seem to pass through the path for the home-manager module for the user that is give to the import statement.

Edit 2...

I didn't manage to get it working how I was doing it so I've changed my approach; to implicitly reference the users home-manager base module based on the folder structure e.g. ./hosts/${hostname}/users/${builtins.baseNameOf name}

19
26

Just a short elevator pitch that was posted today in that 100 seconds format. Maybe useful in introducing others.

20
18
submitted 1 month ago by pr06lefs@lemmy.ml to c/nix@programming.dev

A big part of why nix documentation is sub par. The essential tomes of nix - the nix manual, the nixos manual, the nixos options, the nixpkgs manual - each of these documents is just one long page.

They are the digital equivalent of scrolls, rather than books (codices?).

Rather than having a page number (or page link), one must unroll the scroll to the point of interest. One cannot simply flip between two points of interest. One cannot have bookmarks, or refer to page numbers. Ctrl-F is helpful, sure, but not great.

For instance, I was just looking for the documentation of the systemd.services. options. Its near the end of the colossally long scroll known as the Nixos Options Appendix. Ctrl-F on systemctl.services will get one million hits on all the myriad services nixos offers before you finally get to the relevant section. And if you do find that section (with single pixel movements of the scroll bar) and then ctrl-f, woe betide you, you're now at the top of the document and your place is lost!

21
14

Hi!

I've ran into an issue with nix develop shells.

My setup:

  • Nix Darwin (macos)
  • Custom TLS certificates installed via nix darwin

Everything works as expected with the installed certificates, but as soon as I enter into a development shell with nix develop, the certificates are not available and thus, I get TLS errors that break whatever I'm doing in the dev shell. If I use an impure development shell, the issue disappears.

Is there a way to use pure nix develop shells which respect the installed certificates?

22
23

I had been struggling for a while to get CUDA on my main NixOS box for some ML programming. It seems there weren't any clear solutions in the NixOS forums, which just suggested suffering through painful build times. Here's my hacky, less Nix-y approach that takes ~5 minutes.

23
11

I followed the wiki on libvirt https://nixos.wiki/wiki/Libvirt and even set up the config for qemu for uefi but it isn't recognizing it I guess. Any ideas? Thanks

24
9
Changing Hardware config (programming.dev)
submitted 1 month ago* (last edited 1 month ago) by adept@programming.dev to c/nix@programming.dev

I want to change my hardware config from 2 btrfs partitions to 1 partition with subvolumes for root, /nix, /home, and maybe some other like /log.

I mainly want to optimize the /nix/store. And possibly being ready to integrate the impermanence module down the line

What would be the easiest way to accomplish this without reinstalling or breaking too much?

Alternativly I thought about using disko and nixos-install the overwrite my second disk

Thank you

25
15

I'm using Nixos 24.05 on my asus zenbook 14 and the scroll speed of the touchpad is rather high.

Is there any way to adjust it from the config? I don't see an option in gnome/wayland

view more: next ›

Nix / NixOS

1657 readers
40 users here now

Main links

Videos

founded 1 year ago
MODERATORS