Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ion-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
redox-os
ion-plugins
Commits
cf1e0b55
Commit
cf1e0b55
authored
Aug 31, 2019
by
AdminXVII
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'add-nix' into 'master'
Add nix package manager support. See merge request
!5
parents
906a451b
ff2b8c26
Pipeline
#5892
passed with stages
in 4 minutes and 5 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
0 deletions
+88
-0
plugins.md
plugins.md
+1
-0
tools/nix.ion
tools/nix.ion
+87
-0
No files found.
plugins.md
View file @
cf1e0b55
...
...
@@ -164,6 +164,7 @@ Since Ion does not support autocompletion via plugins, a lot of oh-my-zsh plugin
| mysql-macports | Done |
| n98-magerun | Not sure |
| nanoc | Not sure |
| nim | Done |
| ng | Not happening |
| nmap | Done |
| node | Not sure |
...
...
tools/nix.ion
0 → 100644
View file @
cf1e0b55
# This plugin is based on the nix plugin for elvish.
# It doesn't leave any functions, only sets up the profile and sets the appropriate
# environment variables.
fn setup_nix
# Only execute this file once per shell.
if test -n $or(${__ETC_PROFILE_NIX_SOURCED} "")
break
end
export __ETC_PROFILE_NIX_SOURCED=1
# Set up secure multi-user builds: non-root users build through the
# Nix daemon.
if test "$USER" != root || not test -w /nix/var/nix/db
export NIX_REMOTE=daemon
end
export NIX_USER_PROFILE_DIR="/nix/var/nix/profiles/per-user/$USER"
let nix_profiles = [ "/nix/var/nix/profiles/default" "$HOME/.nix-profile" ]
export NIX_PROFILES=$join(nix_profiles)
# Set up the per-user profile.
mkdir -m 0755 -p $NIX_USER_PROFILE_DIR
if not test -O "$NIX_USER_PROFILE_DIR"
echo "WARNING: bad ownership on $NIX_USER_PROFILE_DIR"
end
if test -w $HOME
if not test -L $HOME/.nix-profile
if test "$USER" != root
ln -s $NIX_USER_PROFILE_DIR/profile $HOME/.nix-profile
else
# Root installs in the system-wide profile by default.
ln -s /nix/var/nix/profiles/default $HOME/.nix-profile
end
end
# Subscribe the root user to the NixOS channel by default.
if test "$USER" = root && not test -e $HOME/.nix-channels
echo "https://nixos.org/channels/nixpkgs-unstable nixpkgs" > $HOME/.nix-channels
end
# Create the per-user garbage collector roots directory.
let NIX_USER_GCROOTS_DIR=/nix/var/nix/gcroots/per-user/$USER
mkdir -m 0755 -p $NIX_USER_GCROOTS_DIR
if not test -O "$NIX_USER_GCROOTS_DIR"
echo "WARNING: bad ownership on $NIX_USER_GCROOTS_DIR"
end
# Set up a default Nix expression from which to install stuff.
if not test -e $HOME/.nix-defexpr || test -L $HOME/.nix-defexpr
rm -f $HOME/.nix-defexpr
mkdir -p $HOME/.nix-defexpr
if test "$USER" != root
ln -s /nix/var/nix/profiles/per-user/root/channels $HOME/.nix-defexpr/channels_root
end
end
end
# Set $NIX_SSL_CERT_FILE so that Nixpkgs applications like curl work.
if not test -z $or(${NIX_SSL_CERT_FILE} "")
: # Allow users to override the NIX_SSL_CERT_FILE
else if test -e /etc/ssl/certs/ca-certificates.crt # NixOS, Ubuntu, Debian, Gentoo, Arch
export NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
else if test -e /etc/ssl/ca-bundle.pem # openSUSE Tumbleweed
export NIX_SSL_CERT_FILE=/etc/ssl/ca-bundle.pem
else if test -e /etc/ssl/certs/ca-bundle.crt # Old NixOS
export NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
else if test -e /etc/pki/tls/certs/ca-bundle.crt # Fedora, CentOS
export NIX_SSL_CERT_FILE=/etc/pki/tls/certs/ca-bundle.crt
else
# Fall back to what is in the nix profiles, favouring whatever is defined last.
for i in @nix_profiles
if test -e $i/etc/ssl/certs/ca-bundle.crt
export NIX_SSL_CERT_FILE=$i/etc/ssl/certs/ca-bundle.crt
end
end
end
export NIX_PATH="nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixpkgs:/nix/var/nix/profiles/per-user/root/channels"
export PATH="$HOME/.nix-profile/bin:/nix/var/nix/profiles/default/bin:$PATH"
end
setup_nix
drop setup_nix
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment