Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions homes/x86_64-linux/daf@dafoltop/default.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
{ lib, config, ... }:

let
inherit (lib.dafos) enabled;
in
with lib.dafos;
{
dafos = {
user = {
enable = true;
name = config.snowfallorg.user.name;
};

apps = {
alacritty = enabled;
emacs = enabled;
};

cli-apps = {
fish = enabled;
zsh = enabled;
neovim = enabled;
helix = enabled;
home-manager = enabled;
lazygit = enabled;
neovim = enabled;
nushell = enabled;
starship = enabled;
zellij = enabled;
zoxide = enabled;
zsh = enabled;
};

tools = {
Expand Down
149 changes: 0 additions & 149 deletions modules/home/cli-apps/helix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,155 +26,6 @@ in
select = "underline";
};
};

keys.normal = {
c = "move_char_left";
t = "move_visual_line_down";
s = "move_visual_line_up";
r = "move_char_right";

T = "join_selections";

j = "find_till_char";
J = "till_prev_char";
"A-j" = "no_op";

h = "change_selection";
"A-h" = "change_selection_noyank";
H = "no_op";

l = "replace";
L = "replace_with_yanked";

"é" = "move_next_word_start";
"É" = "move_next_long_word_start";

"A-c" = "select_prev_sibling";
"A-r" = "select_next_sibling";

"A-t" = "copy_selection_on_next_line";
"A-s" = "copy_selection_on_prev_line";

k = "select_regex";
K = "split_selection";
"A-k" = "split_selection_on_newline";
"A-K" = "no_op";

w = "keep_selections";
W = "remove_selections";

"^" = "goto_line_start";
"!" = "goto_line_start";
g = {
"l" = "no_op";
"h" = "goto_window_center";
"c" = "goto_line_start";
"r" = "goto_line_end";
"D" = "goto_reference";
"t" = "goto_window_top";
"s" = "goto_window_bottom";
};

x = "extend_to_line_bounds";
X = "extend_line";

"»" = "indent";
"«" = "unindent";
};

keys.normal.space = {
space = "file_picker_in_current_directory";
q = "wclose";
Q = ":quit-all!";
R = "no_op";
L = "replace_selections_with_clipboard";
"." = "file_picker_in_current_directory";
F = "no_op";
":" = "file_picker";
"«" = "buffer_picker";
};

# buffers
keys.normal.space.b = {
"." = "buffer_picker";
"s" = ":write";
"S" = ":write-all";
"q" = ":write-quit";
"d" = ":buffer-close";
"D" = ":buffer-close-others";
"l" = "goto_last_accessed_file";
"n" = "goto_next_buffer";
"p" = "goto_previous_buffer";
};

# files
keys.normal.space.f = {
"." = "file_picker_in_current_directory";
f = "file_picker_in_current_directory";
":" = "file_picker";
c = ":config-open";
s = ":write";
};

keys.select = {
c = "extend_char_left";
t = "extend_visual_line_down";
s = "extend_visual_line_up";
r = "extend_char_right";

T = "join_selections";

j = "extend_till_char";
J = "extend_till_prev_char";
"A-j" = "no_op";

h = "change_selection";
"A-h" = "change_selection_noyank";
H = "no_op";

l = "replace";
L = "replace_with_yanked";

"é" = "extend_next_word_start";
"É" = "extend_next_long_word_start";

"A-c" = "select_prev_sibling";
"A-r" = "select_next_sibling";

"A-t" = "copy_selection_on_next_line";
"A-s" = "copy_selection_on_prev_line";

k = "select_regex";
K = "split_selection";
"A-k" = "split_selection_on_newline";
"A-K" = "no_op";

w = "keep_selections";
W = "remove_selections";

g = {
"l" = "no_op";
"h" = "no_op";
"c" = "goto_line_start";
"r" = "goto_line_end";
};

x = "extend_to_line_bounds";
X = "extend_line";

"»" = "indent";
"«" = "unindent";
};

keys.insert = {
"A-ret" = "open_below";
};

keys.insert."à" = {
t = "normal_mode";
s = [":write"];
q = [":write-quit"];
};
};
};
};
Expand Down
1 change: 1 addition & 0 deletions modules/nixos/tools/misc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ in
dafos.home.configFile."wgetrc".text = "";

environment.systemPackages = with pkgs; [
dafos.dafos-cli
duf
fd
file
Expand Down
16 changes: 16 additions & 0 deletions packages/dafos-cli/dafos-cli.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env nu

# A wraper to help managing dafos' systems.
def main [...args] {
# TODO: print usage
}

def "main build" [...args] {
echo 'running: nh os build --nom .'
nh os build --nom .
}

def "main switch" [...args] {
echo 'running: nh os switch --nom .'
nh os switch --nom .
}
6 changes: 6 additions & 0 deletions packages/dafos-cli/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ nuenv, ... }:

nuenv.writeScriptBin {
name = "dafos";
script = ./dafos-cli.nu;
}