Chad 392294fb45
General Enhancements, NixOS Support (#47)
* Begin adding Nix.

* Install LBRY from Nix since its Flatpak is no longer supported..

* Got the global install to work, now just figuring out why LBRY won't work.

* Add alias to blow away dev branch and start back up from remote or main.

* Nix install not really working, requires manual intervention, maybe add to setup.sh or just try NixOS and see if it can 'replace' this entire Ansible project and cease the use of multiple operating systems.

* Start working on having a path for NixOS.

* Add NixOS.

* Skip the installer portion if using NixOS.

* Start including more tasks. ALl work besides GNOME due to psutil, even though it is included in configuration.nix.

* This should have never been added. Was an accident if it snuck though.

* Test using env rather than hard-coded bash path.

* Use variables, start thinking about future.

* Add file to manage setting up NixOS for the first or any subsequent times.

* Use the new nixos.sh script.

* Ensure /usr/local/bin is in PATH.

* Do not use * inside of "" for ls.

* Add filename cleanup shortcut.

* Add a clean option as well as a few bugfixes and checking that convert is installed.

* Use underscores in filenames and remove plurality.

* Bring the file into better column compliance.

* Stop running the dconf psutil failures against NixOS for now.

* Ensure the old names of scripts are removed from bin.

* Clean filename fixes as well as a traversing version.

* Remove extra spacing.

* Begin adding swapfile creation.

* Add dangerous code reset command.

* Add some cleaning for NixOS package manager.

* The ~ was being taken literally and created as a new folder.

* More work on swap files, and a new ansible.nix file.

* Fix the swap confuration line.

* Finish the swap configuration by checking if it already exists. Always keep the fstab line in existence.

* Reorder and enhance the update function for NixOS.

* Add comment.

* Start working on dconf for NixOS since don't have home-manager working yet in configration.nix.

* Add notes.

* If the file was created, make sure the user owns it and can edit by default.

* Favorites are working and only need maintained in one place! :)

* Add .zshrc for GNOME settings on NixOS.

* Add most other settings that are done manually post-install. Report any failures with their placement.

* FINALLY! Keyboard shortcuts and some final Gnome Tweak settings!

* Add night light settings.

* Move around some comments.

* Pull first then deal with any merge issues, rather than trying to push when there are things to pull.

* Test removing the dconf commands for non-NixOS.

* Alter output; remove extra newlines and add cache verbosity.

* dconf in rc files is working on Ubuntu!

* Add delete. Fix filename quotes. Other enhancements.

* Create new folder chain if clean changed directory names.

* Add TBD about changing the directory structure.

* Only say success if the file really exists. Skip if conversion fails.

* Only say success if the file really exists. Skip if conversion fails.

* Add quotes around dirname.

* Add quotes around the entire directory tree.

* Add quotes to comment in case it ever gets used.

* Add a bittorrent client.

* Disable Bluetooth on all devices, it's normally off anyways.

* Fix comments, this enables not disables.

* Create new services report.

* Add services report to main area and move all reports to NixOS area.

* Fix swap file variable name for non-NixOS distros.

* Add godot editor.

* Re-add extra programs Geary and OpenShot for variety.

* Shorten the output for 80 char terminals.

* Add Code-OSS for when Codium is having issues.

* Allow code-oss to be installed.

* Add the full desktop entry for Code-OSS.

* Ansible handles the newlines, prevent the -e from getting into the file.

* Enhance newlines in nmap report.

* Add NixOS.
2023-10-17 04:30:36 -07:00

41 lines
1.3 KiB
YAML

---
# Setup swap file on systems without any swap available.
# Must have the swap amount preferred set up in general.ini.
# This does not handle if the user changes the file name or location later on.
- name: General | Software | Swap
block:
- name: General | Software | Swap | Check For Swapfile
stat:
path: "{{ swap_file }}"
register: swap_check
- name: General | Software | Swap | Install Block
block:
- name: General | Software | Swap | Create Swapfile
shell: "{{ item }}"
loop:
- dd if=/dev/zero of={{ swap_file }} bs={{ swap_block }}
count={{ swap_count }} status=progress
- chmod 600 {{ swap_file }}
- mkswap {{ swap_file }}
- swapon {{ swap_file }}
# Only do the swapfile generation if it does not already exist.
when: not swap_check.stat.exists
# NixOS's swap setup is handled in nixos.yml when ansible.nix is created.
- name: General | Software | Swap | Add to FSTAB
lineinfile:
path: /etc/fstab
regexp: '^[\#]?{{ swap_file }}'
line: '{{ swap_file }} none swap sw 0 0'
state: present
backup: yes
when: ansible_distribution != "NixOS"
# Only run through this file if the ini has been changed from false.
when: swap_block != false