From cc37554a799edbaae46017f58666a5a7eecf1d25 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 3 Apr 2018 19:42:40 -0400 Subject: propellor spin --- joeyconfig.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/joeyconfig.hs b/joeyconfig.hs index fa312f1c..645be549 100644 --- a/joeyconfig.hs +++ b/joeyconfig.hs @@ -637,8 +637,7 @@ monsters = -- but do want to track their public keys etc. , host "ns6.gandi.net" $ props & ipv4 "217.70.177.40" , host "animx" $ props - & ipv4 "76.7.162.186" - & ipv4 "76.7.162.187" + & ipv4 "76.7.174.50" ] -- cgit v1.2.3 From 8bccda691ecd87d12ff00ec5448ad3eeaeab4c36 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 5 Apr 2018 12:29:40 -0400 Subject: propellor spin --- joeyconfig.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/joeyconfig.hs b/joeyconfig.hs index 645be549..11f701ff 100644 --- a/joeyconfig.hs +++ b/joeyconfig.hs @@ -637,7 +637,7 @@ monsters = -- but do want to track their public keys etc. , host "ns6.gandi.net" $ props & ipv4 "217.70.177.40" , host "animx" $ props - & ipv4 "76.7.174.50" + & ipv4 "76.7.174.49" ] -- cgit v1.2.3 -- cgit v1.2.3 -- cgit v1.2.3 From 3cba277a166da90d3cceabb144562ec7491f9a6d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 8 Apr 2018 18:13:17 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index 8aa2f3bd..dbee7b0a 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -15,6 +15,7 @@ import qualified Propellor.Property.Git as Git import qualified Propellor.Property.Cron as Cron import qualified Propellor.Property.Service as Service import qualified Propellor.Property.User as User +import qualified Propellor.Property.Group as Group import qualified Propellor.Property.Borg as Borg import qualified Propellor.Property.Apache as Apache import qualified Propellor.Property.Postfix as Postfix @@ -916,10 +917,15 @@ homePowerMonitor user hosts ctx sshkey = propertyList "home power monitor" $ pro & File.ownerGroup "/var/www/html" user (userGroup user) & Git.cloned user "git://git.kitenet.net/joey/homepower" d Nothing & buildpoller + & Systemd.enabled setupservicename + `requires` setupserviceinstalled + `onChange` Systemd.started setupservicename & Systemd.enabled servicename `requires` serviceinstalled `onChange` Systemd.started servicename & User.hasGroup user (Group "dialout") + & Group.exists (Group "gpio") Nothing + & User.hasGroup user (Group "gpio") & Cron.niceJob "homepower upload" (Cron.Times "1 * * * *") user d rsynccommand `requires` Ssh.userKeyAt (Just sshkeyfile) user ctx sshkey @@ -951,6 +957,23 @@ homePowerMonitor user hosts ctx sshkey = propertyList "home power monitor" $ pro , "[Install]" , "WantedBy=multi-user.target" ] + setupservicename = "homepower-setup" + setupservicefile = "/etc/systemd/system/" ++ setupservicename ++ ".service" + setupserviceinstalled = servicefile `File.hasContent` + [ "[Unit]" + , "Description=home power monitor setup" + , "" + , "[Service]" + , "ExecStart=" ++ d ++ "/setup" + , "WorkingDirectory=" ++ d + , "User=root" + , "Group=root" + , "Type=oneshot" + , "" + , "[Install]" + , "WantedBy=multi-user.target" + , "WantedBy=homepower.target" + ] -- Any changes to the rsync command will need my .authorized_keys -- rsync server command to be updated too. rsynccommand = "rsync -e 'ssh -i" ++ sshkeyfile ++ "' -avz rrds/recent/ joey@kitenet.net:/srv/web/homepower.joeyh.name/rrds/recent/" -- cgit v1.2.3 From c479874351956df0faef0f7182be07f7339bdf05 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 8 Apr 2018 18:51:50 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index dbee7b0a..cd0ad26f 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -959,7 +959,7 @@ homePowerMonitor user hosts ctx sshkey = propertyList "home power monitor" $ pro ] setupservicename = "homepower-setup" setupservicefile = "/etc/systemd/system/" ++ setupservicename ++ ".service" - setupserviceinstalled = servicefile `File.hasContent` + setupserviceinstalled = setupservicefile `File.hasContent` [ "[Unit]" , "Description=home power monitor setup" , "" -- cgit v1.2.3 From 04f1f5beaaa6ce4b019f20acde1b0963ea33a8cb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 8 Apr 2018 19:37:12 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index cd0ad26f..eb2adc56 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -1010,6 +1010,7 @@ homeRouter = propertyList "home router" $ props , "dhcp-range=10.1.1.100,10.1.1.150,24h" , "no-hosts" , "address=/honeybee.kitenet.net/10.1.1.1" + , "address=/house.kitenet.net/10.1.1.1" ] `onChange` Service.restarted "dnsmasq" & ipmasq "wlan0" -- cgit v1.2.3 From 0e5bbbd86ed66e982e0b719c2ea8bd695da75cd7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 11 Apr 2018 22:20:00 -0400 Subject: move 1-wire to different gpio pin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index eb2adc56..7d2ae9df 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -1121,13 +1121,13 @@ cubieTruckOneWire = ["--debian", "sun7i-a20-cubietruck"] `assume` MadeChange mydts = - [ "/* Device tree addition enabling onewire sensors on CubieTruck GPIO pin PG8 */" + [ "/* Device tree addition enabling onewire sensors on CubieTruck GPIO pin PC21 */" , "#include " , "" , "/ {" , "\tonewire_device {" , "\t\tcompatible = \"w1-gpio\";" - , "\t\tgpios = <&pio 6 8 GPIO_ACTIVE_HIGH>; /* PG8 */" + , "\t\tgpios = <&pio 2 21 GPIO_ACTIVE_HIGH>; /* PC21 */" , "\t\tpinctrl-names = \"default\";" , "\t\tpinctrl-0 = <&my_w1_pin>;" , "\t};" @@ -1135,7 +1135,7 @@ cubieTruckOneWire = , "" , "&pio {" , "\tmy_w1_pin: my_w1_pin@0 {" - , "\t\tallwinner,pins = \"PG8\";" + , "\t\tallwinner,pins = \"PC21\";" , "\t\tallwinner,function = \"gpio_in\";" , "\t};" , "};" -- cgit v1.2.3