Skip to content

Instantly share code, notes, and snippets.

View Janik-Haag's full-sized avatar
🇪🇺
public money public code

Janik Janik-Haag

🇪🇺
public money public code
View GitHub Profile
{ pkgs
, ...
}:
{
environment.systemPackages = [
(pkgs.fuzzel.overrideAttrs (o: {
patches = (o.patches or [ ]) ++ [
./0001-vim-like-keybinds.patch
];
}))
@Janik-Haag
Janik-Haag / sh.vim
Created January 1, 2024 05:56
this makes <leader>sh append the stdout of a command to your cursosrs position in normal mode and replaces your selection in visual mode.
function GetShellInput()
call inputsave()
let in = system(input('sh: ')) | return (substitute(in, '\n$', ''', '''))
call inputrestore()
endfunction
nnoremap <leader>sh :exec 'normal a' . call("GetShellInput",[])<CR>
vnoremap <leader>sh c<C-R>=call("GetShellInput",[])<CR><ESC>
"Nixpkgs-Package Search" = {
urls = [{ template = "https://search.nixos.org/packages?channel=unstable&size=250&sort=relevance&type=packages&query={searchTerms}"; }];
iconUpdateURL = "https://nixos.org/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nps" ];
};
"Nixpkgs-Modules Search" = {
urls = [{ template = "https://search.nixos.org/options?channel=unstable&size=200&sort=relevance&query={searchTerms}"; }];
iconUpdateURL = "https://nixos.org/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
@Janik-Haag
Janik-Haag / backups.nix
Created September 22, 2023 06:59
A NixOS restic configuration for automatic backups across multiple devices without extra configuration
{ inputs, config, ... }:
{
sops.secrets = let sopsFile = "${inputs.self}/secrets/shared.yaml"; in {
"backup/ssh-key" = {
sopsFile = sopsFile;
};
"backup/password" = {
sopsFile = sopsFile;
};
};
@Janik-Haag
Janik-Haag / newsboat.nix
Created July 25, 2023 20:09
My newsboat home-manager config
{ config, ... }:
{
sops.secrets."miniflux" = {
mode = "0400";
path = "$XDG_RUNTIME_DIR/secrets/miniflux";
};
programs.newsboat = {
enable = true;
autoReload = true;
extraConfig = ''
{ config, pkgs, ... }:
{
services.udev.packages = with pkgs; [
yubikey-personalization
];
environment.systemPackages = with pkgs; [
libfido2
pam_u2f
];