style: reformat with nixfmt-rfc-style
This commit is contained in:
parent
5ad8bc1d56
commit
1c5d83d81e
99 changed files with 2247 additions and 1334 deletions
home
ausweisapp.nix
browsers
desktop
editors
element.nixfelschr-server.nixfelschr-work.nixfelschr.nixgaming
git.nixmodules
planck.nixservices
shell
signal.nix
|
@ -1,5 +1,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
with pkgs; {
|
||||
with pkgs;
|
||||
{
|
||||
home.packages = [ AusweisApp2 ];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./mullvad-browser.nix ./tor-browser.nix ./firefox.nix ];
|
||||
imports = [
|
||||
./mullvad-browser.nix
|
||||
./tor-browser.nix
|
||||
./firefox.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [ chromium ];
|
||||
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
{ inputs, config, pkgs, lib, ... }:
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
firefox-addons = inputs.firefox-addons.packages.${pkgs.system};
|
||||
|
||||
inherit (import ../modules/firefox/common.nix { inherit config lib pkgs; })
|
||||
mkConfig;
|
||||
inherit (import ../modules/firefox/common.nix { inherit config lib pkgs; }) mkConfig;
|
||||
|
||||
arkenfoxConfig = builtins.readFile "${inputs.arkenfox-userjs}/user.js";
|
||||
|
||||
|
@ -52,7 +57,8 @@ let
|
|||
libredirect
|
||||
zotero-connector
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
|
@ -64,45 +70,59 @@ in {
|
|||
work = {
|
||||
id = 1;
|
||||
extraConfig = sharedExtraConfig;
|
||||
extensions = commonExtensions
|
||||
++ (with firefox-addons; [ bitwarden react-devtools reduxdevtools ]);
|
||||
extensions =
|
||||
commonExtensions
|
||||
++ (with firefox-addons; [
|
||||
bitwarden
|
||||
react-devtools
|
||||
reduxdevtools
|
||||
]);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = let
|
||||
makeFirefoxProfileBin = args@{ profile, ... }:
|
||||
let
|
||||
name = "firefox-${profile}";
|
||||
scriptBin = pkgs.writeScriptBin name ''
|
||||
firefox -P "${profile}" --name="${name}" $@
|
||||
home.packages =
|
||||
let
|
||||
makeFirefoxProfileBin =
|
||||
args@{ profile, ... }:
|
||||
let
|
||||
name = "firefox-${profile}";
|
||||
scriptBin = pkgs.writeScriptBin name ''
|
||||
firefox -P "${profile}" --name="${name}" $@
|
||||
'';
|
||||
desktopFile = pkgs.makeDesktopItem (
|
||||
(removeAttrs args [ "profile" ])
|
||||
// {
|
||||
inherit name;
|
||||
exec = "${scriptBin}/bin/${name} %U";
|
||||
extraConfig.StartupWMClass = name;
|
||||
genericName = "Web Browser";
|
||||
mimeTypes = [
|
||||
"text/html"
|
||||
"text/xml"
|
||||
"application/xhtml+xml"
|
||||
"application/vnd.mozilla.xul+xml"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
];
|
||||
categories = [
|
||||
"Network"
|
||||
"WebBrowser"
|
||||
];
|
||||
}
|
||||
);
|
||||
in
|
||||
pkgs.runCommand name { } ''
|
||||
mkdir -p $out/{bin,share}
|
||||
cp -r ${scriptBin}/bin/${name} $out/bin/${name}
|
||||
cp -r ${desktopFile}/share/applications $out/share/applications
|
||||
'';
|
||||
desktopFile = pkgs.makeDesktopItem ((removeAttrs args [ "profile" ])
|
||||
// {
|
||||
inherit name;
|
||||
exec = "${scriptBin}/bin/${name} %U";
|
||||
extraConfig.StartupWMClass = name;
|
||||
genericName = "Web Browser";
|
||||
mimeTypes = [
|
||||
"text/html"
|
||||
"text/xml"
|
||||
"application/xhtml+xml"
|
||||
"application/vnd.mozilla.xul+xml"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
];
|
||||
categories = [ "Network" "WebBrowser" ];
|
||||
});
|
||||
in pkgs.runCommand name { } ''
|
||||
mkdir -p $out/{bin,share}
|
||||
cp -r ${scriptBin}/bin/${name} $out/bin/${name}
|
||||
cp -r ${desktopFile}/share/applications $out/share/applications
|
||||
'';
|
||||
in [
|
||||
(makeFirefoxProfileBin {
|
||||
profile = "work";
|
||||
desktopName = "Firefox (Work)";
|
||||
icon = "firefox";
|
||||
})
|
||||
];
|
||||
in
|
||||
[
|
||||
(makeFirefoxProfileBin {
|
||||
profile = "work";
|
||||
desktopName = "Firefox (Work)";
|
||||
icon = "firefox";
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ inputs, pkgs, lib, ... }:
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
firefox-addons = inputs.firefox-addons.packages.${pkgs.system};
|
||||
|
@ -42,7 +47,8 @@ let
|
|||
libredirect
|
||||
zotero-connector
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [ ../modules/firefox/mullvad-browser.nix ];
|
||||
|
||||
programs.mullvad-browser = {
|
||||
|
@ -57,8 +63,13 @@ in {
|
|||
work = {
|
||||
id = 1;
|
||||
settings = commonSettings;
|
||||
extensions = commonExtensions
|
||||
++ (with firefox-addons; [ bitwarden react-devtools reduxdevtools ]);
|
||||
extensions =
|
||||
commonExtensions
|
||||
++ (with firefox-addons; [
|
||||
bitwarden
|
||||
react-devtools
|
||||
reduxdevtools
|
||||
]);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./gtk.nix ./gnome.nix ./mimeapps.nix ];
|
||||
imports = [
|
||||
./gtk.nix
|
||||
./gnome.nix
|
||||
./mimeapps.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -5,7 +5,8 @@ let
|
|||
down = "j";
|
||||
up = "k";
|
||||
right = "l";
|
||||
in {
|
||||
in
|
||||
{
|
||||
dconf.settings = with lib.hm.gvariant; {
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
|
@ -30,15 +31,31 @@ in {
|
|||
show-title = false;
|
||||
active-hint = false;
|
||||
};
|
||||
"org/gnome/desktop/interface" = { color-scheme = "prefer-dark"; };
|
||||
"org/gnome/desktop/sound" = { theme-name = "freedesktop"; };
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
"org/gnome/desktop/sound" = {
|
||||
theme-name = "freedesktop";
|
||||
};
|
||||
"org/gnome/desktop/input-sources" = {
|
||||
sources = map mkTuple [ [ "xkb" "gb" ] [ "ibus" "mozc-jp" ] ];
|
||||
sources = map mkTuple [
|
||||
[
|
||||
"xkb"
|
||||
"gb"
|
||||
]
|
||||
[
|
||||
"ibus"
|
||||
"mozc-jp"
|
||||
]
|
||||
];
|
||||
xkb-options = [ "compose:ralt" ];
|
||||
};
|
||||
|
||||
"org/gnome/desktop/app-folders" = {
|
||||
folder-children = [ "Office" "Utilities" ];
|
||||
folder-children = [
|
||||
"Office"
|
||||
"Utilities"
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/app-folders/folders/Office" = {
|
||||
name = "Office";
|
||||
|
@ -48,11 +65,17 @@ in {
|
|||
"org/gnome/desktop/app-folders/folders/Utilities" = {
|
||||
name = "Utilities";
|
||||
translate = true;
|
||||
categories = [ "Utility" "X-GNOME-Utilities" "System" ];
|
||||
categories = [
|
||||
"Utility"
|
||||
"X-GNOME-Utilities"
|
||||
"System"
|
||||
];
|
||||
};
|
||||
|
||||
# key bindings for pop-shell
|
||||
"org/gnome/mutter/wayland/keybindings" = { restore-shortcuts = [ ]; };
|
||||
"org/gnome/mutter/wayland/keybindings" = {
|
||||
restore-shortcuts = [ ];
|
||||
};
|
||||
"org/gnome/shell/keybindings" = {
|
||||
open-application-menu = [ ];
|
||||
toggle-message-tray = [ "<Super>v" ];
|
||||
|
@ -67,16 +90,25 @@ in {
|
|||
toggle-fullscreen = [ "<Super>f" ];
|
||||
toggle-on-all-workspaces = [ "<Super>p" ];
|
||||
|
||||
switch-to-workspace-left =
|
||||
[ "<Primary><Super>Left" "<Primary><Super>${left}" ];
|
||||
switch-to-workspace-right =
|
||||
[ "<Primary><Super>Right" "<Primary><Super>${right}" ];
|
||||
switch-to-workspace-left = [
|
||||
"<Primary><Super>Left"
|
||||
"<Primary><Super>${left}"
|
||||
];
|
||||
switch-to-workspace-right = [
|
||||
"<Primary><Super>Right"
|
||||
"<Primary><Super>${right}"
|
||||
];
|
||||
switch-to-workspace-down = [ ];
|
||||
switch-to-workspace-up = [ ];
|
||||
|
||||
move-to-workspace-left = [ "<Shift><Super>Left" "<Shift><Super>${left}" ];
|
||||
move-to-workspace-right =
|
||||
[ "<Shift><Super>Right" "<Shift><Super>${right}" ];
|
||||
move-to-workspace-left = [
|
||||
"<Shift><Super>Left"
|
||||
"<Shift><Super>${left}"
|
||||
];
|
||||
move-to-workspace-right = [
|
||||
"<Shift><Super>Right"
|
||||
"<Shift><Super>${right}"
|
||||
];
|
||||
move-to-workspace-down = [ ];
|
||||
move-to-workspace-up = [ ];
|
||||
|
||||
|
@ -91,7 +123,10 @@ in {
|
|||
};
|
||||
"org/gnome/settings-daemon/plugins/color" = {
|
||||
night-light-enabled = true;
|
||||
night-light-last-coordinates = mkTuple [ 53.2593 10.4 ];
|
||||
night-light-last-coordinates = mkTuple [
|
||||
53.2593
|
||||
10.4
|
||||
];
|
||||
night-light-temperature = mkUint32 3700;
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
|
|
|
@ -15,7 +15,10 @@ let
|
|||
image = [ "org.gnome.Loupe.desktop" ];
|
||||
audio = [ "io.github.celluloid_player.Celluloid.desktop" ];
|
||||
video = [ "io.github.celluloid_player.Celluloid.desktop" ];
|
||||
directory = [ "nautilus.desktop" "org.gnome.Nautilus.desktop" ];
|
||||
directory = [
|
||||
"nautilus.desktop"
|
||||
"org.gnome.Nautilus.desktop"
|
||||
];
|
||||
mail = [ "re.sonny.Junction.desktop" ] ++ browsers;
|
||||
calendar = [ "re.sonny.Junction.desktop" ] ++ browsers;
|
||||
browser = [ "re.sonny.Junction.desktop" ] ++ browsers;
|
||||
|
@ -60,7 +63,10 @@ let
|
|||
];
|
||||
directory = [ "inode/directory" ];
|
||||
mail = [ "x-scheme-handler/mailto" ];
|
||||
calendar = [ "text/calendar" "x-scheme-handler/webcal" ];
|
||||
calendar = [
|
||||
"text/calendar"
|
||||
"x-scheme-handler/webcal"
|
||||
];
|
||||
browser = [
|
||||
"text/html"
|
||||
"x-scheme-handler/about"
|
||||
|
@ -86,26 +92,30 @@ let
|
|||
signal = [ "signal-desktop.desktop" ];
|
||||
};
|
||||
|
||||
associations = with lists;
|
||||
listToAttrs (flatten (mapAttrsToList
|
||||
(key: map (type: attrsets.nameValuePair type defaultApps."${key}"))
|
||||
mimeMap));
|
||||
associations =
|
||||
with lists;
|
||||
listToAttrs (
|
||||
flatten (mapAttrsToList (key: map (type: attrsets.nameValuePair type defaultApps."${key}")) mimeMap)
|
||||
);
|
||||
|
||||
noCalibre = let
|
||||
mimeTypes = [
|
||||
"application/pdf"
|
||||
"application/vnd.oasis.opendocument.text"
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
||||
"text/html"
|
||||
"text/x-markdown"
|
||||
];
|
||||
desktopFiles = [
|
||||
"calibre-ebook-edit.desktop"
|
||||
"calibre-ebook-viewer.desktop"
|
||||
"calibre-gui.desktop"
|
||||
];
|
||||
in lib.zipAttrs (map (d: lib.genAttrs mimeTypes (_: d)) desktopFiles);
|
||||
in {
|
||||
noCalibre =
|
||||
let
|
||||
mimeTypes = [
|
||||
"application/pdf"
|
||||
"application/vnd.oasis.opendocument.text"
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
||||
"text/html"
|
||||
"text/x-markdown"
|
||||
];
|
||||
desktopFiles = [
|
||||
"calibre-ebook-edit.desktop"
|
||||
"calibre-ebook-viewer.desktop"
|
||||
"calibre-gui.desktop"
|
||||
];
|
||||
in
|
||||
lib.zipAttrs (map (d: lib.genAttrs mimeTypes (_: d)) desktopFiles);
|
||||
in
|
||||
{
|
||||
xdg.configFile."mimeapps.list".force = true;
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.associations.added = associations;
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./lsp.nix ./dap.nix ./helix ./neovim ];
|
||||
imports = [
|
||||
./lsp.nix
|
||||
./dap.nix
|
||||
./helix
|
||||
./neovim
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [ fzf ripgrep ];
|
||||
home.packages = with pkgs; [
|
||||
fzf
|
||||
ripgrep
|
||||
];
|
||||
|
||||
home.sessionVariables.EDITOR = "hx";
|
||||
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
let
|
||||
prettier = parser: {
|
||||
command = "prettier";
|
||||
args = [ "--parser" parser ];
|
||||
args = [
|
||||
"--parser"
|
||||
parser
|
||||
];
|
||||
};
|
||||
typescriptLanguageServers = [
|
||||
{
|
||||
|
@ -12,7 +15,8 @@ let
|
|||
}
|
||||
"vscode-eslint-language-server"
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
# HINT for direnv to work needs to be started from project folder
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
|
@ -52,7 +56,10 @@ in {
|
|||
name = "nix";
|
||||
# `nix fmt` does not support stdin
|
||||
formatter.command = "nixfmt";
|
||||
language-servers = [ "nixd" "statix" ];
|
||||
language-servers = [
|
||||
"nixd"
|
||||
"statix"
|
||||
];
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
|
@ -63,7 +70,10 @@ in {
|
|||
{
|
||||
name = "protobuf";
|
||||
formatter.command = "buf format -w";
|
||||
language-servers = [ "bufls" "buf-lint" ];
|
||||
language-servers = [
|
||||
"bufls"
|
||||
"buf-lint"
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "graphql";
|
||||
|
@ -103,7 +113,11 @@ in {
|
|||
name = "bash";
|
||||
formatter = {
|
||||
command = "shfmt";
|
||||
args = [ "-i" "2" "-" ];
|
||||
args = [
|
||||
"-i"
|
||||
"2"
|
||||
"-"
|
||||
];
|
||||
};
|
||||
auto-format = true;
|
||||
}
|
||||
|
@ -125,23 +139,31 @@ in {
|
|||
command = "efm-langserver";
|
||||
config = {
|
||||
languages = {
|
||||
nix = [{
|
||||
# https://github.com/creativenull/efmls-configs-nvim/blob/ddc7c542aaad21da594edba233c15ae3fad01ea0/lua/efmls-configs/linters/statix.lua
|
||||
lintCommand = "statix check --stdin --format=errfmt";
|
||||
lintStdIn = true;
|
||||
lintIgnoreExitCode = true;
|
||||
lintFormats = [ "<stdin>>%l:%c:%t:%n:%m" ];
|
||||
rootMarkers = [ "flake.nix" "shell.nix" "default.nix" ];
|
||||
}];
|
||||
nix = [
|
||||
{
|
||||
# https://github.com/creativenull/efmls-configs-nvim/blob/ddc7c542aaad21da594edba233c15ae3fad01ea0/lua/efmls-configs/linters/statix.lua
|
||||
lintCommand = "statix check --stdin --format=errfmt";
|
||||
lintStdIn = true;
|
||||
lintIgnoreExitCode = true;
|
||||
lintFormats = [ "<stdin>>%l:%c:%t:%n:%m" ];
|
||||
rootMarkers = [
|
||||
"flake.nix"
|
||||
"shell.nix"
|
||||
"default.nix"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
buf-lint = {
|
||||
command = "efm-langserver";
|
||||
config.languages.protobuf = [{
|
||||
lintCommand = "buf lint --path";
|
||||
rootMarkers = [ "buf.yaml" ];
|
||||
}];
|
||||
config.languages.protobuf = [
|
||||
{
|
||||
lintCommand = "buf lint --path";
|
||||
rootMarkers = [ "buf.yaml" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
nixd.command = "nixd";
|
||||
# does not support formatting
|
||||
|
@ -177,7 +199,10 @@ in {
|
|||
config = {
|
||||
runtime = {
|
||||
version = "LuaJIT";
|
||||
path = [ "?.lua" "?/init.lua" ];
|
||||
path = [
|
||||
"?.lua"
|
||||
"?/init.lua"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -216,7 +241,9 @@ in {
|
|||
"H" = "goto_line_start";
|
||||
"L" = "goto_line_end";
|
||||
};
|
||||
insert = { "C-space" = "completion"; };
|
||||
insert = {
|
||||
"C-space" = "completion";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -6,8 +6,12 @@ let
|
|||
${lua}
|
||||
EOF
|
||||
'';
|
||||
in {
|
||||
home.packages = with pkgs; [ neovide graphviz ];
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
neovide
|
||||
graphviz
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
@ -65,26 +69,29 @@ in {
|
|||
|
||||
neorg
|
||||
];
|
||||
extraConfig = with builtins;
|
||||
vimLua (lib.foldl (r: f: r + "\n" + readFile f) "" [
|
||||
./init.lua
|
||||
./alpha.lua
|
||||
./auto-session.lua
|
||||
./lualine.lua
|
||||
./which-key.lua
|
||||
./gitsigns.lua
|
||||
./test.lua
|
||||
./completion.lua
|
||||
./diagnostic.lua
|
||||
./lsp/extensions.lua
|
||||
./lsp/lsp.lua
|
||||
./lsp/mappings.lua
|
||||
./dap/dap.lua
|
||||
./dap/mappings.lua
|
||||
./treesitter.lua
|
||||
./telescope.lua
|
||||
./neorg.lua
|
||||
]);
|
||||
extraConfig =
|
||||
with builtins;
|
||||
vimLua (
|
||||
lib.foldl (r: f: r + "\n" + readFile f) "" [
|
||||
./init.lua
|
||||
./alpha.lua
|
||||
./auto-session.lua
|
||||
./lualine.lua
|
||||
./which-key.lua
|
||||
./gitsigns.lua
|
||||
./test.lua
|
||||
./completion.lua
|
||||
./diagnostic.lua
|
||||
./lsp/extensions.lua
|
||||
./lsp/lsp.lua
|
||||
./lsp/mappings.lua
|
||||
./dap/dap.lua
|
||||
./dap/mappings.lua
|
||||
./treesitter.lua
|
||||
./telescope.lua
|
||||
./neorg.lua
|
||||
]
|
||||
);
|
||||
withNodeJs = false;
|
||||
withPython3 = false;
|
||||
};
|
||||
|
|
|
@ -13,11 +13,11 @@ let
|
|||
>"$out/share/applications/element-desktop.desktop"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
home.packages = [ element-desktop ];
|
||||
|
||||
xdg.configFile."autostart/element-desktop.desktop".text =
|
||||
builtins.replaceStrings [ "Exec=element-desktop" ]
|
||||
[ "Exec=element-desktop --hidden" ] (builtins.readFile
|
||||
"${element-desktop}/share/applications/element-desktop.desktop");
|
||||
builtins.replaceStrings [ "Exec=element-desktop" ] [ "Exec=element-desktop --hidden" ]
|
||||
(builtins.readFile "${element-desktop}/share/applications/element-desktop.desktop");
|
||||
}
|
||||
|
|
|
@ -1,9 +1,22 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ./shell ./editors/lsp.nix ./editors/helix ./git.nix ];
|
||||
imports = [
|
||||
./shell
|
||||
./editors/lsp.nix
|
||||
./editors/helix
|
||||
./git.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [ fh ncurses ];
|
||||
home.packages = with pkgs; [
|
||||
fh
|
||||
ncurses
|
||||
];
|
||||
|
||||
programs.gpg.enable = true;
|
||||
services.gpg-agent = {
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with pkgs; {
|
||||
with pkgs;
|
||||
{
|
||||
imports = [
|
||||
./shell
|
||||
./tailscale.nix
|
||||
|
@ -31,7 +37,9 @@ with pkgs; {
|
|||
|
||||
programs.ssh.enable = true;
|
||||
|
||||
programs.git = { defaultProfile = "work"; };
|
||||
programs.git = {
|
||||
defaultProfile = "work";
|
||||
};
|
||||
|
||||
xdg.configFile."nixpkgs/config.nix".text = ''
|
||||
{
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./steam.nix ./lutris.nix ];
|
||||
imports = [
|
||||
./steam.nix
|
||||
./lutris.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [ gamescope mangohud ];
|
||||
home.packages = with pkgs; [
|
||||
gamescope
|
||||
mangohud
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# TODO move into heroic.nix or rename lutris.nix
|
||||
home.packages = with pkgs; [ unstable.wineWowPackages.stable lutris heroic ];
|
||||
home.packages = with pkgs; [
|
||||
unstable.wineWowPackages.stable
|
||||
lutris
|
||||
heroic
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,15 +2,17 @@
|
|||
|
||||
{
|
||||
home.file = {
|
||||
proton-ge = let version = "GE-Proton7-54";
|
||||
in {
|
||||
recursive = true;
|
||||
source = builtins.fetchTarball {
|
||||
url =
|
||||
"https://github.com/GloriousEggroll/proton-ge-custom/releases/download/${version}/${version}.tar.gz";
|
||||
sha256 = "1iy14s1d48wxnnmw45jh5w2yadkrvwip8k91xljwg066aprb00vi";
|
||||
proton-ge =
|
||||
let
|
||||
version = "GE-Proton7-54";
|
||||
in
|
||||
{
|
||||
recursive = true;
|
||||
source = builtins.fetchTarball {
|
||||
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/${version}/${version}.tar.gz";
|
||||
sha256 = "1iy14s1d48wxnnmw45jh5w2yadkrvwip8k91xljwg066aprb00vi";
|
||||
};
|
||||
target = ".local/share/Steam/compatibilitytools.d/Proton-${version}/";
|
||||
};
|
||||
target = ".local/share/Steam/compatibilitytools.d/Proton-${version}/";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
23
home/git.nix
23
home/git.nix
|
@ -10,7 +10,10 @@
|
|||
email = "dev@felschr.com";
|
||||
# use sign subkey's fingerprint: gpg2 -K --with-subkey-fingerprint
|
||||
signingKey = "7E08 6842 0934 AA1D 6821 1F2A 671E 39E6 744C 807D";
|
||||
dirs = [ "~/dev/private/" "/etc/nixos" ];
|
||||
dirs = [
|
||||
"~/dev/private/"
|
||||
"/etc/nixos"
|
||||
];
|
||||
};
|
||||
work = {
|
||||
name = "Felix Schröter";
|
||||
|
@ -22,10 +25,16 @@
|
|||
};
|
||||
|
||||
ignores = [ ".direnv" ];
|
||||
signing = { signByDefault = true; };
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
};
|
||||
extraConfig = {
|
||||
init = { defaultBranch = "main"; };
|
||||
pull = { rebase = true; };
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
pull = {
|
||||
rebase = true;
|
||||
};
|
||||
rebase = {
|
||||
autoStash = true;
|
||||
autoSquash = true;
|
||||
|
@ -35,14 +44,12 @@
|
|||
};
|
||||
aliases = {
|
||||
# usage: git mr <source> <MR number> (git mr origin 1010)
|
||||
mr =
|
||||
"!sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -";
|
||||
mr = "!sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -";
|
||||
# usage: git pr <source> <PR number> (git pr origin 1010)
|
||||
pr = "!sh -c 'git fetch $1 pull/$2/head:pr/$2 && git checkout pr/$2' -";
|
||||
# delete branches locally that have already been merged
|
||||
# usage: git clean-branches <branch> (branch to check against, defaults to main)
|
||||
clean-branches = ''
|
||||
!sh -c 'git branch --merged "''${1:-main}" | egrep -v "(^\*|master|main|staging|production)" | xargs git branch -d' -'';
|
||||
clean-branches = ''!sh -c 'git branch --merged "''${1:-main}" | egrep -v "(^\*|master|main|staging|production)" | xargs git branch -d' -'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,14 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let common = import ./common.nix { inherit config lib pkgs; };
|
||||
in common.mkModule {
|
||||
let
|
||||
common = import ./common.nix { inherit config lib pkgs; };
|
||||
in
|
||||
common.mkModule {
|
||||
name = "firefox";
|
||||
displayName = "Firefox";
|
||||
dataConfigPath = ".mozilla/firefox";
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let common = import ./common.nix { inherit config lib pkgs; };
|
||||
in common.mkModule {
|
||||
let
|
||||
common = import ./common.nix { inherit config lib pkgs; };
|
||||
in
|
||||
common.mkModule {
|
||||
name = "mullvad-browser";
|
||||
displayName = "Mullvad Browser";
|
||||
dataConfigPath = ".mullvad/mullvadbrowser";
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let common = import ./common.nix { inherit config lib pkgs; };
|
||||
in common.mkModule {
|
||||
let
|
||||
common = import ./common.nix { inherit config lib pkgs; };
|
||||
in
|
||||
common.mkModule {
|
||||
name = "tor-browser";
|
||||
displayName = "Tor Browser";
|
||||
dataConfigPath = ".tor project/firefox";
|
||||
|
|
|
@ -1,36 +1,59 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let cfg = config.programs.git;
|
||||
in {
|
||||
let
|
||||
cfg = config.programs.git;
|
||||
in
|
||||
{
|
||||
options.programs.git = {
|
||||
profiles = mkOption {
|
||||
type = types.attrsOf (types.submodule ({ name, config, ... }: {
|
||||
options = {
|
||||
name = mkOption { type = types.str; };
|
||||
email = mkOption { type = types.str; };
|
||||
signingKey = mkOption { type = types.str; };
|
||||
dirs = mkOption { type = types.listOf types.str; };
|
||||
};
|
||||
}));
|
||||
type = types.attrsOf (
|
||||
types.submodule (
|
||||
{ name, config, ... }:
|
||||
{
|
||||
options = {
|
||||
name = mkOption { type = types.str; };
|
||||
email = mkOption { type = types.str; };
|
||||
signingKey = mkOption { type = types.str; };
|
||||
dirs = mkOption { type = types.listOf types.str; };
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
||||
defaultProfile = mkOption { type = types.str; };
|
||||
};
|
||||
|
||||
config = let inherit (cfg) profiles;
|
||||
in {
|
||||
programs.git = {
|
||||
# fix/workaround for https://github.com/NixOS/nixpkgs/issues/169193
|
||||
extraConfig.safe.directory = "/etc/nixos";
|
||||
config =
|
||||
let
|
||||
inherit (cfg) profiles;
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
# fix/workaround for https://github.com/NixOS/nixpkgs/issues/169193
|
||||
extraConfig.safe.directory = "/etc/nixos";
|
||||
|
||||
userName = profiles."${cfg.defaultProfile}".name;
|
||||
userEmail = profiles."${cfg.defaultProfile}".email;
|
||||
signing = { key = profiles."${cfg.defaultProfile}".signingKey; };
|
||||
includes = flatten (mapAttrsToList (name: profile:
|
||||
map (dir: {
|
||||
condition = "gitdir:${dir}";
|
||||
contents.user = { inherit (profile) name email signingKey; };
|
||||
}) profile.dirs) profiles);
|
||||
userName = profiles."${cfg.defaultProfile}".name;
|
||||
userEmail = profiles."${cfg.defaultProfile}".email;
|
||||
signing = {
|
||||
key = profiles."${cfg.defaultProfile}".signingKey;
|
||||
};
|
||||
includes = flatten (
|
||||
mapAttrsToList (
|
||||
name: profile:
|
||||
map (dir: {
|
||||
condition = "gitdir:${dir}";
|
||||
contents.user = {
|
||||
inherit (profile) name email signingKey;
|
||||
};
|
||||
}) profile.dirs
|
||||
) profiles
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
with pkgs; {
|
||||
with pkgs;
|
||||
{
|
||||
home.packages = [ wally-cli ];
|
||||
}
|
||||
|
|
|
@ -4,14 +4,19 @@
|
|||
services.easyeffects.enable = true;
|
||||
services.easyeffects.package = pkgs.easyeffects.override {
|
||||
# easyeffects speex integration doesn't work otherwise
|
||||
speexdsp = pkgs.speexdsp.overrideAttrs (old: { configureFlags = [ ]; });
|
||||
speexdsp = pkgs.speexdsp.overrideAttrs (old: {
|
||||
configureFlags = [ ];
|
||||
});
|
||||
};
|
||||
|
||||
# based on https://gist.github.com/MateusRodCosta/a10225eb132cdcb97d7c458526f93085
|
||||
xdg.configFile."easyeffects/input/optimised.json".text = builtins.toJSON {
|
||||
input = {
|
||||
blocklist = [ ];
|
||||
plugins_order = [ "rnnoise#0" "speex#0" ];
|
||||
plugins_order = [
|
||||
"rnnoise#0"
|
||||
"speex#0"
|
||||
];
|
||||
"rnnoise#0" = {
|
||||
bypass = false;
|
||||
enable-vad = false;
|
||||
|
@ -40,11 +45,11 @@
|
|||
};
|
||||
|
||||
xdg.configFile."easyeffects/autoload/input/alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo:analog-input-mic.json".text =
|
||||
builtins.toJSON {
|
||||
device =
|
||||
"alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo";
|
||||
device-description = "Yeti Stereo Microphone Analog Stereo";
|
||||
device-profile = "analog-input-mic";
|
||||
preset-name = "optimised";
|
||||
};
|
||||
builtins.toJSON
|
||||
{
|
||||
device = "alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo";
|
||||
device-description = "Yeti Stereo Microphone Analog Stereo";
|
||||
device-profile = "analog-input-mic";
|
||||
preset-name = "optimised";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let shellAliases = import ./aliases.nix;
|
||||
in {
|
||||
let
|
||||
shellAliases = import ./aliases.nix;
|
||||
in
|
||||
{
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
inherit shellAliases;
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
./direnv.nix
|
||||
];
|
||||
|
||||
programs.fzf = { enable = true; };
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.file."dev/work/.env".text = ''
|
||||
BROWSER=mullvad-browser-work
|
||||
|
|
|
@ -1,30 +1,34 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
with pkgs;
|
||||
with lib; {
|
||||
with lib;
|
||||
{
|
||||
# kitty terminal
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
keybindings = let
|
||||
vimKittyBinding = bind:
|
||||
''kitten pass_keys.py neighboring_window ${bind} "^.* - nvim$"'';
|
||||
in {
|
||||
"ctrl+h" = vimKittyBinding "left ctrl+h";
|
||||
"ctrl+j" = vimKittyBinding "bottom ctrl+j";
|
||||
"ctrl+k" = vimKittyBinding "top ctrl+k";
|
||||
"ctrl+l" = vimKittyBinding "right ctrl+l";
|
||||
};
|
||||
keybindings =
|
||||
let
|
||||
vimKittyBinding = bind: ''kitten pass_keys.py neighboring_window ${bind} "^.* - nvim$"'';
|
||||
in
|
||||
{
|
||||
"ctrl+h" = vimKittyBinding "left ctrl+h";
|
||||
"ctrl+j" = vimKittyBinding "bottom ctrl+j";
|
||||
"ctrl+k" = vimKittyBinding "top ctrl+k";
|
||||
"ctrl+l" = vimKittyBinding "right ctrl+l";
|
||||
};
|
||||
settings = {
|
||||
allow_remote_control = "yes";
|
||||
# single_instance = "yes";
|
||||
listen_on = "unix:@mykitty";
|
||||
scrollback_pager = ''
|
||||
nvim -u NONE -c "syntax on" -c 'set ft=man nonumber nolist showtabline=0 foldcolumn=0 laststatus=0' -c "autocmd VimEnter * normal G" -c "map q :qa!<CR>" -c "set clipboard+=unnamedplus" -'';
|
||||
scrollback_pager = ''nvim -u NONE -c "syntax on" -c 'set ft=man nonumber nolist showtabline=0 foldcolumn=0 laststatus=0' -c "autocmd VimEnter * normal G" -c "map q :qa!<CR>" -c "set clipboard+=unnamedplus" -'';
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."kitty/pass_keys.py".source =
|
||||
"${vimPlugins.nvim-kitty-navigator}/kitty/pass_keys.py";
|
||||
xdg.configFile."kitty/neighboring_window.py".source =
|
||||
"${vimPlugins.nvim-kitty-navigator}/kitty/neighboring_window.py";
|
||||
xdg.configFile."kitty/pass_keys.py".source = "${vimPlugins.nvim-kitty-navigator}/kitty/pass_keys.py";
|
||||
xdg.configFile."kitty/neighboring_window.py".source = "${vimPlugins.nvim-kitty-navigator}/kitty/neighboring_window.py";
|
||||
}
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
|
||||
let
|
||||
shellAliases = import ./aliases.nix;
|
||||
aliasesStr = builtins.concatStringsSep "\n"
|
||||
(pkgs.lib.mapAttrsToList (k: v: "alias ${k} = ${v}") shellAliases);
|
||||
in {
|
||||
aliasesStr = builtins.concatStringsSep "\n" (
|
||||
pkgs.lib.mapAttrsToList (k: v: "alias ${k} = ${v}") shellAliases
|
||||
);
|
||||
in
|
||||
{
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.nushell;
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
programs.zellij.settings = {
|
||||
default_layout = "compact"; # or default
|
||||
default_mode = "locked";
|
||||
ui.pane_frames = { hide_session_name = true; };
|
||||
ui.pane_frames = {
|
||||
hide_session_name = true;
|
||||
};
|
||||
plugins = {
|
||||
tab-bar.path = "tab-bar";
|
||||
status-bar.path = "status-bar";
|
||||
|
@ -15,5 +17,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = { ZELLIJ_AUTO_EXIT = "true"; };
|
||||
home.sessionVariables = {
|
||||
ZELLIJ_AUTO_EXIT = "true";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
_:
|
||||
|
||||
{
|
||||
programs.zoxide.enable = true;
|
||||
}
|
||||
{ programs.zoxide.enable = true; }
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let shellAliases = import ./aliases.nix;
|
||||
in {
|
||||
let
|
||||
shellAliases = import ./aliases.nix;
|
||||
in
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
# TODO is being renamed again in later 24.05 release
|
||||
|
@ -24,8 +26,7 @@ in {
|
|||
{
|
||||
name = "zsh-history-substring-search";
|
||||
src = zsh-history-substring-search;
|
||||
file =
|
||||
"share/zsh-history-substring-search/zsh-history-substring-search.zsh";
|
||||
file = "share/zsh-history-substring-search/zsh-history-substring-search.zsh";
|
||||
}
|
||||
];
|
||||
initExtra = ''
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
home.packages = with pkgs; [ signal-desktop ];
|
||||
|
||||
xdg.configFile."autostart/signal-desktop.desktop".text =
|
||||
builtins.replaceStrings [ "bin/signal-desktop" ]
|
||||
[ "bin/signal-desktop --start-in-tray" ] (builtins.readFile
|
||||
"${pkgs.signal-desktop}/share/applications/signal-desktop.desktop");
|
||||
builtins.replaceStrings [ "bin/signal-desktop" ] [ "bin/signal-desktop --start-in-tray" ]
|
||||
(builtins.readFile "${pkgs.signal-desktop}/share/applications/signal-desktop.desktop");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue