aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/etc/rc.local5
-rw-r--r--manifests/base/physical.pp24
-rw-r--r--manifests/role/nas.pp7
-rw-r--r--manifests/subsystem/inception.pp2
-rw-r--r--manifests/subsystem/modprobe/module.pp38
-rw-r--r--manifests/subsystem/sensors.pp56
-rw-r--r--manifests/utils/bundle/standard.pp8
-rw-r--r--manifests/utils/development/debian.pp1
-rw-r--r--manifests/utils/development/ide.pp1
-rw-r--r--manifests/utils/firmware/efi.pp10
-rw-r--r--manifests/utils/interface.pp16
-rw-r--r--manifests/utils/multimedia.pp3
-rw-r--r--manifests/utils/multimedia/bluetooth.pp13
-rw-r--r--manifests/utils/network/minimal.pp1
14 files changed, 159 insertions, 26 deletions
diff --git a/files/etc/rc.local b/files/etc/rc.local
index 8d93e07..fd951eb 100644
--- a/files/etc/rc.local
+++ b/files/etc/rc.local
@@ -19,6 +19,11 @@ fi
# Force the hostname
/bin/hostname `cat /etc/hostname`
+# Remove puppetd lock, then restart puppet with the right hostname
+# Not using this anymore since we moved to a masterless setup.
+#rm -f /var/lib/puppet/state/puppetdlock
+#/etc/init.d/puppet restart
+
# Keep this mountpoint while ekeyd fact needs it
if [ -d "/proc/bus/usb" ]; then
/bin/mount -t usbfs usbfs /proc/bus/usb -onodev,noexec,nosuid
diff --git a/manifests/base/physical.pp b/manifests/base/physical.pp
index 2f63094..035f5c7 100644
--- a/manifests/base/physical.pp
+++ b/manifests/base/physical.pp
@@ -1,23 +1,17 @@
class nodo::base::physical inherits nodo::base::host {
- $smartmontools = lookup('nodo::smartmontools', undef, undef, true)
+ include nodo::subsystem::sensors
- if $smartmontools == true {
- class { 'smartmontools': }
- }
+ # Downtime monitoring
+ #
+ # Check https://tracker.debian.org/pkg/downtimed
+ # https://packages.debian.org/bookworm/downtimed
+ # https://dist.epipe.com/downtimed/
- package { [ 'lm-sensors', ]:
- ensure => present,
- }
+ $downtimed = lookup('nodo::downtimed', undef, undef, 'absent')
- # Deprecated
package { [
- 'hddtemp',
+ 'downtimed',
]:
- ensure => $::lsbdistcodename ? {
- 'wheezy' => present,
- 'buster' => present,
- 'bullseye' => present,
- default => absent,
- }
+ ensure => $downtimed,
}
}
diff --git a/manifests/role/nas.pp b/manifests/role/nas.pp
index 6f3a800..27d06bd 100644
--- a/manifests/role/nas.pp
+++ b/manifests/role/nas.pp
@@ -307,9 +307,10 @@ class nodo::role::nas(
#
$torrent = lookup('nodo::role::nas::torrent', undef, undef, false)
- if $torrent == true {
- include pyroscope
- }
+ # Pyroscope not being managed right now
+ #if $torrent == true {
+ # include pyroscope
+ #}
#
# DAAP
diff --git a/manifests/subsystem/inception.pp b/manifests/subsystem/inception.pp
index d4bb07c..7cd9d0a 100644
--- a/manifests/subsystem/inception.pp
+++ b/manifests/subsystem/inception.pp
@@ -9,7 +9,7 @@ define nodo::subsystem::inception(
user => $name,
provider => git,
source => "https://git.fluxo.info/${git_dev}/apps",
- revision => 'def32ac6684a92d0ea55529a6def6f074bebf8d0',
+ revision => 'e59e4465dd90943853aba944056e0790c8c746e1',
submodules => true,
require => [ File["/home/${name}"], User[$name] ],
}
diff --git a/manifests/subsystem/modprobe/module.pp b/manifests/subsystem/modprobe/module.pp
new file mode 100644
index 0000000..21b7398
--- /dev/null
+++ b/manifests/subsystem/modprobe/module.pp
@@ -0,0 +1,38 @@
+#
+# Handles Linux kernel module loading.
+#
+# Module loading is implemented both for SysV and systemd based systems, to
+# ensure this module is managed in either case.
+#
+# It also remains to be tested whether _both_ /etc/modules and /etc/modules-load.d
+# are processed by recent systemd-based Debian systems; or if there are
+# inconsistencies between the implementation and the documentation:
+#
+# https://wiki.debian.org/Modules#Automatic_loading_of_modules
+#
+# Anyway, having this configuration in both places does not seem to hurt (much).
+#
+# Check also https://wiki.archlinux.org/title/Kernel_module#Automatic_module_loading
+# https://unix.stackexchange.com/questions/189670/whats-the-difference-of-etc-modules-load-d-and-etc-modules
+#
+# In the future, this definition can also manage /etc/modprobe.d/ entries.
+#
+define nodo::subsystem::modprobe::module(
+ $ensure = 'present',
+){
+ # Drivetemp module loading for systems using SysV -- /etc/modules - modules(5)
+ file_line { "etc-modules-${name}":
+ path => "/etc/modules",
+ line => "${name}",
+ ensure => $ensure,
+ }
+
+ # Drivetemp module loading using systemd's /etc/modules-load.d/ - modules-load.d(5)
+ file { "/etc/modules-load.d/${name}.conf":
+ ensure => $ensure,
+ owner => root,
+ group => root,
+ mode => '0644',
+ content => "${name}\n",
+ }
+}
diff --git a/manifests/subsystem/sensors.pp b/manifests/subsystem/sensors.pp
new file mode 100644
index 0000000..8a19831
--- /dev/null
+++ b/manifests/subsystem/sensors.pp
@@ -0,0 +1,56 @@
+class nodo::subsystem::sensors {
+ #
+ # SMART monitoring
+ #
+
+ $smartmontools = lookup('nodo::sensors::smartmontools', undef, undef, 'present')
+
+ if $smartmontools == 'present' {
+ class { 'smartmontools': }
+ }
+
+ #
+ # LM Sensors
+ #
+
+ $lm_sensors = lookup('nodo::sensors::lm_sensors', undef, undef, 'present')
+
+ package { [
+ 'lm-sensors',
+ ]:
+ ensure => $lm_sensors,
+ }
+
+ #
+ # drivetemp
+ #
+ # Just load this driver and lm-sensors will detect sensors automatically.
+ #
+ # https://www.baeldung.com/linux/hdd-ssd-temperature
+ # https://askubuntu.com/questions/1426482/tool-to-monitor-hdd-temperature-in-ubuntu-server-22-04
+ # https://wiki.archlinux.org/title/Lm_sensors#S.M.A.R.T._drive_temperature
+ # https://github.com/philipl/drivetemp
+
+ $drivetemp = lookup('nodo::sensors::drivetemp', undef, undef, 'present')
+
+ nodo::subsystem::modprobe::module { 'drivetemp':
+ ensure => $drivetemp,
+ }
+
+ #
+ # hddtemp
+ #
+
+ # Deprecated in favor of drivetemp:
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1002484
+ package { [
+ 'hddtemp',
+ ]:
+ ensure => $::lsbdistcodename ? {
+ 'wheezy' => present,
+ 'buster' => present,
+ 'bullseye' => present,
+ default => absent,
+ }
+ }
+}
diff --git a/manifests/utils/bundle/standard.pp b/manifests/utils/bundle/standard.pp
index ff33e87..fe6e37c 100644
--- a/manifests/utils/bundle/standard.pp
+++ b/manifests/utils/bundle/standard.pp
@@ -3,9 +3,11 @@ class nodo::utils::bundle::standard {
include nodo::utils::office::gui
include nodo::utils::printer
include nodo::utils::network
- include nodo::utils::network::xmpp
include nodo::utils::web::gui
- include nodo::utils::desktop::gnome
include nodo::utils::desktop::cinnamon
- include nodo::utils::multimedia::downloaders
+
+ # Old dependencies
+ #include nodo::utils::network::xmpp
+ #include nodo::utils::desktop::gnome
+ #include nodo::utils::multimedia::downloaders
}
diff --git a/manifests/utils/development/debian.pp b/manifests/utils/development/debian.pp
index 4f0831b..2836d95 100644
--- a/manifests/utils/development/debian.pp
+++ b/manifests/utils/development/debian.pp
@@ -29,6 +29,7 @@ class nodo::utils::development::debian (
'apt-listchanges',
'apt-forktracer',
'aptitude',
+ 'apt-utils',
#'deborphans',
]:
ensure => $ensure,
diff --git a/manifests/utils/development/ide.pp b/manifests/utils/development/ide.pp
index 3568979..47d3d98 100644
--- a/manifests/utils/development/ide.pp
+++ b/manifests/utils/development/ide.pp
@@ -22,6 +22,7 @@ class nodo::utils::development::ide (
'pelican',
'hugo',
'mkdocs',
+ #'markdown',
]:
ensure => $ensure,
}
diff --git a/manifests/utils/firmware/efi.pp b/manifests/utils/firmware/efi.pp
new file mode 100644
index 0000000..fa66284
--- /dev/null
+++ b/manifests/utils/firmware/efi.pp
@@ -0,0 +1,10 @@
+class nodo::utils::firmware::efi (
+ $ensure = 'installed',
+) {
+ package { [
+ 'fwupd',
+ 'efivar',
+ ]:
+ ensure => $ensure,
+ }
+}
diff --git a/manifests/utils/interface.pp b/manifests/utils/interface.pp
index d337d13..8a67557 100644
--- a/manifests/utils/interface.pp
+++ b/manifests/utils/interface.pp
@@ -25,6 +25,7 @@ class nodo::utils::interface inherits nodo::utils::interface::console {
'i3lock',
'materia-gtk-theme',
'blackbird-gtk-theme',
+ 'obsidian-icon-theme',
]:
ensure => installed,
}
@@ -61,9 +62,7 @@ class nodo::utils::interface inherits nodo::utils::interface::console {
'compton',
'xzoom',
'xautomation',
- 'gtk-theme-switch',
- 'gtk-smooth-themes',
- 'lxappearance',
+
'wmctrl',
'pcmanfm',
'metar',
@@ -73,6 +72,17 @@ class nodo::utils::interface inherits nodo::utils::interface::console {
'xterm',
'eterm',
'gnome-terminal',
+
+ # Check https://wiki.archlinux.org/title/GTK
+ # https://wiki.gnome.org/Apps/DconfEditor
+ 'gtk-theme-switch',
+ 'gtk-smooth-themes',
+ 'dconf-editor',
+ 'lxappearance',
+
+ # xsettingsd is a daemon that implements the XSETTINGS specification.
+ # https://codeberg.org/derat/xsettingsd
+ 'xsettingsd',
]:
ensure => absent,
}
diff --git a/manifests/utils/multimedia.pp b/manifests/utils/multimedia.pp
index d85cebe..0b40660 100644
--- a/manifests/utils/multimedia.pp
+++ b/manifests/utils/multimedia.pp
@@ -1,11 +1,12 @@
# Multimedia utilities
class nodo::utils::multimedia inherits nodo::utils::multimedia::minimal {
package { [
+ 'pulseaudio',
'pavucontrol',
+ 'pasystray',
'jhead',
'qrencode',
'scrot',
- 'pulseaudio',
]:
ensure => installed,
}
diff --git a/manifests/utils/multimedia/bluetooth.pp b/manifests/utils/multimedia/bluetooth.pp
new file mode 100644
index 0000000..8d3c74a
--- /dev/null
+++ b/manifests/utils/multimedia/bluetooth.pp
@@ -0,0 +1,13 @@
+# https://wiki.debian.org/BluetoothUser
+# https://wiki.debian.org/BluetoothUser/a2dp
+class nodo::utils::multimedia::bluetooth (
+ $ensure = 'installed',
+) {
+ package { [
+ 'blueman',
+ 'bluetooth',
+ 'pulseaudio-module-bluetooth',
+ ]:
+ ensure => $ensure,
+ }
+}
diff --git a/manifests/utils/network/minimal.pp b/manifests/utils/network/minimal.pp
index e6ac1dc..4510e85 100644
--- a/manifests/utils/network/minimal.pp
+++ b/manifests/utils/network/minimal.pp
@@ -3,6 +3,7 @@ class nodo::utils::network::minimal inherits nodo::utils::http {
include nodo::utils::network::torrent
package { [
+ 'ldnsutils',
'unison',
'httrack',
'zsync',