Compare commits

...

3 Commits

4 changed files with 45 additions and 0 deletions

View File

@ -262,6 +262,14 @@ in
runtimeInputs = with pkgs; [ cfg.package coreutils ]; runtimeInputs = with pkgs; [ cfg.package coreutils ];
text = lib.fileContents ./scripts/git-tcommit.sh; text = lib.fileContents ./scripts/git-tcommit.sh;
}) })
(pkgs.writeShellApplication {
name = "git-tmcommit";
runtimeInputs = with pkgs; [ cfg.package coreutils ];
text = lib.pipe ./scripts/git-tcommit.sh [
lib.fileContents
(builtins.replaceStrings ["hours" "tcommit"] ["minutes" "tmcommit"])
];
})
(pkgs.writeShellApplication { (pkgs.writeShellApplication {
name = "git-switch-interactive"; name = "git-switch-interactive";
runtimeInputs = with pkgs; [ cfg.package fzf gnused coreutils ]; runtimeInputs = with pkgs; [ cfg.package fzf gnused coreutils ];

View File

@ -1,5 +1,10 @@
set -euo pipefail set -euo pipefail
if [[ $# -lt 1 ]]; then
echo "Usage: git tcommit [-]<hours>"
exit 1
fi
HOUR_SHIFT="$1" HOUR_SHIFT="$1"
shift shift

View File

@ -11,12 +11,16 @@
./services/tailscale.nix ./services/tailscale.nix
./services/keybase.nix ./services/keybase.nix
./nspawn-containers/arch.nix
];
system.stateVersion = "22.05"; system.stateVersion = "22.05";
boot.binfmt.emulatedSystems = [ boot.binfmt.emulatedSystems = [
"x86_64-windows" "x86_64-windows"
"aarch64-linux" "aarch64-linux"
"armv7l-linux" "armv7l-linux"
"i686-linux"
]; ];
nix.settings.system-features = [ nix.settings.system-features = [

View File

@ -0,0 +1,28 @@
{ ... }:
{
systemd.targets.machines.enable = true;
systemd.nspawn."arch" = {
enable = true;
execConfig.Boot = true;
filesConfig = {
BindReadOnly = [
"/nix/store"
# "/etc/resolv.conf:/etc/resolv.conf"
];
Bind = [
"/home/h7x4/git"
"/home/h7x4/pico"
"/home/h7x4/Downloads"
];
};
networkConfig.Private = false;
};
systemd.services."systemd-nspawn@arch" = {
enable = true;
requiredBy = [ "machines.target" ];
overrideStrategy = "asDropin";
};
}