From 05e5201117b831a5fc0d90ce8e3fc12b57fe6ea0 Mon Sep 17 00:00:00 2001 From: takagemacoed Date: Wed, 30 Jul 2025 11:28:30 +0000 Subject: [PATCH] put nixpkgs.overlays into nixosModules.default so user no need to do it --- README.md | 2 -- contrib/nixos/modules/copyparty.nix | 4 ++++ flake.nix | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 05661ed4..5555b4b1 100644 --- a/README.md +++ b/README.md @@ -2278,8 +2278,6 @@ for this setup, you will need a [flake-enabled](https://nixos.wiki/wiki/Flakes) # load the copyparty NixOS module copyparty.nixosModules.default ({ pkgs, ... }: { - # add the copyparty overlay to expose the package to the module - nixpkgs.overlays = [ copyparty.overlays.default ]; # (optional) install the package globally environment.systemPackages = [ pkgs.copyparty ]; # configure the copyparty module diff --git a/contrib/nixos/modules/copyparty.nix b/contrib/nixos/modules/copyparty.nix index cd4fef40..129893e9 100644 --- a/contrib/nixos/modules/copyparty.nix +++ b/contrib/nixos/modules/copyparty.nix @@ -1,3 +1,4 @@ +{ self }: { config, pkgs, @@ -259,6 +260,9 @@ in command = "${getExe cfg.package} -c ${runtimeConfigPath}"; in { + # add the copyparty overlay to expose the package to the module + nixpkgs.overlays = [ self.overlays.default ]; + systemd.services.copyparty = { description = "http file sharing hub"; wantedBy = [ "multi-user.target" ]; diff --git a/flake.nix b/flake.nix index 5f39d605..5f2041b0 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,7 @@ flake-utils, }: { - nixosModules.default = ./contrib/nixos/modules/copyparty.nix; + nixosModules.default = import ./contrib/nixos/modules/copyparty.nix { inherit self; }; overlays.default = final: prev: rec { copyparty = final.python3.pkgs.callPackage ./contrib/package/nix/copyparty { ffmpeg = final.ffmpeg-full;