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

[–] [S] 2 points 5 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

  • source
  • parent
  • context
  •  

    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

     

    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

     

    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

     

    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

    [–] [S] 1 point 9 months ago (4 children)

    yea that worked, now im getting this tho:

           … while calling the 'head' builtin
             at /nix/store/kfcxqcxb9hcq6x33sg4cmwakbb1ifwg9-source/lib/attrsets.nix:1713:13:
             1712|           if length values == 1 || pred here (elemAt values 1) (head values) then
             1713|             head values
                 |             ^
             1714|           else
    
           … while evaluating the attribute 'value'
             at /nix/store/kfcxqcxb9hcq6x33sg4cmwakbb1ifwg9-source/lib/modules.nix:1118:7:
             1117|     // {
             1118|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
                 |       ^
             1119|       inherit (res.defsFinal') highestPrio;
    
           … while evaluating the option `system.build.toplevel':
    
           … while evaluating definitions from `/nix/store/kfcxqcxb9hcq6x33sg4cmwakbb1ifwg9-source/nixos/modules/system/activation/top-level.nix':
    
           … while evaluating the option `warnings':
    
           … while evaluating definitions from `/nix/store/kfcxqcxb9hcq6x33sg4cmwakbb1ifwg9-source/nixos/modules/system/boot/systemd.nix':
    
           … while evaluating the option `systemd.services.home-manager-claymorwan.serviceConfig':
    
           … while evaluating definitions from `/nix/store/x4cardk9amcfpx2r02v8ic20aclgjxf4-source/nixos':
    
           … while evaluating the option `home-manager.users.claymorwan.home.file."/home/claymorwan/.config/fontconfig/conf.d/10-hm-fonts.conf".source':
    
           … while evaluating definitions from `/nix/store/x4cardk9amcfpx2r02v8ic20aclgjxf4-source/modules/files.nix':
    
           … while evaluating the option `home-manager.users.claymorwan.home.file."/home/claymorwan/.config/fontconfig/conf.d/10-hm-fonts.conf".text':
    
           … while evaluating definitions from `/nix/store/x4cardk9amcfpx2r02v8ic20aclgjxf4-source/modules/misc/xdg.nix':
    
           … while evaluating the option `home-manager.users.claymorwan.xdg.configFile."fontconfig/conf.d/10-hm-fonts.conf".text':
    
           … while evaluating definitions from `/nix/store/x4cardk9amcfpx2r02v8ic20aclgjxf4-source/modules/misc/fontconfig.nix':
    
           … while evaluating the option `home-manager.users.claymorwan.fonts.fontconfig.configFile.fonts.text':
    
           … while evaluating definitions from `/nix/store/x4cardk9amcfpx2r02v8ic20aclgjxf4-source/modules/misc/fontconfig.nix':
    
           (stack trace truncated; use '--show-trace' to show the full, detailed trace)
    
           error: cannot coerce a set to a string: { __functionArgs = «thunk»; __functor = «lambda __functor @ /nix/store/kfcxqcxb9hcq6x33sg4cmwakbb1ifwg9-source/lib/trivial.nix:1017:17»; override = «thunk»; tests = «thunk»; version = 1; }
    
  • source
  • parent
  • context
  • [–] [S] 1 point 9 months ago* (last edited 9 months ago) (6 children)

    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,
    
  • source
  • parent
  • context
  •  

    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}>
    
     

    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

     

    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

     

    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 ›