From c40296eca69d309dfc92b949295bd7691984ea1a Mon Sep 17 00:00:00 2001 From: Alessandro Franceschi Date: Tue, 7 Feb 2023 11:11:30 +0100 Subject: [PATCH] Temporary nix data #70 --- data/nix/default.yaml | 95 ++++++++++++++++++++++++++++++++++ data/nix/hiera.yaml | 15 ++++++ data/nix/osfamily/Darwin.yaml | 11 ++++ data/nix/osfamily/Debian.yaml | 6 +++ data/nix/osfamily/RedHat.yaml | 3 ++ data/nix/osfamily/windows.yaml | 14 +++++ 6 files changed, 144 insertions(+) create mode 100644 data/nix/default.yaml create mode 100644 data/nix/hiera.yaml create mode 100644 data/nix/osfamily/Darwin.yaml create mode 100644 data/nix/osfamily/Debian.yaml create mode 100644 data/nix/osfamily/RedHat.yaml create mode 100644 data/nix/osfamily/windows.yaml diff --git a/data/nix/default.yaml b/data/nix/default.yaml new file mode 100644 index 00000000..035179f4 --- /dev/null +++ b/data/nix/default.yaml @@ -0,0 +1,95 @@ +--- +nix::settings: + tp_prerequisites: {} + exec_prerequisites: + install: + command: 'sh <(curl -L https://nixos.org/nix/install) --daemon' + creates: '/nix' + + urls: + website: 'https://nixos.org' + issues: 'https://github.com/nixos/nix/issues' + documentation: 'https://nix.com/documentation' + source: 'https://github.com/nix/nix' + description: 'nix description' + + # Configured: +package -source -file +image + install_method: 'source' + + packages: [] + manage_package: false + prerequisites: + exec: + command: 'sh <(curl -L https://nixos.org/nix/install) --daemon' + creates: '/nix' + + services: + main: + name: nix-daemon + process_name: nix + process_extra_name: ~ + process_user: root + process_group: root + nodaemon_args: '-D' + ensure: running + enable: true + pidfile: /run/nix.pid + params: {} + + + files: + config: + path: '/etc/nix/nix.conf' + init: + path: '/etc/sysconfig/nix-daemon.conf' + format: 'inifile' + systemd: + path: '/etc/systemd/system/nix-daemon.service' + format: 'inifile_with_stanzas' + + dirs: + config: + path: '/etc/nix' + metadata: + path: /nix/var/nix + log: + path: /nix/var/log + store: + path: /nix + + user_files: + config: + path: '$HOME/.config/nix/nix.conf' + + user_dirs: + config: + path: '$HOME/.config/nix' + + info_commands: + list_profile: 'nix profile list' + list_store: 'nix store ls' + debug_commands: + debug: 'nix store verify' + test_commands: + status: 'nix status' + version_command: 'nix --version' + help_command: 'nix --help' + run_commands: + start: + command: 'nix start' + + image: + name: 'nixos/nix' + systemd_options: {} + + releases: + latest_version: 2.13.2 + latest_url: ~ + base_url: 'https://releases.nixos.org/nix/nix-$VERSION/nix-$VERSION-$OS.tar.xz' + file_name: 'nix-$VERSION-$OS.tar.xz' + extracted_dir: 'nix-$VERSION-$OS' + file_format: xz + prerequisites: + exec: + command: 'sh <(curl -L https://nixos.org/nix/install) --daemon' + creates: '/nix' diff --git a/data/nix/hiera.yaml b/data/nix/hiera.yaml new file mode 100644 index 00000000..b2a2fa6a --- /dev/null +++ b/data/nix/hiera.yaml @@ -0,0 +1,15 @@ +--- +:hierarchy: + - "%{title}/%{repo}/operatingsystem/%{operatingsystem}%{operatingsystemmajrelease}" + - "%{title}/%{repo}/operatingsystem/%{operatingsystem}" + - "%{title}/%{repo}/osfamily/%{osfamily}%{operatingsystemmajrelease}" + - "%{title}/%{repo}/osfamily/%{osfamily}" + - "%{title}/%{repo}/default" + - "%{title}/operatingsystem/%{operatingsystem}%{operatingsystemmajrelease}" + - "%{title}/operatingsystem/%{operatingsystem}" + - "%{title}/osfamily/%{osfamily}%{operatingsystemmajrelease}" + - "%{title}/osfamily/%{osfamily}" + - "%{title}/default" + - "default/%{operatingsystem}%{operatingsystemmajrelease}" + - "default/%{operatingsystem}" + - default diff --git a/data/nix/osfamily/Darwin.yaml b/data/nix/osfamily/Darwin.yaml new file mode 100644 index 00000000..28548fc3 --- /dev/null +++ b/data/nix/osfamily/Darwin.yaml @@ -0,0 +1,11 @@ +--- +nix::settings: + brew_package_name: 'nix' + + user_files: + config: + path: '$HOME/Library/Application\ Support/nix/nix.conf' + + user_dirs: + config: + path: '$HOME/Library/Application\ Support/nix/nix.conf' \ No newline at end of file diff --git a/data/nix/osfamily/Debian.yaml b/data/nix/osfamily/Debian.yaml new file mode 100644 index 00000000..b3ed05e4 --- /dev/null +++ b/data/nix/osfamily/Debian.yaml @@ -0,0 +1,6 @@ +--- +nix::settings: + + files: + init: + path: '/etc/default/nix' \ No newline at end of file diff --git a/data/nix/osfamily/RedHat.yaml b/data/nix/osfamily/RedHat.yaml new file mode 100644 index 00000000..4c7da897 --- /dev/null +++ b/data/nix/osfamily/RedHat.yaml @@ -0,0 +1,3 @@ +--- +nix::settings: + dockerfile_prerequisites: 'RUN yum install -y wget which' diff --git a/data/nix/osfamily/windows.yaml b/data/nix/osfamily/windows.yaml new file mode 100644 index 00000000..98b96c60 --- /dev/null +++ b/data/nix/osfamily/windows.yaml @@ -0,0 +1,14 @@ +--- +nix::settings: + + # If exe or msi package is available for direct download: + package_provider: 'windows' + package_source: 'https://github.com/nix/nix/releases/download/v$VERSION/nix_$VERSION_$OS_$ARCH.msi' + + user_files: + config: + path: '%APPDATA%\nix\nix.conf' + + user_dirs: + config: + path: '%APPDATA%\nix' \ No newline at end of file