flake.packages: dont export stuff from nixpkgs package sets
This commit is contained in:
parent
598044863f
commit
ceeb526ec5
11
flake.nix
11
flake.nix
|
@ -100,7 +100,7 @@
|
|||
if nixpkgs.lib.hasInfix ":" addr then "[${addr}]" else addr;
|
||||
};
|
||||
# can't use callPackage ./pkgs here, idk why; use import instead
|
||||
overlay = self: super: import ./pkgs {
|
||||
overlay' = args: self: super: import ./pkgs ({
|
||||
pkgs = super;
|
||||
pkgs' = self;
|
||||
lib = super.lib;
|
||||
|
@ -109,16 +109,17 @@
|
|||
nurpkgs = super;
|
||||
};
|
||||
nix-gaming = nix-gaming.packages.${super.system};
|
||||
};
|
||||
} // args);
|
||||
overlay = overlay' { };
|
||||
# I override some settings down the line, but overlays always stay the same
|
||||
mkPkgs = config: import nixpkgs (config // {
|
||||
overlays = (config.overlays or [ ]) ++ [ overlay ];
|
||||
overlays = config.overlays or [ ] ++ [ overlay ];
|
||||
});
|
||||
# this is actual config, it gets processed below
|
||||
config = let
|
||||
mkBpiR3 = args: config: config // {
|
||||
system = "aarch64-linux";
|
||||
modules = (config.modules or [ ]) ++ [ (import ./system/devices/bpi-r3-router.nix args) ];
|
||||
modules = config.modules or [ ] ++ [ (import ./system/devices/bpi-r3-router.nix args) ];
|
||||
};
|
||||
routerConfig = rec {
|
||||
system = "aarch64-linux";
|
||||
|
@ -304,7 +305,7 @@
|
|||
packages = lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
] (system: let self = overlay ((mkPkgs { inherit system; }) // self) (import nixpkgs { inherit system; }); in self);
|
||||
] (system: let self = overlay' { isOverlay = false; } (mkPkgs { inherit system; } // self) (import nixpkgs { inherit system; }); in self);
|
||||
nixosImages.router = let pkgs = mkPkgs { inherit (config.router-emmc) system; }; in {
|
||||
emmcImage = pkgs.callPackage ./system/hardware/bpi-r3/image.nix {
|
||||
inherit (nixosConfigurations.router-emmc) config;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
cfg.enableKeePassXC = true;
|
||||
};
|
||||
profiles.chayleaf = {
|
||||
extensions = with config.nur.repos.rycee.firefox-addons; [
|
||||
extensions = (with config.nur.repos.rycee.firefox-addons; [
|
||||
cookies-txt
|
||||
don-t-fuck-with-paste
|
||||
greasemonkey
|
||||
|
@ -32,7 +32,7 @@
|
|||
unpaywall
|
||||
vimium-c
|
||||
youtube-shorts-block
|
||||
] ++ (with pkgs.firefox-addons; [
|
||||
]) ++ (with pkgs.firefoxAddons; [
|
||||
fastforwardteam
|
||||
middle-mouse-button-scroll
|
||||
rikaitan
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
, nur
|
||||
, nix-gaming
|
||||
, pkgs' ? pkgs
|
||||
, isOverlay ? true
|
||||
, ... }:
|
||||
let
|
||||
inherit (pkgs') callPackage;
|
||||
|
@ -98,8 +99,8 @@ in
|
|||
}));
|
||||
techmino = callPackage ./techmino { };
|
||||
|
||||
firefox-addons = lib.recurseIntoAttrs (callPackage ./firefox-addons { inherit nur sources; });
|
||||
mpvScripts = pkgs.mpvScripts // callPackage ./mpv-scripts { };
|
||||
firefoxAddons = lib.recurseIntoAttrs (callPackage ./firefox-addons { inherit nur sources; });
|
||||
mpvScripts = lib.optionalAttrs isOverlay pkgs.mpvScripts // callPackage ./mpv-scripts { };
|
||||
|
||||
qemu_7 = callPackage ./qemu/7.nix {
|
||||
stdenv = pkgs'.ccacheStdenv;
|
||||
|
@ -127,6 +128,6 @@ in
|
|||
stdenv = pkgs'.ccacheStdenv;
|
||||
};
|
||||
}
|
||||
// import ./postgresql-packages { inherit pkgs pkgs' lib sources; }
|
||||
// import ./postgresql-packages { inherit pkgs pkgs' lib sources isOverlay; }
|
||||
// import ./ccache.nix { inherit pkgs pkgs' lib sources; }
|
||||
// import ../system/hardware/bpi-r3/pkgs.nix { inherit pkgs pkgs' lib sources; }
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{ pkgs
|
||||
, pkgs'
|
||||
, isOverlay
|
||||
, lib
|
||||
, ... }:
|
||||
|
||||
let
|
||||
|
@ -9,7 +11,9 @@ let
|
|||
tsja = callPackage ./tsja.nix { };
|
||||
};
|
||||
gen' = postgresql: builtins.mapAttrs (k: v: v.override { inherit postgresql; }) extraPackages;
|
||||
gen = ver: pkgs."postgresql${toString ver}Packages" // gen' pkgs."postgresql${if ver == "" then "" else "_" + toString ver}";
|
||||
gen = ver:
|
||||
lib.optionalAttrs isOverlay pkgs."postgresql${toString ver}Packages"
|
||||
// gen' pkgs."postgresql${if ver == "" then "" else "_" + toString ver}";
|
||||
psql = ver: let
|
||||
old = pkgs."postgresql${if ver == "" then "" else "_" + toString ver}";
|
||||
in old // { pkgs = old.pkgs // gen' old; };
|
||||
|
@ -23,18 +27,19 @@ let
|
|||
'';
|
||||
});
|
||||
postgresqlPackages = gen "";
|
||||
postgresql = psql "";
|
||||
postgresql11Packages = gen 11;
|
||||
postgresql_11 = psql 11;
|
||||
postgresql12Packages = gen 12;
|
||||
postgresql_12 = psql 12;
|
||||
postgresql13Packages = gen 13;
|
||||
postgresql_13 = psql 13;
|
||||
postgresql14Packages = gen 14;
|
||||
postgresql_14 = psql 14;
|
||||
postgresql15Packages = gen 15;
|
||||
postgresql_15 = psql 15;
|
||||
postgresql16Packages = gen 16;
|
||||
} // lib.optionalAttrs isOverlay {
|
||||
postgresql = psql "";
|
||||
postgresql_11 = psql 11;
|
||||
postgresql_12 = psql 12;
|
||||
postgresql_13 = psql 13;
|
||||
postgresql_14 = psql 14;
|
||||
postgresql_15 = psql 15;
|
||||
postgresql_16 = psql 16;
|
||||
};
|
||||
in self
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
{ config
|
||||
, lib
|
||||
, ... }:
|
||||
|
||||
let
|
||||
cfg = config.server;
|
||||
in {
|
||||
services.nginx.virtualHosts."git.${cfg.domainName}" = let inherit (config.services.forgejo) settings; in {
|
||||
quic = true;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://${lib.quoteListenAddr settings.server.HTTP_ADDR}:${toString settings.server.HTTP_PORT}";
|
||||
};
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
database = {
|
||||
createDatabase = false;
|
||||
user = "gitea";
|
||||
passwordFile = "/secrets/forgejo_db_password";
|
||||
type = "postgres";
|
||||
};
|
||||
lfs.enable = true;
|
||||
settings = {
|
||||
federation.ENABLED = true;
|
||||
"git.timeout" = {
|
||||
DEFAULT = 6000;
|
||||
MIGRATE = 60000;
|
||||
MIRROR = 60000;
|
||||
GC = 120;
|
||||
};
|
||||
mailer = {
|
||||
ENABLED = true;
|
||||
FROM = "Forgejo <noreply@${cfg.domainName}>";
|
||||
PROTOCOL = "smtp";
|
||||
SMTP_ADDR = "mail.${cfg.domainName}";
|
||||
SMTP_PORT = 587;
|
||||
USER = "noreply@${cfg.domainName}";
|
||||
PASSWD = cfg.unhashedNoreplyPassword;
|
||||
FORCE_TRUST_SERVER_CERT = true;
|
||||
};
|
||||
session = {
|
||||
COOKIE_SECURE = true;
|
||||
};
|
||||
server = {
|
||||
ROOT_URL = "https://git.${cfg.domainName}";
|
||||
HTTP_ADDR = "::1";
|
||||
HTTP_PORT = 3310;
|
||||
DOMAIN = "git.${cfg.domainName}";
|
||||
# START_SSH_SERVER = true;
|
||||
# SSH_PORT = 2222;
|
||||
};
|
||||
service = {
|
||||
DISABLE_REGISTRATION = false;
|
||||
REGISTER_MANUAL_CONFIRM = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue