浏览代码

feat(genie): Add systemd-genie

STATE:
Enable systemd on "WSL"

Signed-off-by: Jeremy MAURO <jeremy.mauro@gmail.com>
Jeremy MAURO 2 年之前
父节点
当前提交
6e3a7ad886
共有 2 个文件被更改,包括 28 次插入0 次删除
  1. 25 0
      cookbooks/workstation/recipes/_systemd-genie.rb
  2. 3 0
      cookbooks/workstation/recipes/default.rb

+ 25 - 0
cookbooks/workstation/recipes/_systemd-genie.rb

@@ -0,0 +1,25 @@
+#
+# Cookbook:: workstation
+# Recipe:: _podman
+#
+# Copyright:: 2022, The Authors, All Rights Reserved.
+
+package 'lsb-release'
+
+key_path = '/etc/apt/trusted.gpg.d'
+gpg_key = ::File.join(key_path, 'wsl-transdebian.gpg')
+remote_file gpg_key do
+  source 'https://arkane-systems.github.io/wsl-transdebian/apt/wsl-transdebian.gpg'
+  action :create_if_missing
+end
+
+apt_repository 'wsl_transdebian' do
+  arch 'amd64'
+  uri 'https://arkane-systems.github.io/wsl-transdebian/apt/'
+  distribution lazy { Mixlib::ShellOut.new('lsb_release -cs').run_command.stdout.chomp }
+  components ['main']
+  deb_src true
+  action :add
+end
+
+package 'systemd-genie'

+ 3 - 0
cookbooks/workstation/recipes/default.rb

@@ -19,3 +19,6 @@ include_recipe 'workstation::_podman'
 # Setup etckeeper
 include_recipe 'etckeeper'
 include_recipe 'etckeeper::commit'
+
+# Install 'systemd-genie'
+include_recipe 'workstation::_systemd-genie'