treewide: init core files
This commit is contained in:
parent
68f81bab54
commit
42db145d4e
|
@ -42,7 +42,7 @@
|
|||
nvfetcher.url = "github:berberman/nvfetcher";
|
||||
nvfetcher.inputs.nixpkgs.follows = "nixos";
|
||||
|
||||
nur.url = github:nix-community/NUR;
|
||||
nur.url = github:nix-community/NUR;
|
||||
nixos-hardware.url = "github:nixos/nixos-hardware";
|
||||
nix-colors.url = "github:misterio77/nix-colors";
|
||||
};
|
||||
|
@ -110,7 +110,7 @@ nur.url = github:nix-community/NUR;
|
|||
sforza = {
|
||||
modules = [
|
||||
hyprland.nixosModules.default
|
||||
nur.nixosModules.nur
|
||||
nur.nixosModules.nur
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -126,7 +126,7 @@ nur.url = github:nix-community/NUR;
|
|||
};
|
||||
};
|
||||
|
||||
home.modules = [inputs.hyprland.homeManagerModules.default];
|
||||
home.modules = [inputs.hyprland.homeManagerModules.default];
|
||||
|
||||
devshell = ./shell;
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
displayManager.sddm.enable = true;
|
||||
};
|
||||
|
||||
# Enable Hyprland Modules
|
||||
programs.hyprland.enable = true;
|
||||
# Enable Hyprland Modules
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
|
|
|
@ -16,6 +16,14 @@ in {
|
|||
|
||||
home = mkOption {type = types.str;};
|
||||
configHome = mkOption {type = types.str;};
|
||||
documentsFolder = mkOption {type = types.str;};
|
||||
downloadFolder = mkOption {type = types.str;};
|
||||
musicFolder = mkOption {type = types.str;};
|
||||
picturesFolder = mkOption {type = types.str;};
|
||||
videosFolder = mkOption {type = types.str;};
|
||||
repositoriesFolder = mkOption {type = types.str;};
|
||||
screenshotFolder = mkOption {type = types.str;};
|
||||
|
||||
sshPublicKey = mkOption {type = types.str;};
|
||||
stateVersion = mkOption {type = types.str;};
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
final: prev: {
|
||||
waybar = prev.waybar.override {withMediaPlayer = true;};
|
||||
}
|
|
@ -33,15 +33,6 @@ in {
|
|||
whois
|
||||
];
|
||||
|
||||
# Starship is a fast and featureful shell prompt
|
||||
# starship.toml has sane defaults that can be changed there
|
||||
shellInit = ''
|
||||
export STARSHIP_CONFIG=${
|
||||
pkgs.writeText "starship.toml"
|
||||
(fileContents ./starship.toml)
|
||||
}
|
||||
'';
|
||||
|
||||
shellAliases = let
|
||||
ifSudo = lib.mkIf config.security.sudo.enable;
|
||||
in {
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home-manager.users."${config.vars.username}" = {
|
||||
home.packages = with pkgs; [commitizen zoxide exa fzf fd bat ripgrep lazygit];
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
functions = {
|
||||
gitignore = "curl -sL https://www.gitignore.io/api/$argv";
|
||||
fish_greeting = ""; # disable welcome text
|
||||
run = "nix run nixpkgs#$argv";
|
||||
gadd = "git add $argv";
|
||||
};
|
||||
interactiveShellInit = ''
|
||||
starship init fish | source
|
||||
any-nix-shell fish --info-right | source
|
||||
zoxide init fish | source
|
||||
direnv hook fish | source
|
||||
'';
|
||||
shellAliases = with pkgs; {
|
||||
"bs" = "pushd ~/.config/nixos && doas nixos-rebuild switch --flake ~/.config/nixos && popd";
|
||||
"bb" = "pushd ~/.config/nixos && doas nixos-rebuild boot --flake ~/.config/nixos && popd";
|
||||
"hs" = "pushd ~/.config/nixos && home-manager switch --flake ~/.config/nixos && popd";
|
||||
"cat" = lib.getExe bat;
|
||||
"config" = "cd ~/.config/nixos";
|
||||
"lg" = "lazygit";
|
||||
"ls" = "exa --icons";
|
||||
"l" = "exa -lbF --git --icons";
|
||||
"ll" = "exa -lbGF --git --icons";
|
||||
"llm" = "exa -lbGF --git --sort=modified --icons";
|
||||
"la" = "exa -lbhHigUmuSa --time-style=long-iso --git --color-scale --icons";
|
||||
"lx" = "exa -lbhHigUmuSa@ --time-style=long-iso --git --color-scale --icons";
|
||||
"tree" = "exa --tree --icons";
|
||||
"nv" = "nvim";
|
||||
"mkdir" = "mkdir -p";
|
||||
"g" = "git";
|
||||
"gcl" = "git clone";
|
||||
"gcm" = "cz c";
|
||||
"gd" = "git diff HEAD";
|
||||
"gpl" = "git pull";
|
||||
"gpsh" = "git push -u origin";
|
||||
"gs" = "git status";
|
||||
"sudo" = "doas";
|
||||
"..." = "cd ../..";
|
||||
".." = "cd ..";
|
||||
};
|
||||
plugins = [
|
||||
{
|
||||
name = "z";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jethrokuan";
|
||||
repo = "z";
|
||||
rev = "85f863f20f24faf675827fb00f3a4e15c7838d76";
|
||||
sha256 = "1kaa0k9d535jnvy8vnyxd869jgs0ky6yg55ac1mxcxm8n0rh2mgq";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "fzf";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "PatrickF1";
|
||||
repo = "fzf.fish";
|
||||
rev = "096dc8fff16cfbf54333fb7a9910758e818e239d";
|
||||
sha256 = "183z8f7y8629nc78bc3gm5xgwyn813qvjrws4bx8vda2jchxzlb5";
|
||||
};
|
||||
}
|
||||
#{
|
||||
# name = "pure";
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "rafaelrinaldi";
|
||||
# repo = "pure";
|
||||
# rev = "8c1f69d7f499469979cbecc7b7eaefb97cd6f509";
|
||||
# sha256 = "1bnp6124cgf4zb1wngb671d7lc4sapizk9jnaa8mdk594z0xzvf9";
|
||||
# };
|
||||
#}
|
||||
];
|
||||
};
|
||||
programs.man.generateCaches = true; # For fish completions
|
||||
};
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{config, ...}: {
|
||||
home-manager.users."${config.vars.username}" = {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
homedir = "${config.vars.configHome}/gnupg";
|
||||
};
|
||||
|
||||
# Fix pass
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home-manager.users."${config.vars.username}" = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
gtk2 = {
|
||||
configLocation = "${config.vars.configHome}/gtk-2.0/gtkrc";
|
||||
};
|
||||
|
||||
font = {
|
||||
name = "Google Sans";
|
||||
size = 10;
|
||||
};
|
||||
|
||||
theme = {
|
||||
package = pkgs.whitesur-gtk-theme;
|
||||
name = "WhiteSur-Dark";
|
||||
};
|
||||
|
||||
cursorTheme = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors-white";
|
||||
size = 24;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = pkgs.whitesur-icon-theme;
|
||||
name = "WhiteSur";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home-manager.users."${config.vars.username}" = {
|
||||
# set up nix-index
|
||||
systemd.user.timers.nix-index-db-update = {
|
||||
Timer = {
|
||||
OnCalendar = "weekly";
|
||||
Persistent = true;
|
||||
RandomizedDelaySec = 0;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.nix-index-db-update = {
|
||||
Unit = {
|
||||
Description = "nix-index database update";
|
||||
PartOf = ["multi-user.target"];
|
||||
};
|
||||
Service = let
|
||||
script = pkgs.writeShellScript "nix-index-update-db" ''
|
||||
export filename="index-x86_64-$(uname | tr A-Z a-z)"
|
||||
mkdir -p ~/.cache/nix-index
|
||||
cd ~/.cache/nix-index
|
||||
# -N will only download a new version if there is an update.
|
||||
wget -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename
|
||||
ln -f $filename files
|
||||
'';
|
||||
in {
|
||||
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath [pkgs.wget pkgs.coreutils]}";
|
||||
ExecStart = "${script}";
|
||||
};
|
||||
Install.WantedBy = ["multi-user.target"];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -10,6 +10,8 @@
|
|||
];
|
||||
|
||||
environment = {
|
||||
# completion for system packages (e.g. systemd).
|
||||
pathsToLink = ["/share/fish"];
|
||||
# Selection of sysadmin tools that can come in handy
|
||||
systemPackages = with pkgs; [
|
||||
dosfstools
|
||||
|
@ -40,11 +42,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
fonts.fontconfig.defaultFonts = {
|
||||
monospace = ["DejaVu Sans Mono for Powerline"];
|
||||
sansSerif = ["DejaVu Sans"];
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
# Prevent impurities in builds
|
||||
|
@ -60,18 +57,6 @@
|
|||
optimise.automatic = true;
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
# Enable starship
|
||||
promptInit = ''
|
||||
eval "$(${pkgs.starship}/bin/starship init bash)"
|
||||
'';
|
||||
|
||||
# Enable direnv, a tool for managing shell environments
|
||||
interactiveShellInit = ''
|
||||
eval "$(${pkgs.direnv}/bin/direnv hook bash)"
|
||||
'';
|
||||
};
|
||||
|
||||
# For rage encryption, all hosts need a ssh key pair
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home-manager.users."${config.vars.username}" = {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableIonIntegration = false;
|
||||
enableFishIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
|
||||
# Pure Presets
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = lib.concatStrings [
|
||||
"$username"
|
||||
"$hostname"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_state"
|
||||
"$git_status"
|
||||
"$cmd_duration"
|
||||
"$line_break"
|
||||
"$python"
|
||||
"$character"
|
||||
];
|
||||
command_timeout = 1000;
|
||||
# right_format = "$all";
|
||||
directory = {
|
||||
style = "blue";
|
||||
};
|
||||
character = {
|
||||
success_symbol = "[❯](purple)";
|
||||
error_symbol = "[❯](red)";
|
||||
};
|
||||
git_branch = {
|
||||
style = "bright-black";
|
||||
format = "[$branch]($style)";
|
||||
};
|
||||
git_status = {
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)";
|
||||
style = "cyan";
|
||||
conflicted = "";
|
||||
untracked = "";
|
||||
modified = "";
|
||||
staged = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
stashed = "≡";
|
||||
};
|
||||
git_state = {
|
||||
format = "\([$state( $progress_current/$progress_total)]($style)\)";
|
||||
style = "bright-black";
|
||||
};
|
||||
cmd_duration = {
|
||||
format = "[$duration]($style) ";
|
||||
style = "yellow";
|
||||
min_time = 5000;
|
||||
};
|
||||
python = {
|
||||
format = "[$virtualenv]($style) ";
|
||||
style = "bright-black";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,95 +0,0 @@
|
|||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](bold purple)"
|
||||
vicmd_symbol = "[❮](bold purple)"
|
||||
|
||||
[battery]
|
||||
full_symbol = ""
|
||||
charging_symbol = ""
|
||||
discharging_symbol = ""
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[directory]
|
||||
style = "cyan"
|
||||
read_only = " 🔒"
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
format = "[$symbol$branch]($style) "
|
||||
symbol = " "
|
||||
style = "bold dimmed white"
|
||||
|
||||
[git_status]
|
||||
format = '([「$all_status$ahead_behind」]($style) )'
|
||||
conflicted = "⚠️"
|
||||
ahead = "⟫${count} "
|
||||
behind = "⟪${count}"
|
||||
diverged = "🔀 "
|
||||
untracked = "📁 "
|
||||
stashed = "↪ "
|
||||
modified = "𝚫 "
|
||||
staged = "✔ "
|
||||
renamed = "⇆ "
|
||||
deleted = "✘ "
|
||||
style = "bold bright-white"
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
disabled = false
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
format = '[$symbol$state]($style) '
|
||||
symbol = " "
|
||||
pure_msg = "λ"
|
||||
impure_msg = "⎔"
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[status]
|
||||
disabled = false
|
|
@ -0,0 +1,57 @@
|
|||
{config, ...}: let
|
||||
browser = ["firefox.desktop"];
|
||||
|
||||
# XDG MIME types
|
||||
associations = {
|
||||
"application/x-extension-htm" = browser;
|
||||
"application/x-extension-html" = browser;
|
||||
"application/x-extension-shtml" = browser;
|
||||
"application/x-extension-xht" = browser;
|
||||
"application/x-extension-xhtml" = browser;
|
||||
"application/xhtml+xml" = browser;
|
||||
"text/html" = browser;
|
||||
"x-scheme-handler/about" = browser;
|
||||
"x-scheme-handler/chrome" = ["chromium-browser.desktop"];
|
||||
"x-scheme-handler/ftp" = browser;
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
"x-scheme-handler/unknown" = browser;
|
||||
|
||||
"audio/*" = ["mpv.desktop"];
|
||||
"video/*" = ["mpv.dekstop"];
|
||||
"image/*" = ["imv.desktop"];
|
||||
"application/json" = browser;
|
||||
"application/pdf" = ["org.pwmt.zathura.desktop.desktop"];
|
||||
"x-scheme-handler/discord" = ["discordcanary.desktop"];
|
||||
"x-scheme-handler/spotify" = ["spotify.desktop"];
|
||||
"x-scheme-handler/tg" = ["telegramdesktop.desktop"];
|
||||
};
|
||||
in {
|
||||
home-manager.users."${config.vars.username}" = {
|
||||
xdg = {
|
||||
enable = true;
|
||||
cacheHome = config.vars.home + "/.cache";
|
||||
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = associations;
|
||||
};
|
||||
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
documents = "${config.vars.home}/${config.vars.documentsFolder}";
|
||||
download = "${config.vars.home}/${config.vars.downloadFolder}";
|
||||
music = "${config.vars.home}/${config.vars.musicFolder}";
|
||||
pictures = "${config.vars.home}/${config.vars.picturesFolder}";
|
||||
templates = "${config.vars.home}/${config.vars.repositoriesFolder}";
|
||||
videos = "${config.vars.home}/${config.vars.videosFolder}";
|
||||
desktop = "${config.vars.home}";
|
||||
publicShare = "${config.vars.home}";
|
||||
extraConfig = {
|
||||
XDG_SCREENSHOTS_DIR = config.vars.screenshotFolder;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -9,11 +9,11 @@
|
|||
id = 0;
|
||||
isDefault = true;
|
||||
name = "Ludovico";
|
||||
extensions = with config.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
bitwarden
|
||||
fastforward
|
||||
];
|
||||
extensions = with config.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
bitwarden
|
||||
fastforward
|
||||
];
|
||||
bookmarks = [
|
||||
{
|
||||
name = "ANIME"; # Bookmark Folder
|
||||
|
|
|
@ -14,6 +14,14 @@
|
|||
|
||||
home = "/home/${username}";
|
||||
configHome = (builtins.getAttr username config.home-manager.users).xdg.configHome;
|
||||
documentsFolder = "Documents";
|
||||
downloadFolder = "Downloads";
|
||||
musicFolder = "Music";
|
||||
picturesFolder = "Pictures";
|
||||
videosFolder = "Videos";
|
||||
repositoriesFolder = "Stuff";
|
||||
screenshotFolder = "${picturesFolder}/Screenshots";
|
||||
|
||||
sshPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILHKPBn388QwATBB2GiXYirTYZ+Nd2GTbzaUryyuWi3A ludovicopiero@pm.me";
|
||||
stateVersion = "22.11";
|
||||
|
||||
|
|
Loading…
Reference in New Issue