From a6cc17df6ad7fa1f9fac908bb206e95f82195623 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 17 Jun 2018 03:16:49 -0700 Subject: [PATCH 1/2] [NixOS] Reorder applications --- nixos/configuration.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index c2a968e8..f3daea08 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -72,16 +72,18 @@ in environment.systemPackages = with pkgs; [ # Applications - google-chrome + emacs firefox + google-chrome hexchat + keybase-gui kodi + rxvt_unicode + spotify + steam + termite vlc xfce.thunar - spotify - termite - rxvt_unicode - emacs # Appearance numix-icon-theme-circle @@ -158,6 +160,7 @@ in # Enable the OpenSSH daemon. services.openssh.enable = true; + services.kbfs.enable = true; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; @@ -172,8 +175,6 @@ in sound.enable = true; hardware.pulseaudio.enable = true; - environment.loginShellInit = ". ~/.lib/nix_login.sh"; - services.xserver = { exportConfiguration = true; enable = true; From bee2b9e178a5e083f837b1649dc2f1746c693f65 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 17 Jun 2018 03:17:51 -0700 Subject: [PATCH 2/2] [Linux] Automatically clone git-synced directories --- tasks/shell/enable_user_units.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tasks/shell/enable_user_units.sh b/tasks/shell/enable_user_units.sh index 8c0fd8d4..d46e6504 100755 --- a/tasks/shell/enable_user_units.sh +++ b/tasks/shell/enable_user_units.sh @@ -1,15 +1,20 @@ #!/usr/bin/env sh enable_git_sync () { + [ -e "$1" ] || git clone $2 $1 unit_name=$(systemd-escape -p "$1" --template git-sync@.service) echo $unit_name + cd $1 + git config --bool branch.master.sync true + git config --bool branch.master.syncNewFiles true + git branch --set-upstream-to=origin/master systemctl --user enable "$unit_name" + systemctl --user restart "$unit_name" } - cd "$HOME/.config/systemd/user/" find * -type f | grep -v git-sync | grep -E "\.service$" | xargs -I unitname sh -c 'echo unitname && systemctl --user enable unitname' -enable_git_sync "$HOME/org" -enable_git_sync "$HOME/config" -enable_git_sync "$HOME/.password-store" +enable_git_sync "$HOME/org" git@bitbucket.org:ivanmalison/org.git +enable_git_sync "$HOME/config" git@bitbucket.org:ivanmalison/config.git +enable_git_sync "$HOME/.password-store" git@bitbucket.org:ivanmalison/pass.git