aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-05-22 22:12:55 -0300
committerEuAndreh <eu@euandre.org>2019-05-22 22:12:55 -0300
commit37ff2b4c845bc1e2c7fa0d62dc293dda8349193e (patch)
tree8f668e2b5093b4bf57f48dc9ab62a808d9fa9cdc
parentmrconfig.ini (diff)
downloaddotfiles-37ff2b4c845bc1e2c7fa0d62dc293dda8349193e.tar.gz
dotfiles-37ff2b4c845bc1e2c7fa0d62dc293dda8349193e.tar.xz
Revert "Remove Guix compatibility code."
This reverts commit 5e9efb6478e7ef38ee2fcf2921634db0c27f5d05.
-rw-r--r--bash/env.sh15
-rw-r--r--git/mrconfig.inibin9869 -> 11111 bytes
-rw-r--r--nixos/configuration.nix64
-rwxr-xr-xscripts/gc.sh5
l---------scripts/guix1
-rw-r--r--spacemacs.el4
6 files changed, 81 insertions, 8 deletions
diff --git a/bash/env.sh b/bash/env.sh
index 7b51529..d86a89b 100644
--- a/bash/env.sh
+++ b/bash/env.sh
@@ -66,6 +66,21 @@ isLinux && {
#
+# Guix
+#
+
+# export GUIX_PROFILE="$HOME/.guix-profile/etc/profile"
+# isLinux && {
+# source "$GUIX_PROFILE"
+# }
+export PATH="$HOME/.guix-profile/bin${PATH:+:}$PATH"
+export PATH="$HOME/.config/guix/current/bin${PATH:+:}$PATH"
+export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale" # after running guix package -i glibc-utf8-locales
+# https://git.savannah.gnu.org/cgit/guix.git/tree/doc/guix.texi?id=cd6ae1cee95644b9aa712a7192bc9677a04c146b#n1287
+export NIX_BUILD_CORES=0
+
+
+#
# Go
#
diff --git a/git/mrconfig.ini b/git/mrconfig.ini
index 51cdb5a..4250937 100644
--- a/git/mrconfig.ini
+++ b/git/mrconfig.ini
Binary files differ
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index 2648aa6..b555977 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -422,14 +422,62 @@ in
users = {
mutableUsers = false;
- extraUsers.andreh = {
- isNormalUser = true;
- uid = 1000;
- description = "EuAndreh";
- extraGroups = [ "wheel" "networkmanager" "docker" ];
- # Generated with:
- # mkpasswd -m sha-512 > password-file.txt
- passwordFile = localConfiguration.passwordFile;
+ extraUsers =
+ let
+ andrehUser = {
+ andreh = {
+ isNormalUser = true;
+ uid = 1000;
+ description = "EuAndreh";
+ extraGroups = [ "wheel" "networkmanager" "docker" ];
+ # Generated with:
+ # mkpasswd -m sha-512 > password-file.txt
+ passwordFile = localConfiguration.passwordFile;
+ };
+ };
+ # From the Guix manual:
+ # https://www.gnu.org/software/guix/manual/en/html_node/Build-Environment-Setup.html#Build-Environment-Setup
+ buildUser = (i:
+ {
+ "guixbuilder${i}" = { # guixbuilder$i
+ group = "guixbuild"; # -g guixbuild
+ extraGroups = ["guixbuild"]; # -G guixbuild
+ home = "/var/empty"; # -d /var/empty
+ shell = pkgs.nologin; # -s `which nologin`
+ description = "Guix build user ${i}"; # -c "Guix buid user $i"
+ isSystemUser = true; # --system
+ };
+ }
+ );
+ in
+ # merge all users
+ pkgs.lib.fold (str: acc: acc // buildUser str)
+ andrehUser
+ # for i in `seq -w 1 10`
+ (map (pkgs.lib.fixedWidthNumber 2) (builtins.genList (n: n+1) 10));
+
+ extraGroups.guixbuild = {
+ name = "guixbuild";
+ };
+ };
+
+ systemd = {
+ services = {
+ # Derived from Guix guix-daemon.service.in
+ # https://git.savannah.gnu.org/cgit/guix.git/tree/etc/guix-daemon.service.in?id=00c86a888488b16ce30634d3a3a9d871ed6734a2
+ guix-daemon = {
+ enable = false;
+ description = "Build daemon for GNU Guix";
+ serviceConfig = {
+ ExecStart = "/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon --build-users-group=guixbuild";
+ Environment="GUIX_LOCPATH=/root/.guix-profile/lib/locale";
+ RemainAfterExit="yes";
+ StandardOutput="syslog";
+ StandardError="syslog";
+ TaskMax= "8192";
+ };
+ wantedBy = [ "multi-user.target" ];
+ };
};
};
diff --git a/scripts/gc.sh b/scripts/gc.sh
index e094476..c93c948 100755
--- a/scripts/gc.sh
+++ b/scripts/gc.sh
@@ -21,6 +21,11 @@ nix-store --gc
nix-collect-garbage -d
+yellow "Cleaning up Guix store"
+
+guix gc
+
+
yellow "Cleaning up up the Trash and /tmp folders"
sudo rm -rf ~/.local/share/Trash/files/*
diff --git a/scripts/guix b/scripts/guix
new file mode 120000
index 0000000..96901ae
--- /dev/null
+++ b/scripts/guix
@@ -0,0 +1 @@
+/var/guix/profiles/per-user/root/guix-profile/bin/guix \ No newline at end of file
diff --git a/spacemacs.el b/spacemacs.el
index 2fd7d6a..6ff2ef8 100644
--- a/spacemacs.el
+++ b/spacemacs.el
@@ -761,6 +761,10 @@ This is the place where most of your configurations should be done. Unless it is
filename
commit
start)))
+
+ ;; (require 'geiser-guile)
+ ;; (with-eval-after-load 'geiser-guile
+ ;; (add-to-list 'geiser-guile-load-path "~/dev/guix/guix"))
t)
(defun dotspacemacs/emacs-custom-settings ()