full rewrite, first commit
This commit is contained in:
commit
a83c37a638
24 changed files with 4358 additions and 0 deletions
43
modules/home/apps/kitty/default.nix
Normal file
43
modules/home/apps/kitty/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.apps.kitty;
|
||||
defaultSettings = {
|
||||
confirm_os_window_close = 0;
|
||||
mouse_hide_wait = "-1.0";
|
||||
dynamic_background_opacity = true;
|
||||
editor = "nvim";
|
||||
term = "xterm-256color";
|
||||
adjust_line_height = 3;
|
||||
copy_on_select = "clipboard";
|
||||
cursor_shape = "Beam";
|
||||
};
|
||||
defaultFont = {
|
||||
name = "Hack Nerd Font Mono";
|
||||
package = pkgs.nerdfonts;
|
||||
size = 12;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.${namespace}.apps.kitty = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable kitty.";
|
||||
settings = mkOpt attrs defaultSettings "Settings to apply to the profile.";
|
||||
font = mkOpt attrs defaultFont "Customize default font settings.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
themeFile = "Dracula";
|
||||
inherit (cfg) font settings;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
87
modules/home/apps/librewolf/default.nix
Normal file
87
modules/home/apps/librewolf/default.nix
Normal file
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace};
|
||||
let
|
||||
cfg = config.${namespace}.apps.librewolf;
|
||||
defaultSettings = {
|
||||
"browser.startup.homepage" = "https://search.monapona.dev";
|
||||
"browser.startup.page" = 3;
|
||||
"privacy.resistFingerprinting" = false;
|
||||
"privacy.fingerprintingProtection" = true;
|
||||
"privacy.fingerprintingProtection.overrides" = "+AllTargets,-CSSPrefersColorScheme,-JSDateTimeUTC";
|
||||
"privacy.clearOnShutdown.history" = false;
|
||||
"signon.rememberSignons" = true;
|
||||
"signon.storeWhenAutocompleteOff" = true;
|
||||
"sidebar.verticalTabs" = true;
|
||||
};
|
||||
defaultExtensions = with inputs.firefox-addons.packages."x86_64-linux"; [
|
||||
bitwarden
|
||||
redirector
|
||||
return-youtube-dislikes
|
||||
sponsorblock
|
||||
ublock-origin
|
||||
seventv
|
||||
];
|
||||
defaultSearch = {
|
||||
privateDefault = "SearXNG";
|
||||
default = "SearXNG";
|
||||
engines = {
|
||||
"SearXNG" = {
|
||||
urls = [ { template = "https://search.monapona.dev/search?q={searchTerms}"; } ];
|
||||
iconUpdateURL = "https://search.monapona.dev/static/themes/simple/img/favicon.png";
|
||||
definedAliases = [ "@s" ];
|
||||
};
|
||||
|
||||
"My Nixos Packages" = {
|
||||
urls = [ { template = "https://mynixos.com/search?q={searchTerms}"; } ];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
|
||||
"NixOS Wiki" = {
|
||||
urls = [ { template = "https://wiki.nixos.org/index.php?search={searchTerms}"; } ];
|
||||
iconUpdateURL = "https://wiki.nixos.org/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = [ "@nw" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.${namespace}.apps.librewolf = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable Firefox.";
|
||||
extraConfig = mkOpt str "" "Extra configuration for the user profile JS file.";
|
||||
userChrome = mkOpt str "" "Extra configuration for the user chrome CSS file.";
|
||||
settings = mkOpt attrs defaultSettings "Settings to apply to the profile.";
|
||||
extensions = mkOpt (listOf package) defaultExtensions "Extra Librewolf extensions to install.";
|
||||
search = mkOpt attrs defaultSearch "Extra search engines to define.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
package = pkgs.librewolf-wayland;
|
||||
|
||||
profiles."philipp" = {
|
||||
inherit (cfg)
|
||||
extraConfig
|
||||
userChrome
|
||||
settings
|
||||
extensions
|
||||
search
|
||||
;
|
||||
id = 0;
|
||||
name = "Philipp";
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
52
modules/home/cli-apps/fish/default.nix
Normal file
52
modules/home/cli-apps/fish/default.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.${namespace}.cli-apps.fish;
|
||||
in
|
||||
{
|
||||
options.${namespace}.cli-apps.fish = {
|
||||
enable = mkEnableOption "fish";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
hm-update = "home-manager switch --flake ~/Documents/nix-config/ -b bk &| nom";
|
||||
nix-update = "sudo sh -c 'nixos-rebuild --log-format internal-json -v switch --flake /home/philipp/Documents/nix-config/ |& nom --json'";
|
||||
cd = "z";
|
||||
};
|
||||
plugins = [
|
||||
{
|
||||
name = "fzf";
|
||||
src = pkgs.fishPlugins.fzf.src;
|
||||
}
|
||||
{
|
||||
name = "hydro";
|
||||
src = pkgs.fishPlugins.hydro.src;
|
||||
}
|
||||
{
|
||||
name = "sponge";
|
||||
src = pkgs.fishPlugins.sponge.src;
|
||||
}
|
||||
{
|
||||
name = "z";
|
||||
src = pkgs.fishPlugins.z.src;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
21
modules/home/cli-apps/home-manager/default.nix
Normal file
21
modules/home/cli-apps/home-manager/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
inherit (lib.${namespace}) enabled;
|
||||
|
||||
cfg = config.${namespace}.cli-apps.home-manager;
|
||||
in
|
||||
{
|
||||
options.${namespace}.cli-apps.home-manager = {
|
||||
enable = mkEnableOption "home-manager";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.home-manager = enabled;
|
||||
};
|
||||
}
|
9
modules/home/home/default.nix
Normal file
9
modules/home/home/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
lib,
|
||||
osConfig ? { },
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.stateVersion = lib.mkDefault (osConfig.system.stateVersion or "24.11");
|
||||
}
|
49
modules/home/tools/git/default.nix
Normal file
49
modules/home/tools/git/default.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) types mkEnableOption mkIf;
|
||||
inherit (lib.${namespace}) mkOpt enabled;
|
||||
|
||||
cfg = config.${namespace}.tools.git;
|
||||
user = config.${namespace}.user;
|
||||
in
|
||||
{
|
||||
options.${namespace}.tools.git = {
|
||||
enable = mkEnableOption "Git";
|
||||
userName = mkOpt types.str "Philipp" "The name to configure git with.";
|
||||
userEmail = mkOpt types.str "philipp@boehm.sh" "The email to configure git with.";
|
||||
signingKey = mkOpt types.str "AA5E5A3C" "The key ID to sign commits with.";
|
||||
signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
inherit (cfg) userName userEmail;
|
||||
lfs = enabled;
|
||||
signing = {
|
||||
key = cfg.signingKey;
|
||||
inherit (cfg) signByDefault;
|
||||
};
|
||||
extraConfig = {
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
pull = {
|
||||
rebase = true;
|
||||
};
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
};
|
||||
core = {
|
||||
whitespace = "trailing-space,space-before-tab";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
39
modules/home/tools/neovim/default.nix
Normal file
39
modules/home/tools/neovim/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.${namespace}.tools.neovim;
|
||||
in
|
||||
{
|
||||
options.${namespace}.tools.neovim = {
|
||||
enable = mkEnableOption "Neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
less
|
||||
plusultra.neovim
|
||||
];
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
vimdiff = "nvim -d";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"dashboard-nvim/.keep".text = "";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue