Advertisement
copysiper

Untitled

Apr 22nd, 2024
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. ---
  2. - name: arch-core.yml - base setup for arch
  3. hosts: arch
  4. become: yes
  5.  
  6. vars:
  7. the_user: "{{ ansible_user_id }}"
  8.  
  9. tasks:
  10.  
  11. # CONFIG - Pacman
  12.  
  13. - name: Pacman - Enable color, ParallelDownloads, ILoveCandy, VerbosePkgLists, and NoExtract
  14. lineinfile:
  15. path: /etc/pacman.conf
  16. regexp: "{{ item.regexp }}"
  17. line: "{{ item.line }}"
  18. loop:
  19. - { regexp: '^#Color$', line: 'Color' }
  20. - { regexp: 'ParallelDownloads =', line: 'ParallelDownloads = 16' }
  21. - { regexp: '^#ILoveCandy$', line: 'ILoveCandy' }
  22. - { regexp: '^#VerbosePkgLists$', line: 'VerbosePkgLists' }
  23. - { regexp: '^#NoExtract$', line: 'NoExtract = usr/lib/security/pam_systemd_home.so' }
  24.  
  25. # CONFIG - nano
  26.  
  27. - name: Nano - Enable color in config
  28. lineinfile:
  29. path: /etc/nanorc
  30. line: '{{ item }}'
  31. loop:
  32. - 'include "/usr/share/nano/extra/*.nanorc"'
  33. - 'include "/usr/share/nano/*.nanorc"'
  34.  
  35. # CONFIG - makepkg
  36.  
  37. - name: makepkg - disable pkg compression
  38. lineinfile:
  39. path: /etc/makepkg.conf
  40. regexp: "PKGEXT='.pkg.tar.zst'"
  41. line: "PKGEXT='.pkg.tar'"
  42.  
  43. # PACKAGES - Upgrade
  44.  
  45. - name: Full system upgrade via pacman
  46. pacman:
  47. update_cache: true
  48. upgrade: true
  49.  
  50. # PACKAGES - Setup
  51.  
  52. - name: Setup base needed packages
  53. pacman:
  54. update_cache: yes
  55. name:
  56. - nano
  57. - less
  58. - git
  59. - base-devel
  60. - curl
  61. - wget
  62. - rsync
  63. - bat
  64. - fastfetch
  65. - btop
  66. - lsd
  67. - zsh
  68. - zsh-autosuggestions
  69. - zsh-syntax-highlighting
  70. - zsh-history-substring-search
  71. - zsh-completions
  72. - inxi
  73. - pigz
  74. - pbzip2
  75. - fwupd
  76. - amd-ucode
  77. - linux-firmware
  78. - github-cli
  79. - networkmanager
  80. - python3
  81. - reflector
  82. state: present
  83.  
  84. # OPTIMIZATION
  85.  
  86. - name: fstab - change relatime to noatime
  87. replace:
  88. path: /etc/fstab
  89. regexp: 'relatime'
  90. replace: 'noatime'
  91.  
  92. - name: Disable unnecessary services
  93. systemd:
  94. name: "{{ item }}"
  95. state: stopped
  96. enabled: no
  97. loop:
  98. - bluetooth.service
  99. - ModemManager.service
  100. - pcscd.service
  101.  
  102. - name: Enable performance governor
  103. command: cpupower frequency-set -g performance
  104.  
  105. # ZSH
  106.  
  107. - name: change shell to zsh
  108. user:
  109. shell: /bin/zsh
  110. name: "{{ the_user }}"
  111.  
  112. - name: copy zsh dotfiles
  113. copy:
  114. src: "user_home/{{ item }}"
  115. dest: "/home/{{ the_user }}/{{ item }}"
  116. force: True
  117. owner: "{{ the_user }}"
  118. group: "{{ the_user }}"
  119. mode: u+rw,g+r,o--
  120. loop:
  121. - .zshrc
  122. - .p10k-main.zsh
  123. - .p10k-portable.zsh
  124. - .p10k.zsh
  125.  
  126. # AUR Setup
  127.  
  128. - name: Install yay using makepkg if it isn't installed already
  129. kewlfft.aur.a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement