summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-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',
+ }
+ }
+
+}