diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-07-13 19:42:18 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-07-13 19:42:18 +0200 |
commit | 08035d33995737db3e4178a5201da462011d3483 (patch) | |
tree | 01bbefbcd27de74942ae4cd6f3b7b053304c8734 | |
parent | Spice up run script. (diff) | |
download | webdav_server-08035d33995737db3e4178a5201da462011d3483.tar.gz webdav_server-08035d33995737db3e4178a5201da462011d3483.tar.xz |
workstation by os.
-rw-r--r-- | manifests/site.pp | 26 | ||||
-rw-r--r-- | modules/profiles/manifests/workstation.pp | 4 | ||||
-rw-r--r-- | modules/profiles/manifests/workstation/archlinux.pp | 27 |
3 files changed, 32 insertions, 25 deletions
diff --git a/manifests/site.pp b/manifests/site.pp index bbf89d0..d4dcce9 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -3,31 +3,7 @@ node 'gandalf.adrift.space' { addr => '3', } - # Rebuilt my local xmonad config after an upgrade to xmonad. - # It's required, I think due to something with dynamic linking. - # It's actually pretty ugly that I'm hardcoded in here, but - # something had to be done. - pacman::hook { 'xmonad': - description => 'Rebuild local xmonad config.', - when => 'PostTransaction', - exec => '/bin/sudo -Hu hugo xmonad --recompile', - trigger => { - type => 'Package', - operation => ['Upgrade', 'Install'], - target => 'xmonad*', - }, - } - - pacman::hook { 'systemd daemon-reload': - description => 'Reload systemd user daemon', - exec => '/bin/sudo -Hu hugo systemctl --user daemon-reload', - when => 'PostTransaction', - trigger => { - operation => 'Upgrade', - type => 'Path', - target => '/usr/lib/systemd/user/*', - }, - } + include ::profiles::workstation } node 'hornquist.se' { diff --git a/modules/profiles/manifests/workstation.pp b/modules/profiles/manifests/workstation.pp new file mode 100644 index 0000000..f276957 --- /dev/null +++ b/modules/profiles/manifests/workstation.pp @@ -0,0 +1,4 @@ +class profiles::workstation { + $os = $facts['os']['name'].downcase() + include "::profiles::workstation::${os}" +} diff --git a/modules/profiles/manifests/workstation/archlinux.pp b/modules/profiles/manifests/workstation/archlinux.pp new file mode 100644 index 0000000..29ef380 --- /dev/null +++ b/modules/profiles/manifests/workstation/archlinux.pp @@ -0,0 +1,27 @@ +class profiles::workstation::archlinux { + # Rebuilt my local xmonad config after an upgrade to xmonad. + # It's required, I think due to something with dynamic linking. + # It's actually pretty ugly that I'm hardcoded in here, but + # something had to be done. + pacman::hook { 'xmonad': + description => 'Rebuild local xmonad config.', + when => 'PostTransaction', + exec => '/bin/sudo -Hu hugo xmonad --recompile', + trigger => { + type => 'Package', + operation => ['Upgrade', 'Install'], + target => 'xmonad*', + }, + } + + pacman::hook { 'systemd daemon-reload': + description => 'Reload systemd user daemon', + exec => '/bin/sudo -Hu hugo systemctl --user daemon-reload', + when => 'PostTransaction', + trigger => { + operation => 'Upgrade', + type => 'Path', + target => '/usr/lib/systemd/user/*', + }, + } +} |