summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-10-02 18:37:00 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-10-02 18:37:37 +0200
commit047314b15b75241c3a88decb5cccc9f6190abbd4 (patch)
treec882cd8738c03ece984446dbcffb39b2ded3e963
parentRemove ensure_packages for the time being. (diff)
downloadprofiles-047314b15b75241c3a88decb5cccc9f6190abbd4.tar.gz
profiles-047314b15b75241c3a88decb5cccc9f6190abbd4.tar.xz
Split workstation into X and non-X part.
-rw-r--r--manifests/workstation.pp61
-rw-r--r--manifests/workstation_x.pp67
2 files changed, 68 insertions, 60 deletions
diff --git a/manifests/workstation.pp b/manifests/workstation.pp
index cb11a67..a121042 100644
--- a/manifests/workstation.pp
+++ b/manifests/workstation.pp
@@ -1,7 +1,5 @@
+# Workstation setup, for non graphical environmentns
class profiles::workstation (
- String $xkb_layout = 'planck',
- String $xkb_variant = 'dvorak_a6',
- String $xkb_options = 'compose:caps',
) {
$os_name = $facts['os']['name'].downcase()
if defined($os_name) {
@@ -37,57 +35,6 @@ class profiles::workstation (
source => 'https://raw.githubusercontent.com/HugoNikanor/keymaps/master/linux-tty/dvorak-sv-a6.map',
}
- file { 'Dvorak A6 X11 keyboard layout':
- ensure => file,
- path => '/usr/share/X11/xkb/symbols/planck',
- checksum => 'md5',
- checksum_value => '1f1023f6958916de592695cedbc94e5c',
- source => 'https://raw.githubusercontent.com/HugoNikanor/keymaps/master/X11/planck',
- }
-
- file { '/etc/X11/xorg.conf.d':
- ensure => directory,
- recurse => false,
- }
-
- file { 'X11 Raise max clients':
- ensure => file,
- path => '/etc/X11/xorg.conf.d/99-maxclients.conf',
- content => @(EOF)
- Section "ServerFlags"
- Option "MaxClients" "2048"
- EndSection
- | EOF
- }
-
- file { 'Default X11 keymap':
- ensure => file,
- path => '/etc/X11/xorg.conf.d/00-keyboard.conf',
- content => @("EOF")
- Section "InputClass"
- Identifier "system-keyboard"
- MatchIsKeyboard "on"
- Option "XkbLayout" "${xkb_layout}"
- Option "XkbModel" "pc105"
- Option "XkbVariant" "${xkb_variant}"
- Option "XkbOptions" "${xkb_options}"
- EndSection
- | EOF
- }
-
- file { 'Model M X11 keymap':
- ensure => file,
- path => '/etc/X11/xorg.conf.d/01-model-m.conf',
- content => @(EOF)
- Section "InputClass"
- Identifier "Model M"
- MatchUSBID "17f6:0822"
- Option "XkbLayout" "us"
- Option "XkbVariant" "dvorak"
- EndSection
- | EOF
- }
-
file { 'Setup console':
ensure => file,
path => '/etc/vconsole.conf',
@@ -114,12 +61,6 @@ class profiles::workstation (
content => epp('profiles/keyvalue.epp', { values => $environment }),
}
- file { 'Passmenu with OTP support':
- path => '/usr/local/bin/passmenu',
- mode => '0555',
- source => 'puppet:///modules/profiles/passmenu',
- }
-
include ::profiles::sudo
include ::profiles::mounts
}
diff --git a/manifests/workstation_x.pp b/manifests/workstation_x.pp
new file mode 100644
index 0000000..b065d96
--- /dev/null
+++ b/manifests/workstation_x.pp
@@ -0,0 +1,67 @@
+# Workstation setup, for environments with X
+class profiles::workstation_x (
+ String $xkb_layout = 'planck',
+ String $xkb_variant = 'dvorak_a6',
+ String $xkb_options = 'compose:caps',
+) {
+ include ::profiles::workstation
+
+ file { 'Dvorak A6 X11 keyboard layout':
+ ensure => file,
+ path => '/usr/share/X11/xkb/symbols/planck',
+ checksum => 'md5',
+ checksum_value => '1f1023f6958916de592695cedbc94e5c',
+ source => 'https://raw.githubusercontent.com/HugoNikanor/keymaps/master/X11/planck',
+ }
+
+ file { '/etc/X11/xorg.conf.d':
+ ensure => directory,
+ recurse => false,
+ }
+
+
+ file { 'X11 Raise max clients':
+ ensure => file,
+ path => '/etc/X11/xorg.conf.d/99-maxclients.conf',
+ content => @(EOF)
+ Section "ServerFlags"
+ Option "MaxClients" "2048"
+ EndSection
+ | EOF
+ }
+
+ file { 'Default X11 keymap':
+ ensure => file,
+ path => '/etc/X11/xorg.conf.d/00-keyboard.conf',
+ content => @("EOF")
+ Section "InputClass"
+ Identifier "system-keyboard"
+ MatchIsKeyboard "on"
+ Option "XkbLayout" "${xkb_layout}"
+ Option "XkbModel" "pc105"
+ Option "XkbVariant" "${xkb_variant}"
+ Option "XkbOptions" "${xkb_options}"
+ EndSection
+ | EOF
+ }
+
+ file { 'Model M X11 keymap':
+ ensure => file,
+ path => '/etc/X11/xorg.conf.d/01-model-m.conf',
+ content => @(EOF)
+ Section "InputClass"
+ Identifier "Model M"
+ MatchUSBID "17f6:0822"
+ Option "XkbLayout" "us"
+ Option "XkbVariant" "dvorak"
+ EndSection
+ | EOF
+ }
+
+
+ file { 'Passmenu with OTP support':
+ path => '/usr/local/bin/passmenu',
+ mode => '0555',
+ source => 'puppet:///modules/profiles/passmenu',
+ }
+}