diff options
author | Joey Hess <joeyh@joeyh.name> | 2018-02-06 11:42:02 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2018-02-06 11:42:02 -0400 |
commit | 1bc6af50d3f649b1d1eb70fd8a4a9c8584e2361f (patch) | |
tree | e06c2e8f2b880f212c53d4260bd3c78fecf2c05d | |
parent | 2cfee67820612878a7c1a2c8d3fdf912cb8e1075 (diff) | |
parent | a5aac4e331c3131fc3748212a0f36d88fbf4a03f (diff) |
Merge branch 'joeyconfig'
-rw-r--r-- | joeyconfig.hs | 5 | ||||
-rw-r--r-- | src/Propellor/Property/SiteSpecific/JoeySites.hs | 34 |
2 files changed, 34 insertions, 5 deletions
diff --git a/joeyconfig.hs b/joeyconfig.hs index 1d019498..23da8bb4 100644 --- a/joeyconfig.hs +++ b/joeyconfig.hs @@ -27,7 +27,6 @@ import qualified Propellor.Property.Apache as Apache import qualified Propellor.Property.LetsEncrypt as LetsEncrypt import qualified Propellor.Property.Locale as Locale import qualified Propellor.Property.Grub as Grub -import qualified Propellor.Property.FlashKernel as FlashKernel import qualified Propellor.Property.Borg as Borg import qualified Propellor.Property.Gpg as Gpg import qualified Propellor.Property.Systemd as Systemd @@ -193,9 +192,7 @@ honeybee = host "honeybee.kitenet.net" $ props `mountedAt` "/" `setSize` MegaBytes 8000 ) - & File.hasPrivContentExposed "/etc/flash-kernel/dtbs/sun7i-a20-cubietruck.dtb" - (Context "cubietruck gpio") - `onChange` FlashKernel.flashKernel + & JoeySites.cubieTruckOneWire & Apt.installed ["firmware-brcm80211"] -- Workaround for https://bugs.debian.org/844056 diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index 0a1982c1..23d17e8a 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -1048,7 +1048,7 @@ laptopSoftware = Apt.installed , "ttf-bitstream-vera" , "mairix", "offlineimap", "mutt" , "nmap", "whois", "wireshark", "tcpdump", "iftop" - , "udevil", "pmount", "tree" + , "udevil", "pmount", "tree", "pv" , "arbtt", "hledger", "bc" , "apache2", "ikiwiki", "libhighlight-perl" , "pal" @@ -1079,3 +1079,35 @@ devSoftware = Apt.installed , "gdb", "dpkg-repack", "lintian" , "pristine-tar", "github-backup" ] + +cubieTruckOneWire :: Property DebianLike +cubieTruckOneWire = + File.hasContent "/etc/easy-peasy-devicetree-squeezy/my.dts" mydts + `onChange` utilitysetup + `requires` utilityinstalled + where + utilityinstalled = Git.cloned (User "root") "https://git.joeyh.name/git/easy-peasy-devicetree-squeezy.git" "/usr/local/easy-peasy-devicetree-squeezy" Nothing + `onChange` File.isSymlinkedTo "/usr/local/bin/easy-peasy-devicetree-squeezy" (File.LinkTarget "/usr/local/easy-peasy-devicetree-squeezy/easy-peasy-devicetree-squeezy") + utilitysetup = cmdProperty "easy-peasy-devicetree-squeezy" + ["--debian", "sun7i-a20-cubietruck"] + `assume` MadeChange + mydts = + [ "/* Device tree addition enabling onewire sensors on CubieTruck GPIO pin PG8 */" + , "#include <dt-bindings/gpio/gpio.h>" + , "" + , "/ {" + , "\tonewire_device {" + , "\t\tcompatible = \"w1-gpio\";" + , "\t\tgpios = <&pio 6 8 GPIO_ACTIVE_HIGH>; /* PG8 */" + , "\t\tpinctrl-names = \"default\";" + , "\t\tpinctrl-0 = <&my_w1_pin>;" + , "\t};" + , "};" + , "" + , "&pio {" + , "\tmy_w1_pin: my_w1_pin@0 {" + , "\t\tallwinner,pins = \"PG8\";" + , "\t\tallwinner,function = \"gpio_in\";" + , "\t};" + , "};" + ] |