loptland: add ssh key of phone, make sure that fish loads op in terminal only session, without bricking homemanager

This commit is contained in:
Christoph Hollizeck 2024-11-08 00:14:39 +01:00
parent ab915bd74d
commit c9c4bc17fa
Signed by: Daholli
GPG key ID: 1763BB530F50279E
2 changed files with 112 additions and 117 deletions

View file

@ -18,7 +18,7 @@ let
in in
{ {
options.${namespace}.apps.cli-apps.helix = { options.${namespace}.apps.cli-apps.helix = {
enable = mkEnableOption "Whether to enable nixvim or not"; enable = mkEnableOption "Whether to enable helix or not";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -30,124 +30,119 @@ in
}; };
${namespace} = { ${namespace} = {
home = { home.extraOptions = {
extraOptions = { programs.helix = {
programs.helix = { enable = true;
enable = true; package = helix-pkg;
package = helix-pkg; defaultEditor = true;
defaultEditor = true; settings = {
settings = { theme = "tokyonight";
theme = "tokyonight"; editor = {
editor = { auto-format = true;
auto-format = true; line-number = "relative";
line-number = "relative";
lsp = { lsp = {
display-inlay-hints = true; display-inlay-hints = true;
display-messages = true; display-messages = true;
};
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
indent-guides = {
render = true;
character = "|";
};
statusline = {
left = [
"mode"
"spinner"
];
center = [ "file-name" ];
right = [
"workspace-diagnostics"
"diagnostics"
"selections"
"position"
"total-line-numbers"
"spacer"
"file-encoding"
"file-line-ending"
"file-type"
];
separator = "";
};
}; };
keys = { cursor-shape = {
normal = { normal = "block";
esc = [ insert = "bar";
"collapse_selection" select = "underline";
"keep_primary_selection" };
];
space = {
space = "file_picker";
};
C-j = [ indent-guides = {
"move_line_down" render = true;
"move_line_down" character = "|";
"move_line_down" };
"move_line_down"
"move_line_down" statusline = {
]; left = [
C-k = [ "mode"
"move_line_up" "spinner"
"move_line_up" ];
"move_line_up" center = [ "file-name" ];
"move_line_up" right = [
"move_line_up" "workspace-diagnostics"
]; "diagnostics"
}; "selections"
"position"
"total-line-numbers"
"spacer"
"file-encoding"
"file-line-ending"
"file-type"
];
separator = "";
}; };
}; };
languages = { keys = {
language = [ normal = {
{ esc = [
name = "nix"; "collapse_selection"
auto-format = true; "keep_primary_selection"
formatter.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt"; ];
language-servers = [ space = {
"nixd" space = "file_picker";
"nil" };
];
}
{
# provided by the dev environment in the rust shell
name = "rust";
auto-format = true;
formatter.command = "cargo fmt";
language-servers = [ "rust-analyzer" ];
}
];
language-server = { C-j = [
nil = { "move_line_down"
command = "${pkgs.nil}/bin/nil"; "move_line_down"
}; "move_line_down"
nixd = { "move_line_down"
command = "${pkgs.nixd}/bin/nixd"; "move_line_down"
}; ];
marksman = { C-k = [
command = "${pkgs.marksman}/bin/marksman"; "move_line_up"
}; "move_line_up"
vscode-json-language-server = { "move_line_up"
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-json-language-server"; "move_line_up"
args = [ "--stdio" ]; "move_line_up"
config.provideFormatter = true; ];
config.json.validate.enable = true; };
}; };
vscode-css-language-server = { };
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server";
args = [ "--stdio" ]; languages = {
config.provideFormatter = true; language = [
}; {
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
language-servers = [
"nixd"
"nil"
];
}
{
# provided by the dev environment in the rust shell
name = "rust";
auto-format = true;
formatter.command = "cargo fmt";
language-servers = [ "rust-analyzer" ];
}
];
language-server = {
nixd = {
command = "${pkgs.nixd}/bin/nixd";
};
marksman = {
command = "${pkgs.marksman}/bin/marksman";
};
vscode-json-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-json-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
config.json.validate.enable = true;
};
vscode-css-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
}; };
}; };
}; };

View file

@ -108,14 +108,14 @@ in
user.trustedPublicKeys = [ user.trustedPublicKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHFrDiO5+vMfD5MimkzN32iw3MnSMLZ0mHvOrHVVmLD0" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHFrDiO5+vMfD5MimkzN32iw3MnSMLZ0mHvOrHVVmLD0"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII4Pr7p0jizrvIl0UhcvrmL5SHRQQQWIcHLAnRFyUZS6"
]; ];
};
home.extraOptions = { snowfallorg.users.${config.${namespace}.user.name}.home.config = {
programs.fish.shellInit = '' programs.fish.shellInit = ''
eval $(op signin) eval $(op signin)
''; '';
};
}; };
system.stateVersion = "24.11"; system.stateVersion = "24.11";