refactor
This commit is contained in:
parent
8cd6d3f771
commit
b61d86f525
11 changed files with 550 additions and 562 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ ... }: {
|
_: {
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
virtualisation.oci-containers = {
|
virtualisation.oci-containers = {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ lib, ... }: {
|
{ lib, ... }: {
|
||||||
imports = [ ./filesystem.nix ./kernel.nix ];
|
imports = [ ./filesystem.nix ./kernel.nix ];
|
||||||
|
|
||||||
#hardware.raspberry-pi."4".poe-plus-hat.enable = true;
|
hardware = {
|
||||||
hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true;
|
raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true;
|
||||||
hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb";
|
deviceTree = {
|
||||||
hardware.deviceTree = {
|
filter = "bcm2711-rpi-4*.dtb";
|
||||||
overlays = [
|
overlays = [
|
||||||
# Combined equivalent to:
|
# Combined equivalent to:
|
||||||
# * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
|
# * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
|
||||||
|
@ -218,4 +218,5 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
{ secrets, ... }:
|
{ secrets, ... }: {
|
||||||
let
|
|
||||||
inherit (secrets) frp_config;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.frp = {
|
services.frp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
role = "client";
|
role = "client";
|
||||||
settings = {
|
settings = {
|
||||||
"common" = {
|
"common" = {
|
||||||
server_addr = frp_config.ip;
|
inherit (secrets.frp_config) server_addr token;
|
||||||
server_port = 7000;
|
server_port = 7000;
|
||||||
authentication_method = "token";
|
authentication_method = "token";
|
||||||
token = frp_config.token;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"ssh.rico0" = {
|
"ssh.rico0" = {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ lib, ... }: {
|
{ lib, ... }: {
|
||||||
imports = [ ./filesystem.nix ./kernel.nix ];
|
imports = [ ./filesystem.nix ./kernel.nix ];
|
||||||
|
|
||||||
#hardware.raspberry-pi."4".poe-plus-hat.enable = true;
|
hardware = {
|
||||||
hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true;
|
raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true;
|
||||||
hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb";
|
deviceTree = {
|
||||||
hardware.deviceTree = {
|
filter = "bcm2711-rpi-4*.dtb";
|
||||||
overlays = [
|
overlays = [
|
||||||
# Combined equivalent to:
|
# Combined equivalent to:
|
||||||
# * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
|
# * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
|
||||||
|
@ -218,4 +218,5 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
{ secrets, ... }:
|
{ secrets, ... }: {
|
||||||
let
|
|
||||||
inherit (secrets) frp_config;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.frp = {
|
services.frp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
role = "client";
|
role = "client";
|
||||||
settings = {
|
settings = {
|
||||||
common = {
|
common = {
|
||||||
server_addr = frp_config.ip;
|
inherit (secrets.frp_config) server_addr token;
|
||||||
server_port = 7000;
|
server_port = 7000;
|
||||||
authentication_method = "token";
|
authentication_method = "token";
|
||||||
token = frp_config.token;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"ssh.rico1" = {
|
"ssh.rico1" = {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
{ lib, ... }: {
|
{ lib, ... }: {
|
||||||
imports = [ ./filesystem.nix ./kernel.nix ];
|
imports = [ ./filesystem.nix ./kernel.nix ];
|
||||||
|
|
||||||
#hardware.raspberry-pi."4".poe-plus-hat.enable = true;
|
hardware = {
|
||||||
hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true;
|
raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true;
|
||||||
hardware.deviceTree.filter = "bcm2711-rpi-4*.dtb";
|
deviceTree = {
|
||||||
hardware.deviceTree = {
|
filter = "bcm2711-rpi-4*.dtb";
|
||||||
overlays = [
|
overlays = [
|
||||||
# Combined equivalent to:
|
# Combined equivalent to:
|
||||||
# * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
|
# * https://github.com/raspberrypi/linux/blob/rpi-6.1.y/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts
|
||||||
|
@ -218,4 +218,5 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
system = pkgs.system;
|
inherit (pkgs) system;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
{ secrets, ... }:
|
{ secrets, ... }: {
|
||||||
let
|
|
||||||
inherit (secrets) frp_config;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.frp = {
|
services.frp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
role = "client";
|
role = "client";
|
||||||
settings = {
|
settings = {
|
||||||
"common" = {
|
"common" = {
|
||||||
server_addr = frp_config.ip;
|
inherit (secrets.frp_config) server_addr token;
|
||||||
server_port = 7000;
|
server_port = 7000;
|
||||||
authentication_method = "token";
|
authentication_method = "token";
|
||||||
token = frp_config.token;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"ssh.rico2" = {
|
"ssh.rico2" = {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
system = pkgs.system;
|
inherit (pkgs) system;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
system = pkgs.system;
|
inherit (pkgs) system;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
|
|
BIN
secrets.nix
BIN
secrets.nix
Binary file not shown.
Loading…
Reference in a new issue