Compare commits

...

2 Commits

Author SHA1 Message Date
Nina Chloé Kassandra Reiß
408081c786 Add neovim configuration to seperate file 2026-02-27 21:44:14 +01:00
Nina Chloé Kassandra Reiß
b8ca6cf5c4 Generate ssh-key if none available 2026-02-27 21:25:08 +01:00
3 changed files with 59 additions and 11 deletions

View File

@@ -1,6 +1,8 @@
{ config, pkgs, lib, ... }:
let
profile = import ./profile.nix;
home-directory = "/home/${profile.username}";
ssh-filename = "${home-directory}/.ssh/id_ed25519";
in
{
@@ -37,4 +39,22 @@ in
};
};
};
systemd.services.generate-ssh-key = {
description = "Generate SSH key if missing";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Type = "oneshot";
User = user;
};
script = ''
if [ ! -f ${ssh-filename} ]; then
mkdir -p ${home-directory}/.ssh
chmod 700 ${home-directory}/.ssh
${pkgs.openssh}/bin/ssh-keygen -t ed25519 -N "" -f ${ssh-filename}
fi
'';
};
}

View File

@@ -4,22 +4,15 @@ let
in
{
environment.systemPackages = with pkgs; [
vim
neovim
astyle
python313Packages.pynvim
hyfetch
fzf
fzf-zsh
ripgrep
ripgrep-all
imports = [
./editor.nix
];
environment.variables = {
EDITOR = "nvim";
};
environment.systemPackages = with pkgs; [
astyle
hyfetch
fzf-zsh
];
programs.tmux = {
enable = true;

View File

@@ -0,0 +1,35 @@
{ config, pkgs, ... }:
let
dotfiles_nvim = pkgs.fetchgit {
url = "https://git.nichkara.eu/nichkara/nvim";
rev = "4b1aa4c6342a5c1df864247aca3e553d81cc82a9";
sha256 = "sha256-0ODOTolosRHVm0Uc2NRGBpUFM5W3C53ScaL9OQQviW0=";
};
profile = import ../profile.nix;
in
{
environment.systemPackages = with pkgs; [
vim
fzf
ripgrep
ripgrep-all
];
programs.neovim = {
enable = true;
defaultEditor = true;
withPython3 = true;
withRuby = true;
withNodeJs = true;
};
home-manager.users.${profile.username} = { ... }: {
home.file.".config/nvim" = {
source = dotfiles_nvim;
recursive = true;
};
};
}