From 553b1a11b85b7eac0af00fb753550fb8c85b1a35 Mon Sep 17 00:00:00 2001 From: earnest ma Date: Sat, 2 Jul 2022 12:02:10 -0400 Subject: [PATCH] Let's try adding shell.nix --- .envrc | 1 + README.md | 16 ++++++++++------ shell.nix | 9 +++++++++ 3 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..4a4726a --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use_nix diff --git a/README.md b/README.md index 10ba6d9..9fdb952 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,16 @@ # ansible -Configuration through [Ansible](https://ansible.com) for my main laptop. +Configuration through [Ansible](https://ansible.com) for my development environment(s). -## Start +Clone & execute the main playbook locally: `ansible-playbook run.yml -K` -1. `curl https://git.earne.link/earnestma/ansible/raw/branch/main/ensure.sh | sh` -2. Clone the repository and enter it -3. Execute the main playbook: `ansible-playbook run.yml -K` +You will need to set SELinux to permissive and install nix first: -Other playbooks: +```bash +sudo setenforce 0 +sh <(curl -L https://nixos.org/nix/install) --daemon +nix-shell +``` - Run usual updates: `ansible-playbook update.yml -K` @@ -16,6 +18,8 @@ Other playbooks: - `git config core.hooksPath .git-hooks` +TODO(earne): Remove this/ update + ## After first time run - Restore all/ specific files (e.g. those with secrets) from a backup, if needed diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..db87ad9 --- /dev/null +++ b/shell.nix @@ -0,0 +1,9 @@ +{ pkgs ? import {} }: + +with pkgs; +mkShell { + BuildInputs = [ + ansible + ansible-lint + ]; +}