Merge branch 'nixos' into nixos-work
This commit is contained in:
commit
2fd299eaf8
10 changed files with 181 additions and 78 deletions
|
|
@ -22,6 +22,7 @@
|
|||
impermanence.enable = true;
|
||||
webis.enable = true;
|
||||
};
|
||||
programs.prismlauncher.enable = true;
|
||||
services.wallpaper.enable = true;
|
||||
};
|
||||
|
||||
|
|
@ -30,6 +31,19 @@
|
|||
stable.calibre # NOTE: breaks often in unstable
|
||||
];
|
||||
|
||||
home-manager.users.moritz.services.kanshi.settings = [
|
||||
{
|
||||
profile.name = "default";
|
||||
profile.outputs = [
|
||||
{
|
||||
adaptiveSync = true;
|
||||
criteria = "*";
|
||||
scale = 1.2;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
hardware = {
|
||||
keyboard.qmk.enable = true;
|
||||
nvidia = {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
};
|
||||
terminal.package = pkgs.kitty;
|
||||
programs.exercism.enable = true;
|
||||
services.mullvad.enable = true;
|
||||
};
|
||||
|
||||
users.users.moritz.packages = [ pkgs.poetry ];
|
||||
|
|
|
|||
|
|
@ -187,7 +187,6 @@ in
|
|||
rs = "sudo systemctl";
|
||||
uj = "journalctl --user";
|
||||
rj = "sudo journalctl";
|
||||
lg = "lazygit";
|
||||
};
|
||||
aliases = {
|
||||
ls = "${getExe pkgs.eza} -lh --icons --git";
|
||||
|
|
@ -198,6 +197,7 @@ in
|
|||
variables = { EDITOR = "vim"; };
|
||||
};
|
||||
programs = {
|
||||
lazygit.enable = true;
|
||||
direnv.enable = true;
|
||||
fish.enable = true;
|
||||
git.enable = true;
|
||||
|
|
@ -265,6 +265,10 @@ in
|
|||
programs = {
|
||||
mtr.enable = true;
|
||||
command-not-found.enable = false;
|
||||
nh = {
|
||||
enable = true;
|
||||
flake = "/home/moritz/Documents/dotfiles/";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
|
|
@ -299,65 +303,6 @@ in
|
|||
];
|
||||
};
|
||||
starship.enable = true;
|
||||
lazygit.enable = true;
|
||||
lazygit.settings = {
|
||||
customCommands = [
|
||||
{
|
||||
key = "<c-v>";
|
||||
context = "global";
|
||||
description = "Create new conventional commit";
|
||||
prompts = [
|
||||
{
|
||||
type = "menu";
|
||||
key = "Type";
|
||||
title = "Type of change";
|
||||
options = [
|
||||
{ name = "build"; description = "Changes that affect the build system or external dependencies"; value = "build"; }
|
||||
{ name = "feat"; description = "A new feature"; value = "feat"; }
|
||||
{ name = "fix"; description = "A bug fix"; value = "fix"; }
|
||||
{ name = "chore"; description = "Other changes that don't modify src or test files"; value = "chore"; }
|
||||
{ name = "ci"; description = "Changes to CI configuration files and scripts"; value = "ci"; }
|
||||
{ name = "docs"; description = "Documentation only changes"; value = "docs"; }
|
||||
{ name = "perf"; description = "A code change that improves performance"; value = "perf"; }
|
||||
{ name = "refactor"; description = "A code change that neither fixes a bug nor adds a feature"; value = "refactor"; }
|
||||
{ name = "revert"; description = "Reverts a previous commit"; value = "revert"; }
|
||||
{ name = "style"; description = "Changes that do not affect the meaning of the code"; value = "style"; }
|
||||
{ name = "test"; description = "Adding missing tests or correcting existing tests"; value = "test"; }
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "input";
|
||||
title = "Scope";
|
||||
key = "Scope";
|
||||
initialValue = "";
|
||||
}
|
||||
{
|
||||
type = "menu";
|
||||
key = "Breaking";
|
||||
title = "Breaking change";
|
||||
options = [
|
||||
{ name = "no"; value = ""; }
|
||||
{ name = "yes"; value = "!"; }
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "input";
|
||||
title = "message";
|
||||
key = "Message";
|
||||
initialValue = "";
|
||||
}
|
||||
{
|
||||
type = "confirm";
|
||||
key = "Confirm";
|
||||
title = "Commit";
|
||||
body = "Are you sure you want to commit?";
|
||||
}
|
||||
];
|
||||
command = "git commit --message '{{.Form.Type}}{{ if .Form.Scope }}({{ .Form.Scope }}){{ end }}{{.Form.Breaking}}: {{.Form.Message}}'";
|
||||
loadingText = "Creating conventional commit...";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
home = {
|
||||
username = "moritz";
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ in
|
|||
"/var/lib/nixos"
|
||||
"/var/lib/systemd"
|
||||
"/var/log"
|
||||
"/etc/mullvad-vpn/"
|
||||
];
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
|
|
@ -44,15 +45,17 @@ in
|
|||
".cache/nvim/luac"
|
||||
".cat_installer" # eduroam
|
||||
".config/JetBrains"
|
||||
".config/Mullvad VPN/"
|
||||
".config/Nextcloud"
|
||||
".config/Signal/"
|
||||
".config/Mullvad VPN/"
|
||||
".config/calibre"
|
||||
".config/github-copilot"
|
||||
".config/kdeconnect"
|
||||
".config/keepassxc"
|
||||
".java/.userPrefs/jetbrains/"
|
||||
".local/share/JetBrains"
|
||||
".local/share/PrismLauncher/"
|
||||
".local/share/Steam/"
|
||||
".local/share/direnv"
|
||||
".local/share/nvim"
|
||||
".local/share/zoxide"
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ in
|
|||
options.my.programs.kitty.enable = mkEnableOption "kitty";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
my.terminal.package = config.home-manager.users.moritz.programs.kitty.package;
|
||||
my.shell.aliases.ssh = "TERM=xterm-256color command ssh";
|
||||
home-manager.users.moritz = {
|
||||
programs.kitty = {
|
||||
|
|
|
|||
95
modules/programs/lazygit.nix
Normal file
95
modules/programs/lazygit.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.lazygit;
|
||||
|
||||
wrapper = pkgs.writeShellApplication {
|
||||
name = "lg";
|
||||
text = ''
|
||||
export LAZYGIT_NEW_DIR_FILE="$HOME/.lazygit/newdir"
|
||||
|
||||
lazygit "$@"
|
||||
|
||||
if [ -f "$LAZYGIT_NEW_DIR_FILE" ]; then
|
||||
cd "$(cat "$LAZYGIT_NEW_DIR_FILE")"
|
||||
rm -f "$LAZYGIT_NEW_DIR_FILE" > /dev/null
|
||||
fi
|
||||
'';
|
||||
runtimeInputs = [ pkgs.lazygit ];
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.programs.lazygit.enable = mkEnableOption "lazygit";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.home.packages = [
|
||||
wrapper
|
||||
];
|
||||
home-manager.users.moritz.programs.lazygit = {
|
||||
enable = true;
|
||||
settings = {
|
||||
customCommands = [
|
||||
{
|
||||
key = "<c-v>";
|
||||
context = "global";
|
||||
description = "Create new conventional commit";
|
||||
prompts = [
|
||||
{
|
||||
type = "menu";
|
||||
key = "Type";
|
||||
title = "Type of change";
|
||||
options = [
|
||||
{ name = "build"; description = "Changes that affect the build system or external dependencies"; value = "build"; }
|
||||
{ name = "feat"; description = "A new feature"; value = "feat"; }
|
||||
{ name = "fix"; description = "A bug fix"; value = "fix"; }
|
||||
{ name = "chore"; description = "Other changes that don't modify src or test files"; value = "chore"; }
|
||||
{ name = "ci"; description = "Changes to CI configuration files and scripts"; value = "ci"; }
|
||||
{ name = "docs"; description = "Documentation only changes"; value = "docs"; }
|
||||
{ name = "perf"; description = "A code change that improves performance"; value = "perf"; }
|
||||
{ name = "refactor"; description = "A code change that neither fixes a bug nor adds a feature"; value = "refactor"; }
|
||||
{ name = "revert"; description = "Reverts a previous commit"; value = "revert"; }
|
||||
{ name = "style"; description = "Changes that do not affect the meaning of the code"; value = "style"; }
|
||||
{ name = "test"; description = "Adding missing tests or correcting existing tests"; value = "test"; }
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "input";
|
||||
title = "Scope";
|
||||
key = "Scope";
|
||||
initialValue = "";
|
||||
}
|
||||
{
|
||||
type = "menu";
|
||||
key = "Breaking";
|
||||
title = "Breaking change";
|
||||
options = [
|
||||
{ name = "no"; value = ""; }
|
||||
{ name = "yes"; value = "!"; }
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "input";
|
||||
title = "message";
|
||||
key = "Message";
|
||||
initialValue = "";
|
||||
}
|
||||
{
|
||||
type = "confirm";
|
||||
key = "Confirm";
|
||||
title = "Commit";
|
||||
body = "Are you sure you want to commit?";
|
||||
}
|
||||
];
|
||||
command = "git commit --message '{{.Form.Type}}{{ if .Form.Scope }}({{ .Form.Scope }}){{ end }}{{.Form.Breaking}}: {{.Form.Message}}'";
|
||||
loadingText = "Creating conventional commit...";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -10,12 +10,6 @@ let
|
|||
inherit (lib) mkEnableOption mkOption types;
|
||||
|
||||
cfg = config.my.programs.nix;
|
||||
mkNom = system: nix:
|
||||
inputs.nix-monitored.packages.${system}.default.override
|
||||
{
|
||||
withNotify = false;
|
||||
nix = nix;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.programs.nix = {
|
||||
|
|
@ -31,15 +25,6 @@ in
|
|||
};
|
||||
|
||||
config = {
|
||||
my.nixpkgs.overlays = [
|
||||
(final: prev:
|
||||
{
|
||||
nixos-rebuild = prev.nixos-rebuild.override {
|
||||
nix = mkNom final.system final.nix;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.users.moritz.programs.direnv.nix-direnv.package = pkgs.nix-direnv.override {
|
||||
nix = config.nix.package;
|
||||
};
|
||||
|
|
@ -49,7 +34,7 @@ in
|
|||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
|
||||
package = pkgs.nix;
|
||||
package = pkgs.lix;
|
||||
|
||||
extraOptions = ''
|
||||
!include ${config.age.secrets.nix-github-token.path}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@ in
|
|||
plugins.lsp = {
|
||||
enable = true;
|
||||
inlayHints = true;
|
||||
servers.rust_analyzer = {
|
||||
enable = true;
|
||||
installRustc = false;
|
||||
installCargo = false;
|
||||
};
|
||||
servers.elixirls.enable = true;
|
||||
servers.nextls.enable = true;
|
||||
servers.nil_ls.enable = true;
|
||||
|
|
@ -18,7 +23,7 @@ in
|
|||
};
|
||||
options = {
|
||||
nixos = {
|
||||
expr = ''(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.nixos-desktop.options'';
|
||||
expr = ''builtins.head (builtins.attrValues ((builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations).options'';
|
||||
};
|
||||
"flake-parts" = {
|
||||
expr = ''(builtins.getFlake ("git+file://" + toString ./.)).debug.options'';
|
||||
|
|
|
|||
|
|
@ -58,6 +58,34 @@ in
|
|||
plugins.helpview.enable = true;
|
||||
performance.combinePlugins.standalonePlugins = [ "helpview.nvim" ];
|
||||
}
|
||||
{
|
||||
plugins.obsidian.enable = true;
|
||||
plugins.obsidian.settings = {
|
||||
dir = "~/Documents/Nextcloud/Notes/zettelkasten/";
|
||||
note_id_func.__raw = ''
|
||||
function(title)
|
||||
if title ~= nil then
|
||||
return title
|
||||
else
|
||||
suffix = ""
|
||||
for _ = 1, 4 do
|
||||
suffix = suffix .. string.char(math.random(65, 90))
|
||||
end
|
||||
return tostring(os.date("%Y-%m-%d")) .. "-" .. suffix
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
{
|
||||
plugins.mini = {
|
||||
enable = true;
|
||||
modules = {
|
||||
align = { };
|
||||
};
|
||||
};
|
||||
performance.combinePlugins.standalonePlugins = [ "mini.nvim" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
26
modules/programs/prismlauncher.nix
Normal file
26
modules/programs/prismlauncher.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.prismlauncher;
|
||||
|
||||
prismlauncher = pkgs.runCommandNoCC "prismlauncher"
|
||||
{
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
} ''
|
||||
makeWrapper ${lib.getExe pkgs.prismlauncher} $out/bin/prismlauncher \
|
||||
--set QT_STYLE_OVERRIDE "" \
|
||||
--set QT_QPA_PLATFORMTHEME "gtk3"
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.my.programs.prismlauncher.enable = mkEnableOption "prismlauncher";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.users.moritz.packages = [ prismlauncher ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue