new version after nix
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
---
|
||||
- name: Read the configured timezone
|
||||
ansible.builtin.command: timedatectl show --property=Timezone --value
|
||||
register: configured_timezone
|
||||
changed_when: false
|
||||
|
||||
- name: Set the system timezone
|
||||
ansible.builtin.command: "timedatectl set-timezone {{ system_timezone }}"
|
||||
when: configured_timezone.stdout != system_timezone
|
||||
|
||||
- name: Configure system locale
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/locale.conf
|
||||
mode: "0644"
|
||||
content: |
|
||||
LANG={{ system_locale }}
|
||||
LC_ADDRESS={{ regional_locale }}
|
||||
LC_IDENTIFICATION={{ regional_locale }}
|
||||
LC_MEASUREMENT={{ regional_locale }}
|
||||
LC_MONETARY={{ regional_locale }}
|
||||
LC_NAME={{ regional_locale }}
|
||||
LC_NUMERIC={{ regional_locale }}
|
||||
LC_PAPER={{ regional_locale }}
|
||||
LC_TELEPHONE={{ regional_locale }}
|
||||
LC_TIME={{ regional_locale }}
|
||||
|
||||
- name: Configure console keyboard
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/vconsole.conf
|
||||
mode: "0644"
|
||||
content: |
|
||||
KEYMAP=dk
|
||||
|
||||
- name: Add workstation user to administrative and device groups
|
||||
ansible.builtin.user:
|
||||
name: "{{ user_name }}"
|
||||
groups: "{{ ['wheel', 'video', 'input'] + (['libvirt'] if install_virtualization else []) }}"
|
||||
append: true
|
||||
shell: /usr/bin/zsh
|
||||
|
||||
- name: Check transparent hugepage kernel argument
|
||||
ansible.builtin.shell: |
|
||||
grubby --info=ALL | awk '
|
||||
/^args=/ {
|
||||
seen = 1
|
||||
if (index($0, "transparent_hugepage=never") == 0) missing = 1
|
||||
}
|
||||
END { exit !(seen && !missing) }
|
||||
'
|
||||
args:
|
||||
executable: /bin/bash
|
||||
register: transparent_hugepage_argument
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Disable transparent hugepages in all boot entries
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- grubby
|
||||
- --update-kernel=ALL
|
||||
- --args=transparent_hugepage=never
|
||||
when: transparent_hugepage_argument.rc != 0
|
||||
|
||||
- name: Configure workstation environment
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/profile.d/fedora-workstation.sh
|
||||
mode: "0644"
|
||||
content: |
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||
export GOPATH="${GOPATH:-$HOME/go}"
|
||||
export PATH="$HOME/.scripts:$HOME/.local/bin:$HOME/.cargo/bin:$HOME/.bun/bin:$HOME/bin/zig:$HOME/bin/zls:$GOPATH/bin:$PATH"
|
||||
export TERMINAL=foot
|
||||
export BROWSER=zen
|
||||
export GTK_THEME=Adwaita:dark
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
export ELECTRON_OZONE_PLATFORM_HINT=wayland
|
||||
Reference in New Issue
Block a user