summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-07-03 22:40:14 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-07-03 22:40:43 +0200
commita7465538b064358e5e11674ddc8ba8e6531e5f3a (patch)
treebf1aea5cd66a36d9cec4883e1865f5a62eb4973b /custom
parent361318fe8f743071ccc1949d0ab51d576f5b9b6c (diff)
downloadnixos-a7465538b064358e5e11674ddc8ba8e6531e5f3a.tar
nixos-a7465538b064358e5e11674ddc8ba8e6531e5f3a.tar.gz
nixos-a7465538b064358e5e11674ddc8ba8e6531e5f3a.tar.bz2
nixos-a7465538b064358e5e11674ddc8ba8e6531e5f3a.tar.xz
nixos-a7465538b064358e5e11674ddc8ba8e6531e5f3a.zip
cooler dotfiles
Diffstat (limited to 'custom')
-rw-r--r--custom/dotfiles.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/custom/dotfiles.nix b/custom/dotfiles.nix
index 3c438e27..08952c39 100644
--- a/custom/dotfiles.nix
+++ b/custom/dotfiles.nix
@@ -1,6 +1,7 @@
1{ fetchgit 1{ fetchgit
2, lib 2, lib
3, findutils 3, findutils
4, coreutils
4}: 5}:
5 6
6let 7let
@@ -11,11 +12,12 @@ let
11 sha256 = "62a16cb79b0491b49fcfb3c03904cf8f83bf03aeeb1bff285a66bb15efd3a4e1"; 12 sha256 = "62a16cb79b0491b49fcfb3c03904cf8f83bf03aeeb1bff285a66bb15efd3a4e1";
12 }); 13 });
13 setupUser = name : { 14 setupUser = name : {
14 inherit name; 15 name = name.dir;
15 value = '' 16 value = ''
16 cd ${dotfiles} 17 cd ${dotfiles}
17 ${findutils}/bin/find . -type d -print0 | ${findutils}/bin/xargs -0 -I '{}' -- mkdir -p "${name}/{}" 18 ${findutils}/bin/find . -type d -print0 | ${findutils}/bin/xargs -0 -I '{}' -- ${coreutils}/install -o ${name.owner} -g ${name.group} -d "${name.dir}/{}"
18 ${findutils}/bin/find . -type f -print0 | ${findutils}/bin/xargs -0 -I '{}' -- ln -s -f "${dotfiles}/{}" "${name}/{}" 19 ${findutils}/bin/find . -type f -print0 | ${findutils}/bin/xargs -0 -I '{}' -- ln -s -f "${dotfiles}/{}" "${name.dir}/{}"
20 ${findutils}/bin/find . -type f -print0 | ${findutils}/bin/xargs -0 -I '{}' -- chown "${name.owner}:${name.group}" "${name.dir}/{}"
19 ''; 21 '';
20 }; 22 };
21in 23in