]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Add Flony workstation workstation/flony
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 2 Oct 2018 20:53:29 +0000 (22:53 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 5 Oct 2018 08:39:42 +0000 (10:39 +0200)
38 files changed:
bin/install_workstation [new file with mode: 0755]
environments/global/common.yaml
environments/global/types/vps-ovhssd-1.yaml
environments/hiera.yaml
environments/workstation/hiera.yaml [new symlink]
environments/workstation/machines/flony.yaml [new file with mode: 0644]
modules/base_installation/lib/facter/ldapvar.rb
modules/base_installation/manifests/grub.pp
modules/base_installation/manifests/init.pp
modules/base_installation/manifests/ldap.pp
modules/base_installation/manifests/locales.pp
modules/base_installation/manifests/params.pp
modules/base_installation/manifests/puppet.pp
modules/base_installation/templates/puppet/host_ldap_add_top.info.erb
modules/base_installation/templates/puppet/host_ldap_mod_top.info.erb
modules/base_installation/templates/puppet/puppet.conf.erb
modules/base_installation/templates/services/en-dhcp.network.erb
modules/workstation/files/flony/home/bash_profile [new file with mode: 0644]
modules/workstation/files/flony/home/bashrc [new file with mode: 0644]
modules/workstation/files/flony/home/config/autostart/redshift-gtk.desktop [new file with mode: 0644]
modules/workstation/files/flony/home/config/libfm/libfm.conf [new file with mode: 0644]
modules/workstation/files/flony/home/config/lxpanel/LXDE/config [new file with mode: 0644]
modules/workstation/files/flony/home/config/lxpanel/LXDE/panels/panel [new file with mode: 0644]
modules/workstation/files/flony/home/config/lxpanel/launchtaskbar.cfg [new file with mode: 0644]
modules/workstation/files/flony/home/config/lxsession-default-apps/settings.conf [new file with mode: 0644]
modules/workstation/files/flony/home/config/lxsession/LXDE/autostart [new file with mode: 0644]
modules/workstation/files/flony/home/config/lxsession/LXDE/desktop.conf [new file with mode: 0644]
modules/workstation/files/flony/home/config/lxterminal/lxterminal.conf [new file with mode: 0644]
modules/workstation/files/flony/home/config/openbox/lxde-rc.xml [new file with mode: 0644]
modules/workstation/files/flony/home/config/pcmanfm/LXDE/desktop-items-0.conf [new file with mode: 0644]
modules/workstation/files/flony/home/config/pcmanfm/LXDE/pcmanfm.conf [new file with mode: 0644]
modules/workstation/files/flony/home/config/redshift.conf [new file with mode: 0644]
modules/workstation/files/flony/home/gitconfig [new file with mode: 0644]
modules/workstation/files/flony/home/local/share/applications/mimeapps.list [new file with mode: 0644]
modules/workstation/files/flony/home/xinitrc [new file with mode: 0644]
modules/workstation/files/flony/wlp2s0-dhcp.network [new file with mode: 0644]
modules/workstation/files/flony/xorg_intel.conf [new file with mode: 0644]
modules/workstation/manifests/flony.pp [new file with mode: 0644]

diff --git a/bin/install_workstation b/bin/install_workstation
new file mode 100755 (executable)
index 0000000..8e0aadf
--- /dev/null
@@ -0,0 +1,25 @@
+
+CODE_PATH="/etc/puppetlabs/code"
+# Needs to be run manually
+# Mount /mnt, /mnt/boot, ...
+# pacstrap /mnt base git puppet
+# genfstab -U /mnt >> /mnt/etc/fstab
+# arch-chroot /mnt
+# git clone https://git.immae.eu/perso/Immae/Projets/Puppet.git $CODE_PATH
+
+export FACTER_in_chroot=yes
+export FACTER_workstation_name="$1"
+
+if [ -z "$FACTER_workstation_name" ]; then
+  echo "Need to specify workstation name as first argument"
+  exit 1
+fi
+
+git submodule update --init
+
+pacman-key --init
+pacman-key --populate archlinux
+
+puppet apply --environment workstation --tags base_installation --modulepath $CODE_PATH/modules:$CODE_PATH/external_modules --test $CODE_PATH/manifests/site.pp
+# The password seed requires puppet to be run twice
+puppet apply --environment workstation --tags base_installation --modulepath $CODE_PATH/modules:$CODE_PATH/external_modules --test $CODE_PATH/manifests/site.pp
index 2f2db3532110df096b70402452578d7d0648e91c..4313244ce16f0f9eea10a8f671ce8ed014303641 100644 (file)
@@ -16,6 +16,7 @@ lookup_options:
 classes:
   stdlib: ~
 
+base_installation::ldap_enabled: true
 base_installation::ldap_base: "dc=immae,dc=eu"
 base_installation::ldap_dn: "cn=%{facts.ec2_metadata.hostname},ou=hosts,dc=immae,dc=eu"
 base_installation::ldap_cn: "%{facts.ec2_metadata.hostname}"
index 8dd512c593fdd67e7e58a08981c3fb6ff5af16c0..8a8d87bfa1137de626547fefe48e7be598fcc40e 100644 (file)
@@ -5,7 +5,6 @@ classes:
 
 base_installation::system_hostname: "%{ldapvar.self.vars.host.0}"
 base_installation::real_hostname: "%{facts.ec2_metadata.hostname}.ovh.net"
-base_installation::grub_device: "/dev/sdb"
 base_installation::ldap_cert_path: "/etc/ssl/certs/ca-certificates.crt"
 letsencrypt::try_for_real_hostname: false
 profile::xmr_stak::cpulimit: "90"
index 61d40d870c2959d504563c4a0269b7a79df0ae7d..46d560db7f6afa2f707755f33bd2e2297ac8fc90 100644 (file)
@@ -27,6 +27,9 @@ hierarchy:
     path: "types/%{facts.ec2_metadata.instance-type}.yaml"
     datadir: ../global
 
+  - name: "Per-machine data"
+    path: "machines/%{facts.workstation_name}.yaml"
+
   - name: "Common environment data"
     path: "common.yaml"
 
diff --git a/environments/workstation/hiera.yaml b/environments/workstation/hiera.yaml
new file mode 120000 (symlink)
index 0000000..91d9bbf
--- /dev/null
@@ -0,0 +1 @@
+../hiera.yaml
\ No newline at end of file
diff --git a/environments/workstation/machines/flony.yaml b/environments/workstation/machines/flony.yaml
new file mode 100644 (file)
index 0000000..71b7e7f
--- /dev/null
@@ -0,0 +1,16 @@
+---
+classes:
+  base_installation:
+    stage: "setup"
+  workstation::flony: ~
+
+base_installation::system_hostname: "%{facts.workstation_name}"
+base_installation::real_hostname: "%{facts.workstation_name}.home.immae.eu"
+base_installation::cryptroot_device: "81705a1f-b029-46f5-8900-721ede1fe57b"
+base_installation::grub_device: "/dev/nvme0n1p2"
+base_installation::grub_efi_device: "/dev/nvme0n1p1"
+base_installation::ldap_enabled: false
+base_installation::system_users:
+  - userid: 1000
+    username: ismael
+    groups: [wheel]
index 08d58e4cb1a7b96f406bbe772a03c4f393ce0e12..c3379e89ae5ae4033cb45117903777fa41bf22c0 100644 (file)
@@ -5,7 +5,7 @@ begin
   Facter.add("ldapvar") do
     setcode do
       if Puppet[:node_terminus].to_sym != :ldap
-        data = []
+        data = {}
       else
         begin
           conn = Puppet::Util::Ldap::Connection.instance
index 208b745317046426445d384b5516593713ba0acc..9ced43f974a61307837b54590d690b367fb9a678 100644 (file)
@@ -1,22 +1,41 @@
 class base_installation::grub inherits base_installation {
   ensure_packages(['grub'])
 
-  # unless empty($base_installation::grub_device) {
-  #   exec { 'install GRUB':
-  #     command   => "/usr/bin/grub-install --target=i386-pc $base_installation::device",
-  #     subscribe => Package["grub"],
-  #   }
-  # }
+  if !empty($base_installation::grub_efi_device) {
+    ensure_packages(['efibootmgr'])
+    exec { 'install GRUB UEFI':
+      command   => "/usr/bin/mkdir /boot/efi && /usr/bin/mount ${base_installation::grub_efi_device} /boot/efi && /usr/bin/grub-install --efi-directory=/boot/efi --target=x86_64-efi && /usr/bin/umount /boot/efi && /usr/bin/rmdir /boot/efi",
+      creates   => "/boot/grub/x86_64-efi",
+      subscribe => Package["grub"],
+    }
+  } elsif !empty($base_installation::grub_device) {
+    exec { 'install GRUB MBR':
+      command   => "/usr/bin/grub-install --target=i386-pc $base_installation::grub_device",
+      creates   => "/boot/grub/i386-pc",
+      subscribe => Package["grub"],
+    }
+  }
 
-  file_line { "/etc/default/grub#GRUB_CMDLINE_LINUX":
-    path    => "/etc/default/grub",
-    line    => 'GRUB_CMDLINE_LINUX=" console=tty0 console=ttyS0,115200"',
-    match   => '^GRUB_CMDLINE_LINUX=',
-    require => Package["grub"],
+  if ($environment == "workstation" and !empty($base_installation::cryptroot_device)) {
+    file_line { "/etc/default/grub#GRUB_CMDLINE_LINUX":
+      path    => "/etc/default/grub",
+      line    => "GRUB_CMDLINE_LINUX=\" cryptdevice=UUID=${base_installation::cryptroot_device}:cryptroot\"",
+      match   => '^GRUB_CMDLINE_LINUX=',
+      require => Package["grub"],
+      notify  => Exec["update GRUB config"],
+    }
+  } elsif ($environment != "workstation") {
+    file_line { "/etc/default/grub#GRUB_CMDLINE_LINUX":
+      path    => "/etc/default/grub",
+      line    => 'GRUB_CMDLINE_LINUX=" console=tty0 console=ttyS0,115200"',
+      match   => '^GRUB_CMDLINE_LINUX=',
+      require => Package["grub"],
+      notify  => Exec["update GRUB config"],
+    }
   }
 
-  exec { 'update GRUB config':
-    command     => "/usr/bin/grub-mkconfig -o /boot/grub/grub.cfg",
-    refreshonly => true
-  }
+  exec { 'update GRUB config':
+    command     => "/usr/bin/grub-mkconfig -o /boot/grub/grub.cfg",
+    refreshonly => true
+  }
 }
index a1b5ca8412d30ad097233a1591485f956e0cc76e..572649416c680b9478969b9d05fb1e9e42996c78 100644 (file)
@@ -1,5 +1,8 @@
 class base_installation (
+  Optional[String]        $cryptroot_device     = $base_installation::params::cryptroot_device,
+  Optional[String]        $grub_efi_device      = $base_installation::params::grub_efi_device,
   Optional[String]        $grub_device          = $base_installation::params::grub_device,
+  Optional[Boolean]       $ldap_enabled         = $base_installation::params::ldap_enabled,
   Optional[String]        $ldap_base            = $base_installation::params::ldap_base,
   Optional[String]        $ldap_cert_path       = $base_installation::params::ldap_cert_path,
   Optional[String]        $ldap_cn              = $base_installation::params::ldap_cn,
index 929140234cd7e071dd0d1b5ab3c21eadcf7504ed..7c48be360d577b44a558ba139b367a9d9c543d28 100644 (file)
@@ -1,69 +1,71 @@
 class base_installation::ldap inherits base_installation {
-  ensure_packages(["openldap"])
+  if ($base_installation::ldap_enabled) {
+    ensure_packages(["openldap"])
 
-  File {
-    mode  => "0644",
-    owner => "root",
-    group => "root",
-  }
-
-  file { '/etc/openldap':
-    ensure  => directory,
-    require => Package["openldap"],
-    recurse => true,
-    purge   => true,
-    force   => true,
-  }
-
-  file { '/etc/openldap/ldap.conf':
-    ensure  => present,
-    content => template("base_installation/ldap/ldap.conf.erb"),
-    require => File['/etc/openldap'],
-  }
+    File {
+      mode  => "0644",
+      owner => "root",
+      group => "root",
+    }
 
-  $password_seed  = lookup("base_installation::puppet_pass_seed")
-  unless empty(find_file($password_seed)) {
-    $ldap_server    = lookup("base_installation::ldap_server")
-    $ldap_base      = lookup("base_installation::ldap_base")
-    $ldap_dn        = lookup("base_installation::ldap_dn")
-    $ldap_password  = generate_password(24, $password_seed, "ldap")
-    $ldap_attribute = "uid"
+    file { '/etc/openldap':
+      ensure  => directory,
+      require => Package["openldap"],
+      recurse => true,
+      purge   => true,
+      force   => true,
+    }
 
-    ensure_packages(["pam_ldap", "ruby-augeas"])
-    file { "/etc/pam_ldap.conf":
-      ensure  => "present",
-      mode    => "0400",
-      owner   => "root",
-      group   => "root",
-      content => template("base_installation/ldap/pam_ldap.conf.erb"),
+    file { '/etc/openldap/ldap.conf':
+      ensure  => present,
+      content => template("base_installation/ldap/ldap.conf.erb"),
+      require => File['/etc/openldap'],
     }
 
-    ["system-auth", "passwd"].each |$service| {
-      pam { "Allow to change ldap password via $service":
-        ensure    => present,
-        service   => $service,
-        type      => "password",
-        control   => "[success=done new_authtok_reqd=ok authinfo_unavail=ignore ignore=ignore default=bad]",
-        module    => "pam_ldap.so",
-        arguments => ["ignore_unknown_user", "ignore_authinfo_unavail"],
-        position  => 'before *[type="password" and module="pam_unix.so"]',
-        require   => Package["ruby-augeas"],
+    $password_seed  = lookup("base_installation::puppet_pass_seed")
+    unless empty(find_file($password_seed)) {
+      $ldap_server    = lookup("base_installation::ldap_server")
+      $ldap_base      = lookup("base_installation::ldap_base")
+      $ldap_dn        = lookup("base_installation::ldap_dn")
+      $ldap_password  = generate_password(24, $password_seed, "ldap")
+      $ldap_attribute = "uid"
+
+      ensure_packages(["pam_ldap", "ruby-augeas"])
+      file { "/etc/pam_ldap.conf":
+        ensure  => "present",
+        mode    => "0400",
+        owner   => "root",
+        group   => "root",
+        content => template("base_installation/ldap/pam_ldap.conf.erb"),
       }
-    }
 
-    ["system-auth", "su", "su-l"].each |$service| {
-      ["auth", "account"].each |$type| {
-        pam { "Allow $service to $type with ldap password":
+      ["system-auth", "passwd"].each |$service| {
+        pam { "Allow to change ldap password via $service":
           ensure    => present,
           service   => $service,
-          type      => $type,
+          type      => "password",
           control   => "[success=done new_authtok_reqd=ok authinfo_unavail=ignore ignore=ignore default=bad]",
           module    => "pam_ldap.so",
           arguments => ["ignore_unknown_user", "ignore_authinfo_unavail"],
-          position  => "before *[type=\"$type\" and module=\"pam_unix.so\"]",
+          position  => 'before *[type="password" and module="pam_unix.so"]',
           require   => Package["ruby-augeas"],
         }
       }
+
+      ["system-auth", "su", "su-l"].each |$service| {
+        ["auth", "account"].each |$type| {
+          pam { "Allow $service to $type with ldap password":
+            ensure    => present,
+            service   => $service,
+            type      => $type,
+            control   => "[success=done new_authtok_reqd=ok authinfo_unavail=ignore ignore=ignore default=bad]",
+            module    => "pam_ldap.so",
+            arguments => ["ignore_unknown_user", "ignore_authinfo_unavail"],
+            position  => "before *[type=\"$type\" and module=\"pam_unix.so\"]",
+            require   => Package["ruby-augeas"],
+          }
+        }
+      }
     }
   }
 }
index 0f31e0bf549e8b828fda734da143e608d8ba9d83..90dabee4b32fd898b962cabf90ac32b748cc98f1 100644 (file)
@@ -29,9 +29,16 @@ class base_installation::locales inherits base_installation {
   }
 
 
-  file { "/etc/vconsole.conf":
-    ensure => "link",
-    target => "/dev/null",
+  if ($environment == "workstation") {
+    file { "/etc/vconsole.conf":
+      ensure  => "file",
+      content => "KEYMAP=fr",
+    }
+  } else {
+    file { "/etc/vconsole.conf":
+      ensure => "link",
+      target => "/dev/null",
+    }
   }
 
 }
index f336b658bcfdd2566e2235859cc63d714abdf43c..0ceb99cf98d3125c90ec68adeb44181dd296b2d0 100644 (file)
@@ -4,7 +4,10 @@ class base_installation::params {
   $puppet_notifies_path = "/etc/puppetlabs/notifies"
   $puppet_pass_seed     = "/etc/puppetlabs/puppet/password_seed"
   $puppet_ssl_path      = "/etc/puppetlabs/ssl"
-  $grub_device          = "/dev/sda"
+  $cryptroot_device     = ""
+  $grub_device          = ""
+  $grub_efi_device      = ""
+  $ldap_enabled         = true
   $ldap_base            = "dc=example,dc=com"
   $ldap_cn              = "node"
   $ldap_dn              = "cn=node,ou=hosts,dc=example,dc=com"
index 603a96115b97493f9f4d71af639c059ed6537c60..80400179e3e536a5f641e8495464d8296e371620 100644 (file)
@@ -52,21 +52,25 @@ class base_installation::puppet (
   }
 
   unless empty(find_file($password_seed)) {
-    $ldap_password = generate_password(24, $password_seed, "ldap")
-    $ssha_ldap_seed = generate_password(5, $password_seed, "ldap_seed")
-
-    package { 'gem:ruby-ldap':
-      name            => "ruby-ldap",
-      ensure          => present,
-      provider        => "gem",
-      install_options => "--no-user-install"
-    }
+    if ($base_installation::ldap_enabled) {
+      $ldap_password = generate_password(24, $password_seed, "ldap")
+      $ssha_ldap_seed = generate_password(5, $password_seed, "ldap_seed")
+
+      package { 'gem:ruby-ldap':
+        name            => "ruby-ldap",
+        ensure          => present,
+        provider        => "gem",
+        install_options => "--no-user-install",
+        before          => File["$base_installation::puppet_conf_path"]
+      }
 
-    package { 'gem:xmpp4r':
-      name            => "xmpp4r",
-      ensure          => present,
-      provider        => "gem",
-      install_options => "--no-user-install"
+      package { 'gem:xmpp4r':
+        name            => "xmpp4r",
+        ensure          => present,
+        provider        => "gem",
+        install_options => "--no-user-install",
+        before          => File["$base_installation::puppet_conf_path"]
+      }
     }
 
     file { $password_seed:
@@ -75,7 +79,7 @@ class base_installation::puppet (
 
     file { $base_installation::puppet_conf_path:
       ensure  => directory,
-      require => [Package["puppet"], Package["gem:xmpp4r"], Package["gem:ruby-ldap"]],
+      require => [Package["puppet"]],
       recurse => true,
       purge   => true,
       force   => true,
@@ -103,47 +107,49 @@ class base_installation::puppet (
       }
     }
 
-    if file("$base_installation::puppet_notifies_path/host_ldap.info", "/dev/null") != "" and
-      empty($facts["ldapvar"]) {
-        fail("LDAP was activated but facts are not available")
-    }
+    if ($base_installation::ldap_enabled) {
+      if file("$base_installation::puppet_notifies_path/host_ldap.info", "/dev/null") != "" and
+        empty($facts["ldapvar"]) {
+          fail("LDAP was activated but facts are not available")
+      }
 
-    file { $base_installation::puppet_notifies_path:
-      ensure  => directory,
-      require => [Package["puppet"], Package["gem:xmpp4r"], Package["gem:ruby-ldap"]],
-      recurse => true,
-      purge   => true,
-      force   => true,
-    }
+      file { $base_installation::puppet_notifies_path:
+        ensure  => directory,
+        require => [Package["puppet"], Package["gem:xmpp4r"], Package["gem:ruby-ldap"]],
+        recurse => true,
+        purge   => true,
+        force   => true,
+      }
 
-    $ips = lookup("ips", { 'default_value' => undef })
-    concat { "$base_installation::puppet_notifies_path/host_ldap.info":
-      ensure         => "present",
-      mode           => "0600",
-      require        => File[$base_installation::puppet_notifies_path],
-      ensure_newline => true,
-    }
+      $ips = lookup("ips", { 'default_value' => undef })
+      concat { "$base_installation::puppet_notifies_path/host_ldap.info":
+        ensure         => "present",
+        mode           => "0600",
+        require        => File[$base_installation::puppet_notifies_path],
+        ensure_newline => true,
+      }
 
-    concat::fragment { "host_ldap add top":
-      target  => "$base_installation::puppet_notifies_path/host_ldap.info",
-      content => template("base_installation/puppet/host_ldap_add_top.info.erb"),
-      order   => "00-01",
-    }
-    concat::fragment { "host_ldap add bottom":
-      target  => "$base_installation::puppet_notifies_path/host_ldap.info",
-      content => "EOF",
-      order   => "00-99",
-    }
+      concat::fragment { "host_ldap add top":
+        target  => "$base_installation::puppet_notifies_path/host_ldap.info",
+        content => template("base_installation/puppet/host_ldap_add_top.info.erb"),
+        order   => "00-01",
+      }
+      concat::fragment { "host_ldap add bottom":
+        target  => "$base_installation::puppet_notifies_path/host_ldap.info",
+        content => "EOF",
+        order   => "00-99",
+      }
 
-    concat::fragment { "host_ldap mod top":
-      target  => "$base_installation::puppet_notifies_path/host_ldap.info",
-      content => template("base_installation/puppet/host_ldap_mod_top.info.erb"),
-      order   => "01-01",
-    }
-    concat::fragment { "host_ldap mod bottom":
-      target  => "$base_installation::puppet_notifies_path/host_ldap.info",
-      content => "EOF",
-      order   => "01-99",
+      concat::fragment { "host_ldap mod top":
+        target  => "$base_installation::puppet_notifies_path/host_ldap.info",
+        content => template("base_installation/puppet/host_ldap_mod_top.info.erb"),
+        order   => "01-01",
+      }
+      concat::fragment { "host_ldap mod bottom":
+        target  => "$base_installation::puppet_notifies_path/host_ldap.info",
+        content => "EOF",
+        order   => "01-99",
+      }
     }
   }
 }
index 3aafc19438b2f2535d4ea83f420435008e9ebce5..544f44581517e84df2e7d540369ae7be0763ec99 100644 (file)
@@ -6,7 +6,7 @@ objectclass: device
 objectclass: top
 objectclass: simpleSecurityObject
 objectclass: puppetClient
-<%- unless @ips.empty? -%>
+<%- unless @ips.nil? || @ips.empty? -%>
 objectclass: ipHost
 <% unless @ips["v4"].nil? -%>ipHostNumber: <%= @ips["v4"]["ipAddress"] %><%- end %>
 <% unless @ips["v6"].nil? -%>ipHostNumber: <%= @ips["v6"]["ipAddress"] %>/<%= @ips["v6"]["mask"] %><%- end %>
index d7a1294829a6232fef82ba1b9a9996ab1376979a..b1a4906aaaa63ebec925185e50fab5a010f28b2e 100644 (file)
@@ -7,7 +7,7 @@ userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha
 -
 replace: environment
 environment: <%= @environment %>
-<%- unless @ips.empty? -%>
+<%- unless @ips.nil? || @ips.empty? -%>
 -
 delete: ipHostNumber
 <%- unless @ips["v4"].nil? -%>
index 38a0c1bb5e21f60214e179c291033edcce45f4b9..4233b86d9d53b9a3eb3dfab8f3823896d61a7025 100644 (file)
@@ -16,6 +16,7 @@ ssldir = <%= @puppet_ssl_path %>
 
 environment = <%= @environment %>
 
+<% if @ldap_enabled %>
 node_terminus = ldap
 certname = <%= @real_hostname %>
 ldapserver = <%= @ldap_server %>
@@ -26,3 +27,4 @@ ldappassword = <%= @ldap_password %>
 ldapclassattrs = puppetClass
 ldapparentattr = parentNode
 ldapstackedattrs = puppetVar
+<% end %>
index 025559529bc45558ac204427b44cc2d95b41ec7a..98cb4462694d6477cbaf8428cfd3dfdaafa3d9e0 100644 (file)
@@ -4,7 +4,7 @@ Name=en*
 [Network]
 DHCP=ipv4
 
-<%- unless @ip6.empty? -%>
+<%- unless @ip6.nil? || @ip6.empty? -%>
 Gateway=<%= @ip6["gateway"] %>
 
 [Address]
diff --git a/modules/workstation/files/flony/home/bash_profile b/modules/workstation/files/flony/home/bash_profile
new file mode 100644 (file)
index 0000000..3304d79
--- /dev/null
@@ -0,0 +1,3 @@
+if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
+  exec startx
+fi
diff --git a/modules/workstation/files/flony/home/bashrc b/modules/workstation/files/flony/home/bashrc
new file mode 100644 (file)
index 0000000..a355b0c
--- /dev/null
@@ -0,0 +1,9 @@
+#
+# ~/.bashrc
+#
+
+# If not running interactively, don't do anything
+[[ $- != *i* ]] && return
+
+alias ls='ls --color=auto'
+PS1='[\u@\h \W]\$ '
diff --git a/modules/workstation/files/flony/home/config/autostart/redshift-gtk.desktop b/modules/workstation/files/flony/home/config/autostart/redshift-gtk.desktop
new file mode 100644 (file)
index 0000000..3fc7814
--- /dev/null
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=Redshift
+GenericName=Redshift
+Exec=/usr/bin/redshift-gtk
+Icon=redshift
+Terminal=false
+Type=Application
diff --git a/modules/workstation/files/flony/home/config/libfm/libfm.conf b/modules/workstation/files/flony/home/config/libfm/libfm.conf
new file mode 100644 (file)
index 0000000..5daa519
--- /dev/null
@@ -0,0 +1,43 @@
+# Configuration file for the libfm version 1.3.0.2.
+# Autogenerated file, don't edit, your changes will be overwritten.
+
+[config]
+single_click=0
+use_trash=1
+confirm_del=1
+confirm_trash=1
+advanced_mode=0
+si_unit=0
+force_startup_notify=1
+backup_as_hidden=1
+no_usb_trash=1
+no_child_non_expandable=0
+show_full_names=0
+only_user_templates=0
+template_run_app=0
+template_type_once=0
+auto_selection_delay=600
+drop_default_action=auto
+defer_content_test=0
+quick_exec=0
+thumbnail_local=1
+thumbnail_max=2048
+smart_desktop_autodrop=1
+
+[ui]
+big_icon_size=48
+small_icon_size=24
+pane_icon_size=24
+thumbnail_size=128
+show_thumbnail=1
+shadow_hidden=0
+
+[places]
+places_home=1
+places_desktop=1
+places_root=0
+places_computer=0
+places_trash=1
+places_applications=1
+places_network=0
+places_unmounted=1
diff --git a/modules/workstation/files/flony/home/config/lxpanel/LXDE/config b/modules/workstation/files/flony/home/config/lxpanel/LXDE/config
new file mode 100644 (file)
index 0000000..76228e2
--- /dev/null
@@ -0,0 +1,2 @@
+[Command]
+Logout=lxde-logout
diff --git a/modules/workstation/files/flony/home/config/lxpanel/LXDE/panels/panel b/modules/workstation/files/flony/home/config/lxpanel/LXDE/panels/panel
new file mode 100644 (file)
index 0000000..320c761
--- /dev/null
@@ -0,0 +1,168 @@
+# lxpanel <profile> config file. Manually editing is not recommended.
+# Use preference dialog in lxpanel to adjust config when you can.
+
+Global {
+  edge=bottom
+  align=left
+  margin=0
+  widthtype=percent
+  width=100
+  height=26
+  transparent=0
+  tintcolor=#000000
+  alpha=0
+  setdocktype=1
+  setpartialstrut=1
+  autohide=0
+  heightwhenhidden=0
+  usefontcolor=1
+  fontcolor=#ffffff
+  background=1
+  backgroundfile=/usr/share/lxpanel/images/background.png
+}
+Plugin {
+  type=space
+  Config {
+    Size=2
+  }
+}
+Plugin {
+  type=menu
+  Config {
+    image=/usr/share/lxde/images/lxde-icon.png
+    system {
+    }
+    separator {
+    }
+    item {
+      command=run
+    }
+    separator {
+    }
+    item {
+      image=gnome-logout
+      command=logout
+    }
+  }
+}
+Plugin {
+  type=launchbar
+  Config {
+    Button {
+      id=pcmanfm.desktop
+    }
+    Button {
+      id=firefox.desktop
+    }
+  }
+}
+Plugin {
+  type=space
+  Config {
+    Size=4
+  }
+}
+Plugin {
+  type=wincmd
+  Config {
+    Button1=iconify
+    Button2=shade
+  }
+}
+Plugin {
+  type=space
+  Config {
+    Size=4
+  }
+}
+Plugin {
+  type=pager
+  Config {
+  }
+}
+Plugin {
+  type=space
+  Config {
+    Size=4
+  }
+}
+Plugin {
+  type=taskbar
+  expand=1
+  Config {
+    tooltips=1
+    IconsOnly=0
+    AcceptSkipPager=1
+    ShowIconified=1
+    ShowMapped=1
+    ShowAllDesks=0
+    UseMouseWheel=1
+    UseUrgencyHint=1
+    FlatButton=0
+    MaxTaskWidth=150
+    spacing=1
+  }
+}
+Plugin {
+  type=monitors
+  Config {
+    DisplayCPU=1
+    DisplayRAM=1
+    CPUColor=#0000FF
+    RAMColor=#FF0000
+  }
+}
+Plugin {
+  type=volume
+  Config {
+    VolumeMuteKey=XF86AudioMute
+    VolumeDownKey=XF86AudioLowerVolume
+    VolumeUpKey=XF86AudioRaiseVolume
+  }
+}
+Plugin {
+  type=tray
+  Config {
+  }
+}
+Plugin {
+  type=dclock
+  Config {
+    ClockFmt=%R
+    TooltipFmt=%A %x
+    BoldFont=0
+    IconOnly=0
+    CenterText=0
+  }
+}
+Plugin {
+  type=netstatus
+  Config {
+    iface=enp0s31f6
+    configtool=nm-connection-editor
+  }
+}
+Plugin {
+  type=netstatus
+  Config {
+    iface=wlp2s0
+    configtool=nm-connection-editor
+  }
+}
+Plugin {
+  type=batt
+  Config {
+    BackgroundColor=black
+    ChargingColor1=#28f200
+    ChargingColor2=#22cc00
+    DischargingColor1=#ffee00
+    DischargingColor2=#d9ca00
+    HideIfNoBattery=0
+    AlarmCommand=notify-send "Batterie faible" --icon=battery-caution
+    AlarmTime=5
+    BorderWidth=0
+    Size=1
+    ShowExtendedInformation=0
+    BatteryNumber=0
+  }
+}
diff --git a/modules/workstation/files/flony/home/config/lxpanel/launchtaskbar.cfg b/modules/workstation/files/flony/home/config/lxpanel/launchtaskbar.cfg
new file mode 100644 (file)
index 0000000..a3d0e52
--- /dev/null
@@ -0,0 +1,4 @@
+[special_cases]
+synaptic=synaptic-pkexec
+soffice.bin=libreoffice
+x-terminal-emulator=lxterminal
diff --git a/modules/workstation/files/flony/home/config/lxsession-default-apps/settings.conf b/modules/workstation/files/flony/home/config/lxsession-default-apps/settings.conf
new file mode 100644 (file)
index 0000000..8b5b321
--- /dev/null
@@ -0,0 +1,45 @@
+[Mime]
+webbrowser/available=
+email/available=
+file_manager/available=
+screensaver/available=
+composite_manager/available=
+desktop_manager/available=
+power_manager/available=
+polkit/available=
+im/available=
+widget/available=
+terminal_manager/available=
+audio_player/available=
+video_player/available=
+pdf_reader/available=
+image_display/available=
+text_editor/available=
+archive/available=
+spreadsheet/available=
+bittorent/available=
+document/available=
+burn/available=
+tasks/available=
+webbrowser/installed=Firefox,/usr/lib/firefox/firefox,firefox,/usr/share/applications/firefox.desktop,;
+email/installed=
+file_manager/installed=Gestionnaire de fichiers PCManFM,pcmanfm,system-file-manager,/usr/share/applications/pcmanfm.desktop,;
+screensaver/installed=
+composite_manager/installed=
+desktop_manager/installed=Personnaliser l'apparence,lxappearance,preferences-desktop-theme,/usr/share/applications/lxappearance.desktop,;Applications par défaut pour LXSession,lxsession-default-apps,preferences-desktop,/usr/share/applications/lxsession-default-apps.desktop,;Paramètres de la session de bureau,lxsession-edit,preferences-desktop,/usr/share/applications/lxsession-edit.desktop,;Applications préférées,libfm-pref-apps,preferences-desktop,/usr/share/applications/libfm-pref-apps.desktop,;Setup Hot Keys,lxhotkey,preferences-desktop-keyboard,/usr/share/applications/lxhotkey-gtk.desktop,;Préférences du bureau,pcmanfm,user-desktop,/usr/share/applications/pcmanfm-desktop-pref.desktop,;
+power_manager/installed=
+polkit/installed=
+im/installed=
+widget/installed=
+terminal_manager/installed=LXTerminal,lxterminal,lxterminal,/usr/share/applications/lxterminal.desktop,;
+audio_player/installed=LXMusic simple music player,lxmusic,lxmusic,/usr/share/applications/lxmusic.desktop,;Qt V4L2 test Utility,qv4l2,qv4l2,/usr/share/applications/qv4l2.desktop,;
+video_player/installed=LXMusic simple music player,lxmusic,lxmusic,/usr/share/applications/lxmusic.desktop,;Qt V4L2 test Utility,qv4l2,qv4l2,/usr/share/applications/qv4l2.desktop,;
+pdf_reader/installed=Visionneur d'images,gpicview,gpicview,/usr/share/applications/gpicview.desktop,;
+image_display/installed=Visionneur d'images,gpicview,gpicview,/usr/share/applications/gpicview.desktop,;
+text_editor/installed=Vim,vim,gvim,/usr/share/applications/vim.desktop,;
+archive/installed=
+spreadsheet/installed=
+bittorent/installed=
+document/installed=
+burn/installed=
+tasks/installed=Gestionnaire des tâches,lxtask,utilities-system-monitor,/usr/share/applications/lxtask.desktop,;
diff --git a/modules/workstation/files/flony/home/config/lxsession/LXDE/autostart b/modules/workstation/files/flony/home/config/lxsession/LXDE/autostart
new file mode 100644 (file)
index 0000000..d8f2e23
--- /dev/null
@@ -0,0 +1,3 @@
+@lxpanel --profile LXDE
+@pcmanfm --desktop --profile LXDE
+@xscreensaver -no-splash
diff --git a/modules/workstation/files/flony/home/config/lxsession/LXDE/desktop.conf b/modules/workstation/files/flony/home/config/lxsession/LXDE/desktop.conf
new file mode 100644 (file)
index 0000000..00cddb3
--- /dev/null
@@ -0,0 +1,52 @@
+[Session]
+window_manager=openbox-lxde
+disable_autostart=no
+polkit/command=lxpolkit
+clipboard/command=lxclipboard
+xsettings_manager/command=build-in
+proxy_manager/command=build-in
+keyring/command=ssh-agent
+quit_manager/command=lxsession-logout
+lock_manager/command=lxlock
+terminal_manager/command=lxterminal
+quit_manager/image=/usr/share/lxde/images/logout-banner.png
+quit_manager/layout=top
+webbrowser/command=/usr/lib/firefox/firefox
+tasks/command=lxtask
+
+[GTK]
+sNet/ThemeName=Adwaita
+sNet/IconThemeName=nuoveXT2
+sGtk/FontName=Sans 10
+iGtk/ToolbarStyle=3
+iGtk/ButtonImages=1
+iGtk/MenuImages=1
+iGtk/CursorThemeSize=18
+iXft/Antialias=1
+iXft/Hinting=1
+sXft/HintStyle=hintslight
+sXft/RGBA=rgb
+iNet/EnableEventSounds=1
+iNet/EnableInputFeedbackSounds=1
+sGtk/ColorScheme=
+iGtk/ToolbarIconSize=3
+sGtk/CursorThemeName=DMZ-White
+
+[Mouse]
+AccFactor=20
+AccThreshold=10
+LeftHanded=0
+
+[Keyboard]
+Delay=500
+Interval=30
+Beep=1
+
+[State]
+guess_default=true
+
+[Dbus]
+lxde=true
+
+[Environment]
+menu_prefix=lxde-
diff --git a/modules/workstation/files/flony/home/config/lxterminal/lxterminal.conf b/modules/workstation/files/flony/home/config/lxterminal/lxterminal.conf
new file mode 100644 (file)
index 0000000..1d1cc67
--- /dev/null
@@ -0,0 +1,53 @@
+[general]
+fontname=Monospace 10
+selchars=-A-Za-z0-9,./?%&#:_
+scrollback=1000
+bgcolor=rgb(0,0,0)
+fgcolor=rgb(170,170,170)
+palette_color_0=rgb(0,0,0)
+palette_color_1=rgb(170,0,0)
+palette_color_2=rgb(0,170,0)
+palette_color_3=rgb(170,85,0)
+palette_color_4=rgb(0,0,170)
+palette_color_5=rgb(170,0,170)
+palette_color_6=rgb(0,170,170)
+palette_color_7=rgb(170,170,170)
+palette_color_8=rgb(85,85,85)
+palette_color_9=rgb(255,85,85)
+palette_color_10=rgb(85,255,85)
+palette_color_11=rgb(255,255,85)
+palette_color_12=rgb(85,85,255)
+palette_color_13=rgb(255,85,255)
+palette_color_14=rgb(85,255,255)
+palette_color_15=rgb(255,255,255)
+color_preset=VGA
+disallowbold=false
+cursorblinks=false
+cursorunderline=false
+audiblebell=false
+tabpos=top
+geometry_columns=80
+geometry_rows=24
+hidescrollbar=false
+hidemenubar=false
+hideclosebutton=false
+hidepointer=false
+disablef10=true
+disablealt=true
+disableconfirm=false
+
+[shortcut]
+new_window_accel=<Primary><Shift>n
+new_tab_accel=<Primary><Shift>t
+close_tab_accel=<Primary><Shift>w
+close_window_accel=<Primary><Shift>q
+copy_accel=<Primary><Shift>c
+paste_accel=<Primary><Shift>v
+name_tab_accel=<Primary><Shift>i
+previous_tab_accel=<Primary>Page_Up
+next_tab_accel=<Primary>Page_Down
+move_tab_left_accel=<Primary><Shift>Page_Up
+move_tab_right_accel=<Primary><Shift>Page_Down
+zoom_in_accel=<Primary><Shift>plus
+zoom_out_accel=<Primary><Shift>underscore
+zoom_reset_accel=<Primary><Shift>parenright
diff --git a/modules/workstation/files/flony/home/config/openbox/lxde-rc.xml b/modules/workstation/files/flony/home/config/openbox/lxde-rc.xml
new file mode 100644 (file)
index 0000000..48d2e1f
--- /dev/null
@@ -0,0 +1,666 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Do not edit this file, it will be overwritten on install.
+        Copy the file to $HOME/.config/openbox/ instead. -->
+<openbox_config xmlns='http://openbox.org/3.4/rc'>
+    <resistance>
+        <strength>10</strength>
+        <screen_edge_strength>20</screen_edge_strength>
+    </resistance>
+    <focus>
+        <focusNew>yes</focusNew>
+        <!-- always try to focus new windows when they appear. other rules do
+       apply -->
+        <followMouse>no</followMouse>
+        <!-- move focus to a window when you move the mouse into it -->
+        <focusLast>yes</focusLast>
+        <!-- focus the last used window when changing desktops, instead of the one
+       under the mouse pointer. when followMouse is enabled -->
+        <underMouse>no</underMouse>
+        <!-- move focus under the mouse, even when the mouse is not moving -->
+        <focusDelay>200</focusDelay>
+        <!-- when followMouse is enabled, the mouse must be inside the window for
+       this many milliseconds (1000 = 1 sec) before moving focus to it -->
+        <raiseOnFocus>no</raiseOnFocus>
+    </focus>
+    <!-- when followMouse is enabled, and a window is given focus by moving the
+       mouse into it, also raise the window -->
+    <placement>
+        <policy>Smart</policy>
+        <!-- 'Smart' or 'UnderMouse' -->
+        <center>yes</center>
+        <!-- whether to place windows in the center of the free area found or
+       the top left corner -->
+        <monitor>Any</monitor>
+    </placement>
+    <!-- with Smart placement on a multi-monitor system, try to place new windows
+       on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
+       the active window is -->
+    <theme>
+        <name>Onyx</name>
+        <titleLayout>NLIMC</titleLayout>
+        <!--       available characters are NDSLIMC, each can occur at most once.
+      N: window icon
+      L: window label (AKA title).
+      I: iconify
+      M: maximize
+      C: close
+      S: shade (roll up/down)
+      D: omnipresent (on all desktops).
+  -->
+        <keepBorder>yes</keepBorder>
+        <animateIconify>yes</animateIconify>
+        <font place='ActiveWindow'>
+            <name>sans</name>
+            <size>10</size>
+            <!-- font size in points -->
+            <weight>bold</weight>
+            <!-- 'bold' or 'normal' -->
+            <slant>normal</slant>
+        </font>
+        <!-- 'italic' or 'normal' -->
+        <font place='InactiveWindow'>
+            <name>sans</name>
+            <size>10</size>
+            <!-- font size in points -->
+            <weight>bold</weight>
+            <!-- 'bold' or 'normal' -->
+            <slant>normal</slant>
+        </font>
+        <!-- 'italic' or 'normal' -->
+        <font place='MenuHeader'>
+            <name>sans</name>
+            <size>10</size>
+            <!-- font size in points -->
+            <weight>normal</weight>
+            <!-- 'bold' or 'normal' -->
+            <slant>normal</slant>
+        </font>
+        <!-- 'italic' or 'normal' -->
+        <font place='MenuItem'>
+            <name>sans</name>
+            <size>10</size>
+            <!-- font size in points -->
+            <weight>normal</weight>
+            <!-- 'bold' or 'normal' -->
+            <slant>normal</slant>
+        </font>
+        <!-- 'italic' or 'normal' -->
+        <font place='OnScreenDisplay'>
+            <name>sans</name>
+            <size>10</size>
+            <!-- font size in points -->
+            <weight>bold</weight>
+            <!-- 'bold' or 'normal' -->
+            <slant>normal</slant>
+        </font>
+    </theme>
+    <!-- 'italic' or 'normal' -->
+    <desktops>
+        <!-- this stuff is only used at startup, pagers allow you to change them
+       during a session
+
+       these are default values to use when other ones are not already set
+       by other applications, or saved in your session
+
+       use obconf if you want to change these without having to log out
+       and back in -->
+        <number>2</number>
+        <firstdesk>1</firstdesk>
+        <names/>
+        <!-- set names up here if you want to, like this:
+    <name>desktop 1</name>
+    <name>desktop 2</name>
+    -->
+        <popupTime>875</popupTime>
+    </desktops>
+    <!-- The number of milliseconds to show the popup for when switching
+       desktops.  Set this to 0 to disable the popup. -->
+    <resize>
+        <drawContents>yes</drawContents>
+        <popupShow>Nonpixel</popupShow>
+        <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
+        <popupPosition>Center</popupPosition>
+        <!-- 'Center', 'Top', or 'Fixed' -->
+        <popupFixedPosition>
+            <!-- these are used if popupPosition is set to 'Fixed' -->
+            <x>10</x>
+            <!-- positive number for distance from left edge, negative number for
+         distance from right edge, or 'Center' -->
+            <y>10</y>
+        </popupFixedPosition>
+    </resize>
+    <!-- You can reserve a portion of your screen where windows will not cover when
+     they are maximized, or when they are initially placed.
+     Many programs reserve space automatically, but you can use this in other
+     cases. -->
+    <margins>
+        <top>0</top>
+        <bottom>0</bottom>
+        <left>0</left>
+        <right>0</right>
+    </margins>
+    <dock>
+        <position>TopLeft</position>
+        <!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
+        <floatingX>0</floatingX>
+        <floatingY>0</floatingY>
+        <noStrut>no</noStrut>
+        <stacking>Above</stacking>
+        <!-- 'Above', 'Normal', or 'Below' -->
+        <direction>Vertical</direction>
+        <!-- 'Vertical' or 'Horizontal' -->
+        <autoHide>no</autoHide>
+        <hideDelay>300</hideDelay>
+        <!-- in milliseconds (1000 = 1 second) -->
+        <showDelay>300</showDelay>
+        <!-- in milliseconds (1000 = 1 second) -->
+        <moveButton>Middle</moveButton>
+    </dock>
+    <!-- 'Left', 'Middle', 'Right' -->
+    <keyboard>
+        <chainQuitKey>C-g</chainQuitKey>
+        <!-- Keybindings for desktop switching -->
+        <keybind key='C-A-Left'>
+            <action name='DesktopLeft'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='C-A-Right'>
+            <action name='DesktopRight'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='C-A-Up'>
+            <action name='DesktopUp'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='C-A-Down'>
+            <action name='DesktopDown'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='S-A-Left'>
+            <action name='SendToDesktopLeft'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='S-A-Right'>
+            <action name='SendToDesktopRight'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='S-A-Up'>
+            <action name='SendToDesktopUp'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='S-A-Down'>
+            <action name='SendToDesktopDown'>
+                <dialog>no</dialog>
+                <wrap>no</wrap>
+            </action>
+        </keybind>
+        <keybind key='W-F1'>
+            <action name='Desktop'>
+                <desktop>1</desktop>
+            </action>
+        </keybind>
+        <keybind key='W-F2'>
+            <action name='Desktop'>
+                <desktop>2</desktop>
+            </action>
+        </keybind>
+        <keybind key='W-F3'>
+            <action name='Desktop'>
+                <desktop>3</desktop>
+            </action>
+        </keybind>
+        <keybind key='W-F4'>
+            <action name='Desktop'>
+                <desktop>4</desktop>
+            </action>
+        </keybind>
+        <keybind key='W-d'>
+            <action name='ToggleShowDesktop'/>
+        </keybind>
+        <keybind key='C-A-d'>
+            <action name='ToggleShowDesktop'/>
+        </keybind>
+        <!-- Keybindings for windows -->
+        <keybind key='A-F4'>
+            <action name='Close'/>
+        </keybind>
+        <keybind key='A-Escape'>
+            <action name='Lower'/>
+            <action name='FocusToBottom'/>
+            <action name='Unfocus'/>
+        </keybind>
+        <keybind key='A-space'>
+            <action name='ShowMenu'>
+                <menu>client-menu</menu>
+            </action>
+        </keybind>
+        <!-- Keybindings for window switching -->
+        <keybind key='A-Tab'>
+            <action name='NextWindow'/>
+        </keybind>
+        <keybind key='A-S-Tab'>
+            <action name='PreviousWindow'/>
+        </keybind>
+        <keybind key='C-A-Tab'>
+            <action name='NextWindow'>
+                <panels>yes</panels>
+                <desktop>yes</desktop>
+            </action>
+        </keybind>
+        <!-- Keybindings for running applications -->
+        <keybind key='W-e'>
+            <action name='Execute'>
+                <startupnotify>
+                    <enabled>true</enabled>
+                    <name>PCManFM</name>
+                </startupnotify>
+                <command>pcmanfm</command>
+            </action>
+        </keybind>
+        <!-- Keybindings for finding files -->
+        <keybind key='W-f'>
+            <action name='Execute'>
+                <command>pcmanfm --find-files</command>
+            </action>
+        </keybind>
+        <!-- eybindings for LXPanel -->
+        <keybind key='W-p'>
+            <action name='Execute'>
+                <command>lxpanelctl run</command>
+            </action>
+        </keybind>
+        <keybind key='A-F11'>
+            <action name='ToggleFullscreen'/>
+        </keybind>
+        <!-- Launch Task Manager with Ctrl+Alt+Del -->
+        <keybind key='A-C-Delete'>
+            <action name='Execute'>
+                <command>lxtask</command>
+            </action>
+        </keybind>
+        <!-- Launch LXRandR when Fn+Screen is pressed -->
+        <keybind key='XF86Display'>
+            <action name='Execute'>
+                <command>lxrandr</command>
+            </action>
+        </keybind>
+        <keybind key='XF86MonBrightnessUp'>
+            <action name='Execute'>
+                <command>xbacklight -inc 10</command>
+            </action>
+        </keybind>
+        <keybind key='XF86MonBrightnessDown'>
+            <action name='Execute'>
+                <command>xbacklight -dec 10</command>
+            </action>
+        </keybind>
+        <keybind key='A-C-l'>
+            <action name='Execute'>
+                <command>slock</command>
+            </action>
+        </keybind>
+    </keyboard>
+    <mouse>
+        <dragThreshold>8</dragThreshold>
+        <!-- number of pixels the mouse must move before a drag begins -->
+        <doubleClickTime>200</doubleClickTime>
+        <!-- in milliseconds (1000 = 1 second) -->
+        <screenEdgeWarpTime>400</screenEdgeWarpTime>
+        <!-- Time before changing desktops when the pointer touches the edge of the
+       screen while moving a window, in milliseconds (1000 = 1 second).
+       Set this to 0 to disable warping -->
+        <context name='Frame'>
+            <mousebind button='A-Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='A-Left' action='Click'>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='A-Left' action='Drag'>
+                <action name='Move'/>
+            </mousebind>
+            <mousebind button='A-Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='A-Right' action='Drag'>
+                <action name='Resize'/>
+            </mousebind>
+            <mousebind button='A-Middle' action='Press'>
+                <action name='Lower'/>
+                <action name='FocusToBottom'/>
+                <action name='Unfocus'/>
+            </mousebind>
+            <mousebind button='A-Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='A-Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='C-A-Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='C-A-Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='A-S-Up' action='Click'>
+                <action name='SendToDesktopPrevious'/>
+            </mousebind>
+            <mousebind button='A-S-Down' action='Click'>
+                <action name='SendToDesktopNext'/>
+            </mousebind>
+        </context>
+        <context name='Titlebar'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Move'/>
+            </mousebind>
+            <mousebind button='Left' action='DoubleClick'>
+                <action name='ToggleMaximizeFull'/>
+            </mousebind>
+            <mousebind button='Middle' action='Press'>
+                <action name='Lower'/>
+                <action name='FocusToBottom'/>
+                <action name='Unfocus'/>
+            </mousebind>
+            <mousebind button='Up' action='Click'>
+                <action name='Shade'/>
+                <action name='FocusToBottom'/>
+                <action name='Unfocus'/>
+                <action name='Lower'/>
+            </mousebind>
+            <mousebind button='Down' action='Click'>
+                <action name='Unshade'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='ShowMenu'>
+                    <menu>client-menu</menu>
+                </action>
+            </mousebind>
+        </context>
+        <context name='Top'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'>
+                    <edge>top</edge>
+                </action>
+            </mousebind>
+        </context>
+        <context name='Left'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'>
+                    <edge>left</edge>
+                </action>
+            </mousebind>
+        </context>
+        <context name='Right'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'>
+                    <edge>right</edge>
+                </action>
+            </mousebind>
+        </context>
+        <context name='Bottom'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'>
+                    <edge>bottom</edge>
+                </action>
+            </mousebind>
+            <mousebind button='Middle' action='Press'>
+                <action name='Lower'/>
+                <action name='FocusToBottom'/>
+                <action name='Unfocus'/>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='ShowMenu'>
+                    <menu>client-menu</menu>
+                </action>
+            </mousebind>
+        </context>
+        <context name='BLCorner'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'/>
+            </mousebind>
+        </context>
+        <context name='BRCorner'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'/>
+            </mousebind>
+        </context>
+        <context name='TLCorner'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'/>
+            </mousebind>
+        </context>
+        <context name='TRCorner'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Drag'>
+                <action name='Resize'/>
+            </mousebind>
+        </context>
+        <context name='Client'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Middle' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+        </context>
+        <context name='Icon'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+                <action name='ShowMenu'>
+                    <menu>client-menu</menu>
+                </action>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='ShowMenu'>
+                    <menu>client-menu</menu>
+                </action>
+            </mousebind>
+        </context>
+        <context name='AllDesktops'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Click'>
+                <action name='ToggleOmnipresent'/>
+            </mousebind>
+        </context>
+        <context name='Shade'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Click'>
+                <action name='ToggleShade'/>
+            </mousebind>
+        </context>
+        <context name='Iconify'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Left' action='Click'>
+                <action name='Iconify'/>
+            </mousebind>
+        </context>
+        <context name='Maximize'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Middle' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Click'>
+                <action name='ToggleMaximizeFull'/>
+            </mousebind>
+            <mousebind button='Middle' action='Click'>
+                <action name='ToggleMaximizeVert'/>
+            </mousebind>
+            <mousebind button='Right' action='Click'>
+                <action name='ToggleMaximizeHorz'/>
+            </mousebind>
+        </context>
+        <context name='Close'>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+                <action name='Unshade'/>
+            </mousebind>
+            <mousebind button='Left' action='Click'>
+                <action name='Close'/>
+            </mousebind>
+        </context>
+        <context name='Desktop'>
+            <mousebind button='Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='A-Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='A-Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='C-A-Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='C-A-Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='Left' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='Focus'/>
+                <action name='Raise'/>
+            </mousebind>
+        </context>
+        <context name='Root'>
+            <!-- Menus -->
+            <mousebind button='Middle' action='Press'>
+                <action name='ShowMenu'>
+                    <menu>client-list-combined-menu</menu>
+                </action>
+            </mousebind>
+            <mousebind button='Right' action='Press'>
+                <action name='ShowMenu'>
+                    <menu>root-menu</menu>
+                </action>
+            </mousebind>
+        </context>
+        <context name='MoveResize'>
+            <mousebind button='Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+            <mousebind button='A-Up' action='Click'>
+                <action name='DesktopPrevious'/>
+            </mousebind>
+            <mousebind button='A-Down' action='Click'>
+                <action name='DesktopNext'/>
+            </mousebind>
+        </context>
+    </mouse>
+    <menu>
+        <!-- default menu file (or custom one in $HOME/.config/openbox/) -->
+        <file>/usr/share/lxde/openbox/menu.xml</file>
+        <hideDelay>200</hideDelay>
+        <!-- if a press-release lasts longer than this setting (in milliseconds), the
+       menu is hidden again -->
+        <middle>no</middle>
+        <!-- center submenus vertically about the parent entry -->
+        <submenuShowDelay>100</submenuShowDelay>
+        <!-- this one is easy, time to delay before showing a submenu after hovering
+       over the parent entry -->
+        <applicationIcons>yes</applicationIcons>
+        <!-- controls if icons appear in the client-list-(combined-)menu -->
+        <manageDesktops>yes</manageDesktops>
+    </menu>
+    <!-- show the manage desktops section in the client-list-(combined-)menu -->
+    <applications/>
+</openbox_config>
diff --git a/modules/workstation/files/flony/home/config/pcmanfm/LXDE/desktop-items-0.conf b/modules/workstation/files/flony/home/config/pcmanfm/LXDE/desktop-items-0.conf
new file mode 100644 (file)
index 0000000..1b5e243
--- /dev/null
@@ -0,0 +1,14 @@
+[*]
+wallpaper_mode=crop
+wallpaper_common=1
+wallpaper=/usr/share/lxde/wallpapers/lxde_blue.jpg
+desktop_bg=#000000
+desktop_fg=#ffffff
+desktop_shadow=#000000
+desktop_font=Sans 12
+show_wm_menu=0
+sort=mtime;ascending;
+show_documents=0
+show_trash=1
+show_mounts=0
+
diff --git a/modules/workstation/files/flony/home/config/pcmanfm/LXDE/pcmanfm.conf b/modules/workstation/files/flony/home/config/pcmanfm/LXDE/pcmanfm.conf
new file mode 100644 (file)
index 0000000..3722eef
--- /dev/null
@@ -0,0 +1,27 @@
+[config]
+bm_open_method=0
+
+[volume]
+mount_on_startup=1
+mount_removable=1
+autorun=1
+
+[ui]
+always_show_tabs=0
+max_tab_chars=32
+win_width=640
+win_height=480
+maximized=1
+splitter_pos=150
+media_in_new_tab=0
+desktop_folder_new_win=0
+change_tab_on_drop=1
+close_on_unmount=1
+focus_previous=0
+side_pane_mode=places
+view_mode=icon
+show_hidden=0
+sort=name;ascending;
+toolbar=newtab;navigation;home;
+show_statusbar=1
+pathbar_mode_buttons=0
diff --git a/modules/workstation/files/flony/home/config/redshift.conf b/modules/workstation/files/flony/home/config/redshift.conf
new file mode 100644 (file)
index 0000000..da26fa2
--- /dev/null
@@ -0,0 +1,8 @@
+[redshift]
+temp-day=4500
+temp-night=4500
+location-provider=manual
+
+[manual]
+lat=48.8566
+lon=2.3522
diff --git a/modules/workstation/files/flony/home/gitconfig b/modules/workstation/files/flony/home/gitconfig
new file mode 100644 (file)
index 0000000..a775fc4
--- /dev/null
@@ -0,0 +1,6 @@
+[user]
+       signingkey = DC384748709D2619FF2867216D0CAFFDDB1CFE90
+       email = ismael.bouya@fretlink.com
+       name = Ismaël Bouya
+[commit]
+       gpgsign = true
diff --git a/modules/workstation/files/flony/home/local/share/applications/mimeapps.list b/modules/workstation/files/flony/home/local/share/applications/mimeapps.list
new file mode 100644 (file)
index 0000000..1c53ef4
--- /dev/null
@@ -0,0 +1,19 @@
+[Added Associations]
+text/html=firefox.desktop
+text/xml=firefox.desktop
+application/xhtml+xml=firefox.desktop
+application/vnd.mozilla.xul+xml=firefox.desktop
+text/mml=firefox.desktop
+x-scheme-handler/http=firefox.desktop
+x-scheme-handler/https=firefox.desktop
+inode/directory=pcmanfm.desktop
+
+[Default Applications]
+text/html=firefox.desktop
+text/xml=firefox.desktop
+application/xhtml+xml=firefox.desktop
+application/vnd.mozilla.xul+xml=firefox.desktop
+text/mml=firefox.desktop
+x-scheme-handler/http=firefox.desktop
+x-scheme-handler/https=firefox.desktop
+inode/directory=pcmanfm.desktop
diff --git a/modules/workstation/files/flony/home/xinitrc b/modules/workstation/files/flony/home/xinitrc
new file mode 100644 (file)
index 0000000..4583bc6
--- /dev/null
@@ -0,0 +1,2 @@
+setxkbmap -layout fr -variant oss -model pc104 -option compose:menu  -option nbsp:level3 -option shift:breaks_caps -option terminate:ctrl_alt_bksp
+exec startlxde
diff --git a/modules/workstation/files/flony/wlp2s0-dhcp.network b/modules/workstation/files/flony/wlp2s0-dhcp.network
new file mode 100644 (file)
index 0000000..9767fda
--- /dev/null
@@ -0,0 +1,6 @@
+[Match]
+Name=wl*
+
+[Network]
+DHCP=ipv4
+
diff --git a/modules/workstation/files/flony/xorg_intel.conf b/modules/workstation/files/flony/xorg_intel.conf
new file mode 100644 (file)
index 0000000..7fb49e6
--- /dev/null
@@ -0,0 +1,7 @@
+Section "Device"
+    Identifier  "Intel Graphics" 
+    Driver      "intel"
+    Option      "TearFree"   "true"
+    Option      "AccelMethod"  "sna"
+    Option      "Backlight"  "intel_backlight"
+EndSection
diff --git a/modules/workstation/manifests/flony.pp b/modules/workstation/manifests/flony.pp
new file mode 100644 (file)
index 0000000..c8c361d
--- /dev/null
@@ -0,0 +1,120 @@
+class workstation::flony {
+  ensure_resource("exec", "mkinitcpio", {
+    command     => "/usr/bin/mkinitcpio -p linux",
+    refreshonly => true,
+  })
+
+  include "profile::tools"
+
+  file_line { "mkinitcpio.conf#HOOKS":
+    ensure => "present",
+    path   => "/etc/mkinitcpio.conf",
+    match  => "^HOOKS\=",
+    line   => "HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)",
+    notify => Exec["mkinitcpio"],
+  }
+
+  ensure_packages(['wpa_supplicant'])
+
+  file { "/etc/wpa_supplicant/wpa_supplicant-wlp2s0.conf":
+    ensure => file,
+    source => "puppet:///modules/workstation/flony/wpa_supplicant.conf",
+    mode   => "0755",
+    owner  => root,
+    group  => root,
+    notify => Service["wpa_supplicant@wlp2s0"],
+  }
+
+  file { "/etc/systemd/network/wlp2s0-dhcp.network":
+    ensure => file,
+    source => "puppet:///modules/workstation/flony/wlp2s0-dhcp.network",
+    mode   => "0755",
+    owner  => root,
+    group  => root,
+  }
+
+  service { "wpa_supplicant@wlp2s0":
+    ensure => "running",
+    enable => true,
+    require => [File["/etc/wpa_supplicant/wpa_supplicant-wlp2s0.conf"], Package["wpa_supplicant"]],
+  }
+  #service { "dhcpcd@wlp2s0.service":
+  #  enable => false,
+  #}
+  ensure_packages(['lxde', 'xorg-xinit', 'xorg-fonts-misc', 'xorg-fonts-100dpi', 'xorg-fonts-75dpi', 'xorg-fonts-type1', 'noto-fonts-emoji'])
+
+  ensure_packages(['firefox'])
+
+  ensure_packages(['dmidecode', 'fwupd'])
+
+  aur::package { "geteltorito": }
+
+  ensure_packages(['stack'])
+  # ensure_packages(['ghc'], {
+  #   ensure => absent,
+  #   uninstall_options => "-sc"
+  # })
+
+  ensure_packages(['xorg-xev', 'xorg-xset', 'xorg-xbacklight', 'slock'])
+
+  ensure_packages(['mesa', 'xf86-video-intel', 'vulkan-intel'])
+  file { "/etc/X11/xorg.conf.d/20-intel.conf":
+    ensure => file,
+    source => "puppet:///modules/workstation/flony/xorg_intel.conf",
+    mode   => "0755",
+    owner  => "root",
+    group  => "root",
+  }
+
+  ensure_packages(['redshift', 'python-xdg', 'python-gobject'])
+
+  # xdg-open
+  ensure_packages(['xdg-utils'])
+
+  ensure_packages(['postgresql', 'postgis'])
+
+  # User
+  file { "/home/ismael/.bash_logout":
+    ensure  => file,
+    content => "#\n# ~/.bash_logout\n#\n",
+    mode    => "0644",
+    owner   => "ismael",
+    group   => "ismael",
+  }
+  file { "/home/ismael/.bashrc":
+    ensure  => file,
+    source  => "puppet:///modules/workstation/flony/home/bashrc",
+    mode    => "0644",
+    owner   => "ismael",
+    group   => "ismael",
+  }
+  file { "/home/ismael/.gitconfig":
+    ensure  => file,
+    source  => "puppet:///modules/workstation/flony/home/gitconfig",
+    mode    => "0644",
+    owner   => "ismael",
+    group   => "ismael",
+  }
+  file { "/home/ismael/.xinitrc":
+    ensure  => file,
+    source  => "puppet:///modules/workstation/flony/home/xinitrc",
+    mode    => "0644",
+    owner   => "ismael",
+    group   => "ismael",
+  }
+
+  file { "/home/ismael/.config":
+    ensure  => directory,
+    source  => "puppet:///modules/workstation/flony/home/config",
+    recurse => "remote",
+    owner   => "ismael",
+    group   => "ismael",
+  }
+  file { "/home/ismael/.local":
+    ensure  => directory,
+    source  => "puppet:///modules/workstation/flony/home/local",
+    recurse => "remote",
+    owner   => "ismael",
+    group   => "ismael",
+  }
+}