summaryrefslogtreecommitdiff
path: root/manifests/nonlaptop.pp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-01-12 03:53:05 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-01-12 04:11:02 +0100
commit879abc3e7c8d8ee27ea887ffdd5639096760c5bc (patch)
tree65416406500897bf06ac7503659fb3209ee2e666 /manifests/nonlaptop.pp
parentRevert "Move webdav into profiles." (diff)
downloadprofiles-879abc3e7c8d8ee27ea887ffdd5639096760c5bc.tar.gz
profiles-879abc3e7c8d8ee27ea887ffdd5639096760c5bc.tar.xz
Add profile non-laptop.
Diffstat (limited to 'manifests/nonlaptop.pp')
-rw-r--r--manifests/nonlaptop.pp23
1 files changed, 23 insertions, 0 deletions
diff --git a/manifests/nonlaptop.pp b/manifests/nonlaptop.pp
new file mode 100644
index 0000000..8a917d2
--- /dev/null
+++ b/manifests/nonlaptop.pp
@@ -0,0 +1,23 @@
+# For laptops which now work as stationary workstations/servers
+class profiles::nonlaptop (
+ Boolean $dock = false,
+) {
+ ini_setting { 'Disable lid switch':
+ ensure => present,
+ path => '/etc/systemd/logind.conf',
+ section => 'Login',
+ setting => 'HandleLidSwitch',
+ value => if $dock { 'suspend' } else { 'ignore' },
+ }
+
+ if ($dock) {
+ ini_setting { 'Disable lid switch when docked':
+ ensure => present,
+ path => '/etc/systemd/logind.conf',
+ section => 'Login',
+ setting => 'HandleLidSwitchDocked',
+ value => 'ignore',
+ }
+ }
+
+}