fix(server): nixpkgs config; migrate to new frp module
This commit is contained in:
@@ -176,6 +176,7 @@
|
||||
];
|
||||
services.frp = {
|
||||
enable = true;
|
||||
instances."" = {
|
||||
role = "client";
|
||||
settings = {
|
||||
serverAddr = "{{ .Envs.FRP_SERVER_ADDR }}";
|
||||
@@ -294,21 +295,6 @@
|
||||
customDomains = [ "coder.imxyy.top" ];
|
||||
}
|
||||
|
||||
{
|
||||
name = "ai-http";
|
||||
type = "http";
|
||||
localIP = "127.0.0.1";
|
||||
localPort = 80;
|
||||
customDomains = [ "ai.imxyy.top" ];
|
||||
}
|
||||
{
|
||||
name = "ai-https";
|
||||
type = "https";
|
||||
localIP = "127.0.0.1";
|
||||
localPort = 443;
|
||||
customDomains = [ "ai.imxyy.top" ];
|
||||
}
|
||||
|
||||
{
|
||||
name = "grafana-http";
|
||||
type = "http";
|
||||
@@ -398,6 +384,7 @@
|
||||
customDomains = [ "memo.imxyy.top" ];
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
name = "efl-matrix-http";
|
||||
type = "http";
|
||||
@@ -429,6 +416,7 @@
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sops.secrets.et-imxyy-nix-server = {
|
||||
sopsFile = secrets.et-imxyy-nix-server;
|
||||
@@ -523,7 +511,6 @@
|
||||
"oidc"
|
||||
"mc"
|
||||
"music"
|
||||
"ai"
|
||||
"sy"
|
||||
"immich"
|
||||
];
|
||||
|
||||
@@ -55,7 +55,7 @@ in
|
||||
}
|
||||
'';
|
||||
};
|
||||
services.frp.settings.proxies = [
|
||||
services.frp.instances."".settings.proxies = [
|
||||
{
|
||||
name = "plant-http";
|
||||
type = "http";
|
||||
|
||||
@@ -36,7 +36,7 @@ in
|
||||
reverse_proxy :8100
|
||||
'';
|
||||
};
|
||||
services.frp.settings.proxies = [
|
||||
services.frp.instances."".settings.proxies = [
|
||||
{
|
||||
name = "rsshub-http";
|
||||
type = "http";
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
reverse_proxy :8101
|
||||
'';
|
||||
};
|
||||
services.frp.settings.proxies = [
|
||||
services.frp.instances."".settings.proxies = [
|
||||
{
|
||||
name = "sshwifty-http";
|
||||
type = "http";
|
||||
|
||||
@@ -42,7 +42,9 @@ local servers = {
|
||||
command = { "nixfmt" },
|
||||
},
|
||||
nixpkgs = {
|
||||
-- language=nix
|
||||
expr = [[
|
||||
if builtins.pathExists ./flake.lock then
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
nodeName = lock.nodes.root.inputs.nixpkgs;
|
||||
@@ -51,6 +53,8 @@ local servers = {
|
||||
url = lock.nodes.${nodeName}.locked.url or "https://github.com/NixOS/nixpkgs/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.${nodeName}.locked.narHash;
|
||||
}) { }
|
||||
else
|
||||
import <nixpkgs> { }
|
||||
]],
|
||||
},
|
||||
},
|
||||
|
||||
14
nixos.nix
14
nixos.nix
@@ -1,8 +1,8 @@
|
||||
{
|
||||
self,
|
||||
withSystem,
|
||||
lib,
|
||||
inputs,
|
||||
pkgsParams,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@@ -15,9 +15,11 @@ let
|
||||
);
|
||||
pkgsModule =
|
||||
{ config, ... }:
|
||||
withSystem config.nixpkgs.hostPlatform.system (perSystem: {
|
||||
nixpkgs.pkgs = perSystem.pkgs;
|
||||
});
|
||||
{
|
||||
nixpkgs = pkgsParams // {
|
||||
inherit (config.nixpkgs.hostPlatform) system;
|
||||
};
|
||||
};
|
||||
hmModule = {
|
||||
home-manager = {
|
||||
sharedModules = [
|
||||
@@ -26,6 +28,10 @@ let
|
||||
inputs.stylix.homeModules.stylix
|
||||
inputs.noctalia.homeModules.default
|
||||
inputs.zen.homeModules.beta
|
||||
|
||||
{
|
||||
nixpkgs = lib.mkForce { };
|
||||
}
|
||||
];
|
||||
useGlobalPkgs = true;
|
||||
};
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgsParams,
|
||||
...
|
||||
}:
|
||||
{
|
||||
perSystem =
|
||||
{ system, pkgs, ... }:
|
||||
{
|
||||
_module.args.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
_module.args = {
|
||||
pkgsParams = {
|
||||
overlays = builtins.attrValues config.flake.overlays ++ [
|
||||
inputs.go-musicfox.overlays.default
|
||||
inputs.niri.overlays.niri
|
||||
@@ -25,6 +23,17 @@
|
||||
config.allowUnfree = true;
|
||||
flake.setNixPath = false;
|
||||
};
|
||||
};
|
||||
perSystem =
|
||||
{
|
||||
system,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
in
|
||||
{
|
||||
_module.args.pkgs = import inputs.nixpkgs (pkgsParams // { inherit system; });
|
||||
|
||||
legacyPackages = pkgs;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user