Conversation
aszlig
left a comment
There was a problem hiding this comment.
I'm all in support for this, just don't want to add unnecessary dependencies as commented. Will change the Hydra channel to the Flake.
|
Thanks, jobset added at https://hydra.build/jobset/shabitica/master, right now there aren't any |
README.rst
Outdated
| .. code-block:: nix | ||
|
|
||
| { inputs, ... }: { | ||
| imports = [inputs.shabitica.nixosModules."x86_64-linux".default]; # change "x86_64-linux" to your actual system |
There was a problem hiding this comment.
Btw. this is not how nixosModules is supposed to work with Flakes, because the system attribute is implied by the current NixOS configuration rather than an individual module.
There was a problem hiding this comment.
changed it to inputs.shabitica.nixosModules.default
|
the go-camo package had the problem that 25.5 will depricate buildGoPackage so i passed the pkgs from the default module to imageproxy. dont know if its the cleanest way |
flake.nix
Outdated
| nixosModules.default = { lib, config, ... }: { | ||
| imports = [ | ||
| (import ./default.nix { | ||
| inherit lib config; | ||
| pkgs = import nixpkgs { | ||
| inherit (config.nixpkgs.localSystem) system; | ||
| }; | ||
| }) | ||
| ]; | ||
| }; |
There was a problem hiding this comment.
The default.nix in the project root is for supporting Hydra channels, so you can just boil it down to the module entrypoint:
| nixosModules.default = { lib, config, ... }: { | |
| imports = [ | |
| (import ./default.nix { | |
| inherit lib config; | |
| pkgs = import nixpkgs { | |
| inherit (config.nixpkgs.localSystem) system; | |
| }; | |
| }) | |
| ]; | |
| }; | |
| nixosModules.default.imports = [ ./modules ]; |
modules/default.nix
Outdated
|
|
||
| in { | ||
| imports = [ ./imageproxy.nix ]; | ||
| imports = [ (import ./imageproxy.nix { inherit config pkgs lib; }) ]; |
There was a problem hiding this comment.
Why are you doing this?
Providing the module as an attribute set shouldn't be needed here because it is already a NixOS module.
Even if it would not be a NixOS module, providing a module as an attribute set like this would miss the key attribute which makes errors less readable since the module name is missing.
There was a problem hiding this comment.
because else it would default to the pkgs defined by the user for the rest of the system, but for example pkgs.buildGoPackage is depricated and removed in newer channels so it has to use the 21.05 channel
There was a problem hiding this comment.
because else it would default to the pkgs defined by the user for the rest of the system, but for example pkgs.buildGoPackage is depricated and removed in newer channels so it has to use the 21.05 channel
Yeah, noticed that already, see my comment below.
| { inputs, ... }: { | ||
| imports = [ inputs.shabitica.nixosModules.default ]; | ||
| #... add your configuration | ||
| } |
There was a problem hiding this comment.
If I'd look at this from a beginner perspective: Where does the inputs attribute come from? Is it a module argument? Is it from another Flake?
Ah, that explains why you passed the module as an attribute set. This however not only has the mentioned issues but also makes it hard to change the module (eg. if the module no longer is a function, we'd need to change the I'd instead add another internal option, eg. |
thats defenitly a better idea 💡 |
|
ok now i messed it up completely. trying to rebuild the system now throws: |
|
still does not work |
This repository is quite out of date. With a flake.nix it can be imported in nixos-unstable or a newer release with pkgs for shabitica pinned at 21.05
i also changed git:// to https:// in the generated file for the node packages.
fixes #11