7
submitted 1 month ago* (last edited 1 month ago) by claymorwan@lemmy.blahaj.zone to c/nix@programming.dev

Recently garnix shutdown, which mean trying to rebuild my config while having it as a subsituter just failswith a bad gateway. Issue is, to remove it from my config, i gotta rebuild my config, which obviously fails since it tries to check for garnix. Not sure what to do here

EDIT: I fixed by by "overriding" my nix config, I jsut copied the substituter related entry in the nix.conf geberated by nix, pasted them in ~/.config/nix/nix.conf and removed garnix from those, then just rebuild the config and boom it worked. Just dot forget to then remove those lines from the user nix config

[-] claymorwan@lemmy.blahaj.zone 2 points 3 months ago

Yea I'm pretty sure I've also did this correctly since it in fact worked just fine with this electron package I've had in here for a little while now. Looking in nix-tree and searching for nodejs but the only nodejs versions I'm finding are 24.14.1 and no sign of the insecure version. Tried exporting the env and rebuilding my config but it didn't work either

6

I just updated my nixpkgs input and now thenodejs-20.20.2 package (prolly used by another package and idk why) is flagged as insecure, no big deal i just gotta add it to nixpkgs.config.permittedInsecurePackages, which I do:

  nixpkgs.config.permittedInsecurePackages = [
    "nodejs-20.20.2"
    "electron-38.8.4"
  ];

Execpt that it STILL doesn't rebuild and tells me the same error message as when I didn't have added it to the permitted insecure packages

       error: Refusing to evaluate package 'nodejs-20.20.2' in /nix/store/1hb1glkkpl6vjjpfrwzmvjyvhcyqfxfk-source/pkgs/development/web/nodejs/nodejs.nix:689 because it is marked as insecure

       Known issues:
        - This NodeJS release has reached its end of life. See https://nodejs.org/en/about/releases/.

       You can install it anyway by allowing this package, using the
       following methods:

       a) To temporarily allow all insecure packages, you can use an environment
          variable for a single invocation of the nix tools:

            $ export NIXPKGS_ALLOW_INSECURE=1

          Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
                then pass `--impure` in order to allow use of environment variables.

       b) for `nixos-rebuild` you can add ‘nodejs-20.20.2’ to
          `nixpkgs.config.permittedInsecurePackages` in the configuration.nix,
          like so:

            {
              nixpkgs.config.permittedInsecurePackages = [
                "nodejs-20.20.2"
              ];
            }

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
          ‘nodejs-20.20.2’ to `permittedInsecurePackages` in
          ~/.config/nixpkgs/config.nix, like so:

            {
              permittedInsecurePackages = [
                "nodejs-20.20.2"
              ];
            }

not sure what to do when the option to allow insecure packages does not allow insecure packages, weirdly enough tho it works just fine with

5

I need to use multiple ? in one of my flake input's url, the issue is only the first ? gets registered but not the second. I've tried github:SteamClientHomebrew/Millennium?tag=latest?dir=packages/nix which returns this:

error:
       … while updating the lock file of flake 'git+file:///home/claymorwan/.dotfiles?dir=NixOS'

       … while updating the flake input 'millennium'

       error: path '«github:SteamClientHomebrew/Millennium/fcb0e5627deecf2fc03067ee3dfb63d37e8e82d4»/flake.nix' does not exist

Then I've tried github:SteamClientHomebrew/Millennium?dir=packages/nix?tag=latest which returns this:

error:
       … while updating the lock file of flake 'git+file:///home/claymorwan/.dotfiles?dir=NixOS'

       … while updating the flake input 'millennium'

       error: path '«github:SteamClientHomebrew/Millennium/fcb0e5627deecf2fc03067ee3dfb63d37e8e82d4»/packages/nix?tag=latest/flake.nix' does not exist

I've also tried to write the input differently like this

millenium = {
  type = "github";
  owner = "SteamClientHomebrew";
  repo = "Millennium";
  tag = "latest";
  dir = "packages/nix";
  inputs.nixpkgs.follows = "nixpkgs";
}

which also didn't work and returns this

error:
       … while evaluating flake input
         at /home/claymorwan/.dotfiles/NixOS/flake.nix:48:5:
           47|
           48|     millennium = {
             |     ^
           49|       type = "github";

       error: input attribute 'tag' not supported by scheme 'github'

So not really sure how to set that up

8

I've got a local unstable package and I want it to always be at the latest commit from its source's upstream. For that I added passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; in the package, but when I build the package/install it, it doesn't update.

I don't wanna have to manually update the source's rev and hash, maybe I'm just not using it right ?

This is the package: https://codeberg.org/claymorwan/dotfiles/src/commit/9ca46a651a16a5dc85f35d3c0d19bcd03d692fdd/NixOS/pkgs/fluxer/default.nix

And this is how I install it in my config: https://codeberg.org/claymorwan/dotfiles/src/commit/9ca46a651a16a5dc85f35d3c0d19bcd03d692fdd/NixOS/modules/home/Packages/default.nix#L41

[-] claymorwan@lemmy.blahaj.zone 2 points 6 months ago

o yea this did work, i went with the first snippet but im curious abt what the better thing abt diong it in multiple files

2

I'm using xdg.dataFile in order to install krita plugin, the issue is that krita plugin need to have their content placed in the `~/.local/share/krita/pykrita" and cannot be put in subfolder. For now I'm doing

  xdg.dataFile = {
    "krita/pykrita" = {
      enable = true;
      source = pkgs.fetchFromGitHub {
        owner = "veryprofessionaldodo";
        repo = "Krita-UI-Redesign";
        rev = "df37ade2334b09ca30820286e3e16c26b0fbb4f8";
        hash = "sha256-kGs1K2aNIiQq//W8IQ2JX4iyXq43z2I/WnI8aJjg8Yk=";
      };
      recursive = true;
    };
  };

It's fine when i use a single plugin, but when a use multiple plugins i gotta use multiple fetchers which im not sure how to do. tried to do source = <fetcher 1> + <fetcher 2> which surprisingly builds but then the home-manager service fails

[-] claymorwan@lemmy.blahaj.zone 1 points 7 months ago

well this only happens when i use the override on these packages so i suppose it is related

[-] claymorwan@lemmy.blahaj.zone 1 points 7 months ago* (last edited 7 months ago)

o dam yea i had forgotten abt the parens, now i do get this error tho, also good to mention that both package doesn't have any patches to beguin with

error: function 'anonymous lambda' called with unexpected argument 'patches'
       at /nix/store/kfcxqcxb9hcq6x33sg4cmwakbb1ifwg9-source/pkgs/tools/misc/qt5ct/default.nix:1:1:
            1| {
             | ^
            2|   mkDerivation,
4

I'm trying to patch qt5ct and qt6ct with their kde patch, which im doing like so:

  home.packages = with pkgs; [
    kdePackages.qt6ct.overrideAttrs (finalAttrs: previousAttrs: {
      patches = [
        fetchpatch {
          url = "https://aur.archlinux.org/cgit/aur.git/plain/qt6ct-shenanigans.patch?h=qt6ct-kde";
          hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
        }
      ];
    })

    libsForQt5.qt5ct.override {
      patches = [
        fetchpatch {
          url = "https://aur.archlinux.org/cgit/aur.git/plain/qt5ct-shenanigans.patch?h=qt5ct-kde";
          hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
        }
      ];
    }
  ];

but that im getting this error

error: A definition for option `home-manager.users.claymorwan.home.packages."[definition 10-entry 3]"' is not of type `package'. Definition values:
       - In `/nix/store/2p2nainh0h91ijj2724bpg1pc1z8ska5-source/NixOS/modules/home/qt.nix': <function, args: {fetchurl, lib, mkDerivation, qmake, qtbase, qtsvg, qttools}>
[-] claymorwan@lemmy.blahaj.zone 2 points 7 months ago

yea i was abt to edit the post saying i found out lol, but still thanks for the help

2
submitted 7 months ago* (last edited 7 months ago) by claymorwan@lemmy.blahaj.zone to c/nix@programming.dev

I'm currently trying to package a python package called entangled.py, two of its dependencies aren't in the nixpkgs so I also packaged them. Now I'm trying to package the entangled with these two local packages but idk how to actually use them, rn i do this (using buildPythonPackage):

buildPythonPackage rec {
  # ...
  dependencies = [
    py
    filelock
    rich
    rich-argparse
    tomlkit
    copier
    (callPackage ../brei/package.nix)
    pyyaml
    (callPackage ../repl-session/package.nix)
    msgspec
    click
    rich-click
    typeguard
    watchfiles
  ];
  # ...
}

but it returns me this error:

error:
       … while evaluating the attribute 'drvPath'
         at /nix/store/ln4j1iqnnzs2ynx2cr88bdh65fmds2aq-source/lib/customisation.nix:446:7:
          445|     // {
          446|       drvPath =
             |       ^
          447|         assert condition;

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:37:12:
           36|
           37|   strict = derivationStrict drvAttrs;
             |            ^
           38|

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: Dependency is not of a valid type: element 7 of propagatedBuildInputs for python3.13-entangled-cli-2.4.

obviously this is only for testing if the package builds and works correctly, i don't want to send a broken package

SOLUTION: kinda stupid of me lol, i need to add an empty set after the path like so: (callPackage path/to/package { }) also if u're using with import <nixpkgs>;, remove that too

[-] claymorwan@lemmy.blahaj.zone 1 points 8 months ago

first time im earing of Org Roam, but i think i kinda understand, do ya got a repo where i can see how u did it im kinda interested

[-] claymorwan@lemmy.blahaj.zone 2 points 8 months ago

yea i think it may just not be possible yet, looking it up more i've seen people talking abt how a big con of flakes is that flake.nix is not parsed like regular nix files. I'm not sure why they made it work like that but it gets changed eventually cuz that's really too bad we can't do things as simple as imports

[-] claymorwan@lemmy.blahaj.zone 2 points 8 months ago

I followed how u did it but it doesn't seem to work, i keep getting hit with this error:

error: expected a set but got a thunk at /home/claymorwan/.dotfiles/NixOS/flake.nix:4:3
6
submitted 8 months ago* (last edited 8 months ago) by claymorwan@lemmy.blahaj.zone to c/nix@programming.dev

I'm starting to have a lot of flake inputs in my flake.nix file, and it's starting to get really cluttered. I'm wondering if there's a way to separate my inputs into multiple files so it looks cleaner. I've tried to look it up but couldn't really find anything abt it

Edit: Well as it turns out it's not something possible yet, apparently the flake.nix file isn't parsed like regular nix files and doesn't support stuff like import

[-] claymorwan@lemmy.blahaj.zone 2 points 9 months ago

returns this error

error: attribute 'multiPkgs' missing
        at /nix/store/j9lcrp816krraglnjk6r8iacl6jvww87-source/nixos/modules/home/packages.nix:24:19:
            23|     (lutris.overrideAttrs (_: prevAttrs: {
            24|       multiPkgs = prevAttrs.multiPkgs ++ [
              |                   ^
            25|         (pkgs.runCommand "steamrun-lib" { } ''

if i were to guess maybe cuz multiPkgs is defined in fhsenv.nix in not in default.nix, could be wring tho im pretty new to nix packaging

[-] claymorwan@lemmy.blahaj.zone 1 points 9 months ago

tried that too, didn't work either sadly

[-] claymorwan@lemmy.blahaj.zone 1 points 9 months ago

Nope im not running them inside lutris, just thought if i had nix-ld enabled it'd work but apparently not

I did check, "Disable Lutris runtime" is checked off and "Prefer system libraries" is checked on, still doesn't work and dies with an exit code 134

[-] claymorwan@lemmy.blahaj.zone 2 points 9 months ago

I did notice lutris having its own FHS when upgrading, but aw man this looks pretty dam complicated, I'm like a week old to NixOS I have no idea how imma do this lmao, i did attempt the following

failed attemps

home.packages = with pkgs; [
 lutris.overrideAttrs (finalAttrs: previousAttrs: {
      multiPkgs = self ++ [(pkgs.runCommand "steamrun-lib" {}
  "mkdir $out; ln -s ${pkgs.steam-run.fhsenv}/usr/lib64 $out/lib")];
    })
];

and

home.packages = with pkgs; [
 lutris.override {
      buildFHSEnv = self.buildFHSEnv.override {
        multiPkgs = self ++ [(pkgs.runCommand "steamrun-lib" {}
  "mkdir $out; ln -s ${pkgs.steam-run.fhsenv}/usr/lib64 $out/lib")];
      };
    }
];
which obviously didn't work, so yea im kinda lost I'm also really surprised that lutris' FHS just does not have anything to run native linux game by default
6
submitted 9 months ago* (last edited 9 months ago) by claymorwan@lemmy.blahaj.zone to c/nix@programming.dev

I've been trying to run native linux games with lutris but can't get it to work. As far as ik, i can either use steam-app in my termianl, which works, or I can use nix-ld which i did setup and also works when running the game's executable from the terminal

I've setup nix-ld like so:

  programs.nix-ld = {
      enable = true;

      libraries = [(pkgs.runCommand "steamrun-lib" {}
  "mkdir $out; ln -s ${pkgs.steam-run.fhsenv}/usr/lib64 $out/lib")];
};

But for some reasons, when running the game's executable in lutris, it just fails instantly, and I'm kinda out of ideas, if anyone knows what to do that'd be real helpful please

Edit: Ok well apparently it just solved itself ??? I realized i could install lutis using programs.lutris.enable = true; instead of just putting it in home.packages, and apparently it fixed the issue. Idk why or how but ig if u use home manager, insall lutris like so

view more: next ›

claymorwan

0 post score
0 comment score
joined 10 months ago