Compare commits

...

4 Commits

Author SHA1 Message Date
Noah Masur
c8441fc265
enable daemon mode and sync v2 for atuin 2025-05-14 15:05:05 -04:00
Noah Masur
23f46e51e6
zellij to trigger nix rebuild of hm and nixos or darwin 2025-05-14 15:04:49 -04:00
Noah Masur
f2e09c9adc
zellij function to do a gh run watch 2025-05-13 15:46:13 -04:00
Noah Masur
f0add607e6
replace substituteAll function with replaceVars
substituteAll has been deprecated
2025-05-13 15:46:13 -04:00
13 changed files with 89 additions and 11 deletions

View File

@ -21,6 +21,7 @@ rec {
nmasur.settings = {
username = nmasur.settings.username;
fullName = nmasur.settings.fullName;
host = "lookingglass";
};
nmasur.profiles = {
common.enable = true;

View File

@ -23,6 +23,7 @@ rec {
nmasur.settings = {
username = nmasur.settings.username;
fullName = nmasur.settings.fullName;
host = networking.hostName;
};
nmasur.profiles = {
common.enable = true;

View File

@ -19,6 +19,7 @@ rec {
nmasur.settings = {
username = nmasur.settings.username;
fullName = nmasur.settings.fullName;
host = networking.hostName;
};
nmasur.profiles = {
common.enable = true;

View File

@ -19,6 +19,7 @@ rec {
nmasur.settings = {
username = nmasur.settings.username;
fullName = nmasur.settings.fullName;
host = networking.hostName;
};
nmasur.profiles = {
common.enable = true;

View File

@ -23,6 +23,7 @@ rec {
nmasur.settings = {
username = nmasur.settings.username;
fullName = nmasur.settings.fullName;
host = networking.hostName;
};
nmasur.profiles = {
common.enable = true;

View File

@ -21,6 +21,7 @@ rec {
nmasur.settings = {
username = nmasur.settings.username;
fullName = nmasur.settings.fullName;
host = networking.hostName;
};
nmasur.profiles = {
common.enable = true;

View File

@ -23,6 +23,7 @@ rec {
nmasur.settings = {
username = nmasur.settings.username;
fullName = nmasur.settings.fullName;
host = networking.hostName;
};
nmasur.profiles = {
common.enable = true;

View File

@ -15,6 +15,7 @@ in
config = lib.mkIf cfg.enable {
programs.atuin = {
enable = true;
daemon.enable = true;
flags = [
"--disable-up-arrow"
"--disable-ctrl-r"
@ -33,6 +34,7 @@ in
secrets_filter = true;
enter_accept = false;
keymap_mode = "vim-normal";
records = true; # Sync v2
};
};

View File

@ -21,6 +21,12 @@ in
config = lib.mkIf (cfg.enable) {
# These are useful for triggering from zellij (rather than running directly in the shell)
nmasur.presets.programs.nixpkgs.commands.rebuildNixos = pkgs.writeShellScriptBin "rebuild-darwin" ''
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
darwin-rebuild switch --flake "${config.nmasur.presets.programs.dotfiles.path}#${config.nmasur.settings.host}"
'';
programs.fish = {
shellAbbrs = lib.mkIf config.nmasur.presets.programs.dotfiles.enable {
nr = {

View File

@ -11,10 +11,34 @@ in
{
options.nmasur.presets.programs.nixpkgs.enable = lib.mkEnableOption "Nixpkgs presets";
options.nmasur.presets.programs.nixpkgs = {
enable = lib.mkEnableOption "Nixpkgs presets";
commands = {
# These are useful for triggering from zellij (rather than running directly in the shell)
rebuildHome = lib.mkOption {
type = lib.types.package;
default = pkgs.writeShellScriptBin "rebuild-home" ''
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
${lib.getExe pkgs.home-manager} switch --flake "${config.nmasur.presets.programs.dotfiles.path}#${config.nmasur.settings.host}"
'';
};
rebuildNixos = lib.mkOption {
type = lib.types.package;
default = pkgs.writeShellScriptBin "rebuild-nixos" ''
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path}
'';
};
};
};
config = lib.mkIf cfg.enable {
home.packages = [
cfg.commands.rebuildHome
cfg.commands.rebuildNixos
];
programs.fish = {
shellAbbrs = {
n = "nix";

View File

@ -34,6 +34,12 @@ in
zellij pipe --plugin file:$(which zellij-switch.wasm) -- "--cwd $TARGET_DIR --layout default --session $(basename $TARGET_DIR)"
'';
};
gh-run = {
body = # fish
''
zellij action new-pane --start-suspended -- gh run watch
'';
};
};
};
@ -115,6 +121,34 @@ in
close_on_exit = true;
};
};
"bind \"Alt Shift h\"" = {
Run = {
_args = [
(lib.getExe config.nmasur.presets.programs.nixpkgs.commands.rebuildHome)
];
# close_on_exit = false;
};
};
"bind \"Alt Shift r\"" = {
Run = {
_args = [
(lib.getExe config.nmasur.presets.programs.nixpkgs.commands.rebuildNixos)
];
# close_on_exit = false;
};
};
"bind \"Alt Shift w\"" = {
Run = {
_args = [
(lib.getExe pkgs.gh)
"run"
"watch"
];
# direction = "Right";
# close_on_exit = false;
# start_suspended = true;
};
};
"bind \"Super Shift ]\"" = {
GoToNextTab = { };
};

View File

@ -18,8 +18,9 @@ in
xdg.configFile."hammerspoon/init.lua".source = ./init.lua;
xdg.configFile."hammerspoon/Spoons/ControlEscape.spoon".source = ./Spoons/ControlEscape.spoon;
xdg.configFile."hammerspoon/Spoons/DismissAlerts.spoon".source = ./Spoons/DismissAlerts.spoon;
xdg.configFile."hammerspoon/Spoons/Launcher.spoon/init.lua".source = pkgs.substituteAll {
src = ./Spoons/Launcher.spoon/init.lua;
xdg.configFile."hammerspoon/Spoons/Launcher.spoon/init.lua".source =
pkgs.replaceVars ./Spoons/Launcher.spoon/init.lua
{
discord = "${pkgs.discord}/Applications/Discord.app";
firefox = "${pkgs.firefox-unwrapped}/Applications/Firefox.app";
ghostty = "${config.programs.ghostty.package}/Applications/Ghostty.app";

View File

@ -10,6 +10,10 @@
type = lib.types.str;
description = "Human readable name of the user";
};
host = lib.mkOption {
type = lib.types.str;
description = "Name of the host of this deployment";
};
hostnames = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
description = "Map of service names to FQDNs";