Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Puppetfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mod 'puppetlabs-apt', '10.0.1'
mod 'puppetlabs-stdlib', '9.7.0'
1 change: 1 addition & 0 deletions modules/hosts/home-manager-only/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
home.packages = with pkgs; [
age
home-manager
r10k
sops
ssh-to-age
];
Expand Down
5 changes: 5 additions & 0 deletions modules/hosts/home-manager-only/scripts/run-r10k.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

sudo /home/gene/.nix-profile/bin/r10k puppetfile install \
--puppetfile=/home/gene/repos/dots/Puppetfile \
--moduledir=/etc/puppetlabs/code/environments/production/modules
77 changes: 77 additions & 0 deletions modules/hosts/home-manager-only/scripts/ubuntu.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
include apt

# Manage the OpenVox APT repository and install the openvox-agent package
$os_name = downcase($facts['os']['name'])
apt::source { 'openvox8-release':
comment => "OpenVox 8 ${os_name}${facts['os']['release']['major']} Repository",
location => 'https://apt.voxpupuli.org',
release => "${os_name}${facts['os']['release']['major']}",
repos => 'openvox8',
key => {
'name' => 'openvox-keyring.gpg',
'source' => 'https://apt.voxpupuli.org/openvox-keyring.gpg',
},
}

package { 'openvox-agent':
ensure => latest,
require => Apt::Source['openvox8-release'],
}

# Manage the Mozilla APT repository and install the firefox deb package
# This is to avoid the snap version that comes by default on Ubuntu
# https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04
apt::source { 'mozilla':
comment => 'Mozilla Team',
location => 'https://packages.mozilla.org/apt',
release => 'mozilla',
repos => 'main',
key => {
'name' => 'packages.mozilla.org.asc',
'ring' => '/etc/apt/keyrings/packages.mozilla.org.asc',
'source' => 'https://packages.mozilla.org/apt/repo-signing-key.gpg',
},
include => {
'src' => false,
},
}

exec { 'remove_firefox_snap':
command => '/usr/bin/snap remove firefox',
onlyif => '/usr/bin/snap list | /bin/grep firefox',
notify => Exec['remove_stock_firefox_fake_deb'],
}

exec { 'remove_stock_firefox_fake_deb':
command => '/usr/bin/apt-get -y remove firefox',
onlyif => '/usr/bin/dpkg -l | /bin/grep firefox',
refreshonly => true,
before => Package['firefox'],
}

apt::pin { 'mozilla':
explanation => 'Prefer the Mozilla APT repository for Firefox',
packages => '*',
origin => 'packages.mozilla.org',
priority => 1000,
before => Package['firefox'],
}

apt::pin { 'firefox':
explanation => "Don't use the Ubuntu repository for Firefox",
packages => 'firefox*',
originator => 'Ubuntu',
priority => -1,
before => Package['firefox'],
}

package { 'firefox':
ensure => latest,
}

## More stuff to come...

# package { 'vscode':
# ensure => installed,
# source => 'https://vscode.download.prss.microsoft.com/dbazure/download/stable/e3550cfac4b63ca4eafca7b601f0d2885817fd1f/code_1.103.0-1754517494_amd64.deb',
# }