Compare commits
No commits in common. "c20998d3655e479d2004bc982907e79c67e81610" and "c02651e65a7d50796d45263d63f9891b31321084" have entirely different histories.
c20998d365
...
c02651e65a
6 changed files with 4 additions and 65 deletions
|
|
@ -24,7 +24,6 @@
|
||||||
./modules/podman.nix
|
./modules/podman.nix
|
||||||
./modules/omada.nix
|
./modules/omada.nix
|
||||||
./modules/ddclient.nix
|
./modules/ddclient.nix
|
||||||
./modules/cloonar-assistant-config-server.nix
|
|
||||||
# ./modules/wol.nix
|
# ./modules/wol.nix
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
users = [
|
|
||||||
{
|
|
||||||
username = "ca-test";
|
|
||||||
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDglSLU9AUtbU0fCN0eByi/EHyo1QiPPLiscN5RAR+wq";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
userList = lib.concatStringsSep "," (map (u: u.username) users);
|
|
||||||
in {
|
|
||||||
environment.etc = {
|
|
||||||
# our single user+key file
|
|
||||||
"cloonar_assistant_ssh/sftp_users_keys" = {
|
|
||||||
text = lib.concatStringsSep "\n"
|
|
||||||
(map (u: "${u.username} ${u.key}") users);
|
|
||||||
mode = "0600";
|
|
||||||
user = "root";
|
|
||||||
group = "root";
|
|
||||||
};
|
|
||||||
|
|
||||||
# the little awk script to extract the key for $1
|
|
||||||
"ssh/sftp-fetch-key.sh" = {
|
|
||||||
text = ''
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
awk -v u="$1" '$1==u { $1=""; sub(/^ +/, ""); print }' /etc/cloonar_assistant_ssh/sftp_users_keys
|
|
||||||
'';
|
|
||||||
mode = "0700";
|
|
||||||
user = "root";
|
|
||||||
group = "root";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = map (u:
|
|
||||||
# Type 'd' = create directory if missing
|
|
||||||
# Mode 0755, owner root:root
|
|
||||||
"d /home/cloonar-assistant-configs/${u.username} 0755 root root -"
|
|
||||||
) users;
|
|
||||||
|
|
||||||
services.openssh.extraConfig = ''
|
|
||||||
Match User ${userList}
|
|
||||||
X11Forwarding no
|
|
||||||
AllowTcpForwarding no
|
|
||||||
ChrootDirectory /home/cloonar-assistant-configs/%u
|
|
||||||
ForceCommand internal-sftp
|
|
||||||
|
|
||||||
# ← only for those matched users:
|
|
||||||
AuthorizedKeysCommand /etc/cloonar_assistant_ssh/sftp-fetch-key.sh %u
|
|
||||||
AuthorizedKeysCommandUser root
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
@ -18,12 +18,8 @@ in {
|
||||||
friendly_name = "Current Price of electricity";
|
friendly_name = "Current Price of electricity";
|
||||||
unit_of_measurement = "EUR/kWh";
|
unit_of_measurement = "EUR/kWh";
|
||||||
value_template = ''
|
value_template = ''
|
||||||
{{ ((states('sensor.epex_spot_data_price') | float ) + (0.0149 + 0.074 + 0.007 + 0.0074 + 0.0006)) | float }}
|
{{ (((states('sensor.epex_spot_data_price') | int ) / 1000) + (0.0149 + 0.053 + 0.00866)) | float }}
|
||||||
'';
|
'';
|
||||||
entity_id = [
|
|
||||||
"sensor.epex_spot_data_price"
|
|
||||||
"sensor.time"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,6 @@
|
||||||
platform = "state";
|
platform = "state";
|
||||||
entity_id = "binary_sensor.multimedia_device_on";
|
entity_id = "binary_sensor.multimedia_device_on";
|
||||||
to = "off";
|
to = "off";
|
||||||
for = "00:00:30";
|
|
||||||
};
|
};
|
||||||
action = [
|
action = [
|
||||||
{
|
{
|
||||||
|
|
@ -291,7 +290,7 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
delay = 30;
|
delay = 20;
|
||||||
}
|
}
|
||||||
# turn off tv switch
|
# turn off tv switch
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
/home/dominik/projects/cloonar/phishguard-frontend
|
/home/dominik/projects/cloonar/phishguard-frontend
|
||||||
/home/dominik/projects/cloonar/gitapi
|
/home/dominik/projects/cloonar/gitapi
|
||||||
/home/dominik/projects/cloonar/cloonar-assistant
|
/home/dominik/projects/cloonar/cloonar-assistant
|
||||||
/home/dominik/projects/cloonar/cloonar-assistant-customers
|
|
||||||
/home/dominik/projects/cloonar/updns
|
/home/dominik/projects/cloonar/updns
|
||||||
|
|
||||||
/home/dominik/projects/cloonar/flow/flow-docs
|
/home/dominik/projects/cloonar/flow/flow-docs
|
||||||
|
|
|
||||||
|
|
@ -186,10 +186,11 @@ in
|
||||||
url = "https://update.code.visualstudio.com/1.99.0-insider/linux-x64/insider";
|
url = "https://update.code.visualstudio.com/1.99.0-insider/linux-x64/insider";
|
||||||
sha256 = "0z3x9m9pndzka9gzm2phnks453d2mwbdid9yd7qw3bvv965h71j5";
|
sha256 = "0z3x9m9pndzka9gzm2phnks453d2mwbdid9yd7qw3bvv965h71j5";
|
||||||
};
|
};
|
||||||
version = "1.99.3";
|
version = "1.99.0";
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Here goes the rest of your home-manager config, e.g. home.packages = [ pkgs.foo ]; */
|
/* Here goes the rest of your home-manager config, e.g. home.packages = [ pkgs.foo ]; */
|
||||||
# home.persistence."/nix/persist/user/dominik" = {
|
# home.persistence."/nix/persist/user/dominik" = {
|
||||||
# allowOther = true;
|
# allowOther = true;
|
||||||
|
|
@ -608,7 +609,6 @@ in
|
||||||
git clone gitea@git.cloonar.com:Cloonar/gitapi.git ${persistHome}/projects/cloonar/gitapi 2>/dev/null
|
git clone gitea@git.cloonar.com:Cloonar/gitapi.git ${persistHome}/projects/cloonar/gitapi 2>/dev/null
|
||||||
git clone gitea@git.cloonar.com:Cloonar/ai.nvim.git ${persistHome}/cloonar/ai.nvim 2>/dev/null
|
git clone gitea@git.cloonar.com:Cloonar/ai.nvim.git ${persistHome}/cloonar/ai.nvim 2>/dev/null
|
||||||
git clone gitea@git.cloonar.com:Cloonar/cloonar-assistant.git ${persistHome}/projects/cloonar/cloonar-assistant 2>/dev/null
|
git clone gitea@git.cloonar.com:Cloonar/cloonar-assistant.git ${persistHome}/projects/cloonar/cloonar-assistant 2>/dev/null
|
||||||
git clone gitea@git.cloonar.com:Cloonar/cloonar-assistant-customers.git ${persistHome}/projects/cloonar/cloonar-assistant-customers 2>/dev/null
|
|
||||||
git clone gitea@git.cloonar.com:Cloonar/updns.git ${persistHome}/projects/cloonar/updns 2>/dev/null
|
git clone gitea@git.cloonar.com:Cloonar/updns.git ${persistHome}/projects/cloonar/updns 2>/dev/null
|
||||||
|
|
||||||
git clone gitea@git.cloonar.com:Cloonar/flow-docs.git ${persistHome}/projects/cloonar/flow/flow-docs 2>/dev/null
|
git clone gitea@git.cloonar.com:Cloonar/flow-docs.git ${persistHome}/projects/cloonar/flow/flow-docs 2>/dev/null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue