summaryrefslogtreecommitdiff
path: root/modules/profiles/manifests/workstation/archlinux.pp
blob: 963f4dfd016dac4aa932aadbca32f0e2f0825f7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 systemctl --machine=hugo@.host --user daemon-reload',
    when       => 'PostTransaction',
    trigger    => {
      operation => 'Upgrade',
      type      => 'Path',
      target    => 'usr/lib/systemd/user/*',
    },
  }
}