Skip to content

Commit

Permalink
Add Home Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
staticdev committed Dec 30, 2023
1 parent f2edc89 commit 428f16e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- Development: [Golang], [NodeJs] and [Python tools].
- IDEs: [VSCodium] and [Pycharm] installation.
- Browsers: [Firefox] ESR replacement with official PPA and configuration; and [Brave] installation.
- Package manager installation: [Nix].
- Package manager installation: [Nix] and [Home Manager].
- Packages intallation: apt, nix, snap, pip, npm, ruby gems.
- Replaces [LibreOffice] with [OnlyOffice].
- Assorted FOSS programs: [Cryptomator], [KeyPass], [OBS], [OpenRGB], [RClone], and [Signal] messenger installation.
Expand Down Expand Up @@ -194,6 +194,7 @@ This project was inspired by [@geerlingguy]'s [Mac Development Ansible Playbook]
[git]: https://git-scm.com/
[gnome]: https://www.gnome.org/
[golang]: https://go.dev/
[home manager]: https://github.com/nix-community/home-manager
[libreoffice]: https://www.libreoffice.org/
[nodejs]: https://nodejs.org/
[keypass]: https://keepass.info/
Expand Down
1 change: 1 addition & 0 deletions default.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ installed_packages:
- podman # see https://github.com/NixOS/nixpkgs/issues/138423
- poedit

install_home_manager: true
nix_packages:
- name: kubectl
check_cmd: kubectl version --client
Expand Down
4 changes: 4 additions & 0 deletions main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
ansible.builtin.include_tasks: tasks/packages.yml
when: install_packages

- name: Install Home Manager
ansible.builtin.include_tasks: tasks/home-manager.yml
when: install_home_manager

- name: Install zsh
ansible.builtin.include_tasks: tasks/zsh.yml
when: install_zsh
Expand Down
18 changes: 18 additions & 0 deletions tasks/home-manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
- name: "Add home-manager channel"
ansible.builtin.command: "nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager"
environment:
PATH: "{{ ansible_env.HOME + '/.nix-profile/bin:$PATH' }}"
changed_when: false

- name: "Get channel updates"
ansible.builtin.command: "nix-channel --update"
environment:
PATH: "{{ ansible_env.HOME + '/.nix-profile/bin:$PATH' }}"
changed_when: false

- name: "Add Home Manager"
ansible.builtin.command: "nix-shell '<home-manager>' -A install"
environment:
PATH: "{{ ansible_env.HOME + '/.nix-profile/bin:$PATH' }}"
changed_when: true

0 comments on commit 428f16e

Please sign in to comment.