fix: try 'writeShellApplication' for 'astyanax' WOL script
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
username = "h";
|
username = "h";
|
||||||
|
wolInterfaces = import ./wol-interfaces.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -125,7 +126,7 @@ in
|
|||||||
interfaces = {
|
interfaces = {
|
||||||
eno1 = {
|
eno1 = {
|
||||||
wakeOnLan.enable = true;
|
wakeOnLan.enable = true;
|
||||||
macAddress = "02:68:b3:29:da:98";
|
macAddress = wolInterfaces.eno1.macAddress;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
firewall = {
|
firewall = {
|
||||||
|
|||||||
3
hosts/andromache/wol-interfaces.nix
Normal file
3
hosts/andromache/wol-interfaces.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
eno1.macAddress = "02:68:b3:29:da:98";
|
||||||
|
}
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
let
|
let
|
||||||
username = "h";
|
username = "h";
|
||||||
hostName = "astyanax";
|
hostName = "astyanax";
|
||||||
|
wolInterfaces = import ../andromache/wol-interfaces.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -43,7 +44,16 @@ in
|
|||||||
|
|
||||||
secrets.username = username;
|
secrets.username = username;
|
||||||
|
|
||||||
environment.systemPackages = [ inputs.nvim.packages.x86_64-linux.nvim ];
|
environment.systemPackages = [
|
||||||
|
inputs.nvim.packages.x86_64-linux.nvim
|
||||||
|
(pkgs.writeShellApplication {
|
||||||
|
name = "wol-andromache";
|
||||||
|
runtimeInputs = [ pkgs.wakeonlan ];
|
||||||
|
text = ''
|
||||||
|
wakeonlan ${wolInterfaces.eno1.macAddress}
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user