Minor fixes
This commit is contained in:
parent
3935998865
commit
31b1ea3763
|
@ -27,14 +27,14 @@ in {
|
||||||
bins = [ activateMode pkgs.git ];
|
bins = [ activateMode pkgs.git ];
|
||||||
} ''
|
} ''
|
||||||
params = ["${configPath}/home-manager/target.nix", "-A", "apollo", "-o", "/home/maralorn/.modes"]
|
params = ["${configPath}/home-manager/target.nix", "-A", "apollo", "-o", "/home/maralorn/.modes"]
|
||||||
|
privatePath = "${configPath}/private"
|
||||||
|
canaryPath = privatePath <> "/submodule-is-checked-out"
|
||||||
|
|
||||||
main = do
|
main = do
|
||||||
say "Building ~/.modes for apollo"
|
say "Building ~/.modes for apollo"
|
||||||
nixPath <- myNixPath "${configPath}"
|
nixPath <- myNixPath "${configPath}"
|
||||||
privateDeinit :: Either SomeException () <- try $ git "submodule" "deinit" "${configPath}"
|
bracket (rm canaryPath) (\() -> git "-C" privatePath "restore" canaryPath) $ \() ->
|
||||||
when (isRight privateDeinit) $ do
|
nix_build nixPath (params ++ remoteBuildParams)
|
||||||
nix_build nixPath (params ++ remoteBuildParams)
|
|
||||||
git "submodule" "update" "--init" "${configPath}"
|
|
||||||
nix_build nixPath params
|
nix_build nixPath params
|
||||||
activate_mode
|
activate_mode
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
name = "Malte Brandy";
|
name = "Malte Brandy";
|
||||||
mail = "malte.brandy@maralorn.de";
|
mail = "malte.brandy@maralorn.de";
|
||||||
alternates = pkgs.privateValue [] "mail/alternates";
|
alternates = pkgs.privateValue [] "mail/alternates";
|
||||||
lists = pkgs.privateValue { sortList = []; stupidLists = []; notifications = []; } "mail/filters";
|
lists = pkgs.privateValue { sortLists = []; stupidLists = []; notifications = []; } "mail/filters";
|
||||||
maildir = config.accounts.email.maildirBasePath;
|
maildir = config.accounts.email.maildirBasePath;
|
||||||
# mhdr -h List-ID -d Maildir/hera/Archiv/unsortiert | sort | sed 's/^.*<\(.*\)>$/\1/' | uniq | xargs -I '{}' sh -c "notmuch count List:{} | sed 's/$/: {}/'" | sort
|
# mhdr -h List-ID -d Maildir/hera/Archiv/unsortiert | sort | sed 's/^.*<\(.*\)>$/\1/' | uniq | xargs -I '{}' sh -c "notmuch count List:{} | sed 's/$/: {}/'" | sort
|
||||||
# To find candidates
|
# To find candidates
|
||||||
|
@ -86,7 +86,7 @@ let
|
||||||
|
|
||||||
main = do
|
main = do
|
||||||
setEnv "MBLAZE_PAGER" "cat"
|
setEnv "MBLAZE_PAGER" "cat"
|
||||||
setEnv "NOTMUCH_CONFIG" "${config.home.sessionVariables.NOTMUCH_CONFIG}"
|
setEnv "NOTMUCH_CONFIG" "${config.home.sessionVariables.NOTMUCH_CONFIG or ""}"
|
||||||
reScan
|
reScan
|
||||||
(listIDs,tos) <- concurrently (mhdr "-h" "List-ID" "-d" "${unsorted}" |> capture) (mhdr "-h" "To" "-d" "${unsorted}" "-A" |> capture)
|
(listIDs,tos) <- concurrently (mhdr "-h" "List-ID" "-d" "${unsorted}" |> capture) (mhdr "-h" "To" "-d" "${unsorted}" "-A" |> capture)
|
||||||
let listFilters = mapMaybe filtersFromListIDs . sortNub . mapMaybe (parseMaybe listId) . lines . decodeUtf8 $ listIDs
|
let listFilters = mapMaybe filtersFromListIDs . sortNub . mapMaybe (parseMaybe listId) . lines . decodeUtf8 $ listIDs
|
||||||
|
@ -165,7 +165,7 @@ in {
|
||||||
programs.msmtp.enable = true;
|
programs.msmtp.enable = true;
|
||||||
programs.mbsync.enable = true;
|
programs.mbsync.enable = true;
|
||||||
programs.notmuch = {
|
programs.notmuch = {
|
||||||
enable = true;
|
enable = config.accounts.email.accounts != {};
|
||||||
hooks.postInsert = ''
|
hooks.postInsert = ''
|
||||||
${pkgs.notmuch}/bin/notmuch tag +deleted -- "folder:/Trash/ (not tag:deleted)"
|
${pkgs.notmuch}/bin/notmuch tag +deleted -- "folder:/Trash/ (not tag:deleted)"
|
||||||
${pkgs.notmuch}/bin/notmuch tag -deleted -- "(not folder:/Trash/) tag:deleted"
|
${pkgs.notmuch}/bin/notmuch tag -deleted -- "(not folder:/Trash/) tag:deleted"
|
||||||
|
|
|
@ -5,13 +5,14 @@ in {
|
||||||
name = "update-system";
|
name = "update-system";
|
||||||
bins = [ nixos-rebuild pkgs.git ];
|
bins = [ nixos-rebuild pkgs.git ];
|
||||||
} ''
|
} ''
|
||||||
|
privatePath = "${configPath}/private"
|
||||||
|
canaryPath = privatePath <> "/submodule-is-checked-out"
|
||||||
|
|
||||||
main = do
|
main = do
|
||||||
paths <- myNixPath "${configPath}"
|
paths <- myNixPath "${configPath}"
|
||||||
args <- getArgs
|
args <- getArgs
|
||||||
privateDeinit :: Either SomeException () <- try $ git "-C" "${configPath}" "submodule" "deinit" "private"
|
bracket (rm canaryPath) (\() -> git "-C" privatePath "restore" canaryPath) $ \() ->
|
||||||
when (isRight privateDeinit) $ do
|
|
||||||
nixos_rebuild (paths ++ ["build"] ++ remoteBuildParams ++ fmap toString args)
|
nixos_rebuild (paths ++ ["build"] ++ remoteBuildParams ++ fmap toString args)
|
||||||
git "-C" "${configPath}" "submodule" "update" "--init" "private"
|
|
||||||
nixos_rebuild (paths ++ ["switch"] ++ fmap toString args)
|
nixos_rebuild (paths ++ ["switch"] ++ fmap toString args)
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
2
private
2
private
|
@ -1 +1 @@
|
||||||
Subproject commit 5c213f10c5db7e8f11a36d660902ac7183ce177f
|
Subproject commit 846e2f77048ed9d79269af80cff3c0999e73433d
|
Loading…
Reference in a new issue