Compare commits
3 commits
d14d7ae72f
...
a5f680bc17
| Author | SHA1 | Date | |
|---|---|---|---|
| a5f680bc17 | |||
| 2b979db6e3 | |||
| 35631c0e60 |
15 changed files with 579 additions and 558 deletions
139
homes/common.nix
139
homes/common.nix
|
|
@ -1,17 +1,12 @@
|
||||||
{ config, lib, pkgs, pkgs-unstable, ... }:
|
{ config, lib, pkgs, pkgs-unstable, ... }: {
|
||||||
let
|
imports = [
|
||||||
conda_init = shell: ''
|
./../programs/shells.nix
|
||||||
eval "$(${pkgs.micromamba}/bin/micromamba shell hook --shell ${shell})"
|
./../programs/bat.nix
|
||||||
|
./../programs/direnv.nix
|
||||||
'';
|
./../programs/git.nix
|
||||||
nd_bash_function = ''
|
./../programs/lsd.nix
|
||||||
function nd() {
|
./../programs/starship.nix
|
||||||
mkdir -p "$1" && cd "$1"
|
];
|
||||||
}
|
|
||||||
|
|
||||||
'';
|
|
||||||
starship-config = import ./../programs/starship.nix;
|
|
||||||
in {
|
|
||||||
home = {
|
home = {
|
||||||
stateVersion = "23.11";
|
stateVersion = "23.11";
|
||||||
file = { };
|
file = { };
|
||||||
|
|
@ -80,116 +75,12 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
home-manager = { enable = true; };
|
home-manager.enable = true;
|
||||||
bash = {
|
|
||||||
enable = true;
|
gh.enable = true;
|
||||||
initExtra = conda_init "bash" + nd_bash_function + ''
|
gpg.enable = true;
|
||||||
export PS1="[\[\e[32m\]\u\[\e[m\]@\[\e[33m\]\h\[\e[m\] \[\e[34m\]\W\[\e[m\]] \\$ "
|
pandoc.enable = true;
|
||||||
'';
|
yt-dlp.enable = true;
|
||||||
};
|
|
||||||
bat = {
|
|
||||||
enable = true;
|
|
||||||
config = { pager = "less -SRF"; };
|
|
||||||
};
|
|
||||||
direnv = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
gh = { enable = true; };
|
|
||||||
git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "Thomas A. Christensen II";
|
|
||||||
userEmail = "25492070+MillironX@users.noreply.github.com";
|
|
||||||
extraConfig = {
|
|
||||||
core = { editor = "nvim"; };
|
|
||||||
credential = { helper = "store"; };
|
|
||||||
color = { ui = "auto"; };
|
|
||||||
init = { defaultBranch = "master"; };
|
|
||||||
column = { ui = "auto"; };
|
|
||||||
branch = { sort = "-committerdate"; };
|
|
||||||
tag = { sort = "version:refname"; };
|
|
||||||
diff = {
|
|
||||||
algorithm = "histogram";
|
|
||||||
colorMoved = "plain";
|
|
||||||
mnemonicPrefix = true;
|
|
||||||
renames = true;
|
|
||||||
};
|
|
||||||
push = {
|
|
||||||
default = "simple";
|
|
||||||
autoSetupRemote = true;
|
|
||||||
followTages = true;
|
|
||||||
};
|
|
||||||
fetch = {
|
|
||||||
prune = true;
|
|
||||||
pruneTags = true;
|
|
||||||
all = true;
|
|
||||||
};
|
|
||||||
help = { autocorrect = "prompt"; };
|
|
||||||
commit = { verbose = true; };
|
|
||||||
rerere = {
|
|
||||||
enabled = true;
|
|
||||||
autoupdate = true;
|
|
||||||
};
|
|
||||||
rebase = {
|
|
||||||
autoSquash = true;
|
|
||||||
autoStash = true;
|
|
||||||
updateRefs = true;
|
|
||||||
};
|
|
||||||
merge = { conflictstyle = "zdiff3"; };
|
|
||||||
pull = { rebase = true; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
gpg = { enable = true; };
|
|
||||||
lsd = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
neovim = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.neovim-unwrapped;
|
|
||||||
defaultEditor = true;
|
|
||||||
coc.enable = true;
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
|
||||||
mason-nvim
|
|
||||||
mason-lspconfig-nvim
|
|
||||||
nvim-lspconfig
|
|
||||||
nvim-dap
|
|
||||||
nvim-dap-ui
|
|
||||||
null-ls-nvim
|
|
||||||
nvim-lint
|
|
||||||
formatter-nvim
|
|
||||||
lspsaga-nvim
|
|
||||||
vim-slime
|
|
||||||
];
|
|
||||||
extraLuaConfig = ''
|
|
||||||
require("mason").setup()
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
pandoc = { enable = true; };
|
|
||||||
starship = starship-config { inherit lib; };
|
|
||||||
yt-dlp = { enable = true; };
|
|
||||||
zsh = {
|
|
||||||
enable = true;
|
|
||||||
autosuggestion.enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
completionInit =
|
|
||||||
"autoload -U compinit && compinit; autoload -U bashcompinit && bashcompinit";
|
|
||||||
antidote = {
|
|
||||||
enable = true;
|
|
||||||
plugins = [
|
|
||||||
"getantidote/use-omz"
|
|
||||||
"ohmyzsh/ohmyzsh path:lib"
|
|
||||||
"ohmyzsh/ohmyzsh path:plugins/git"
|
|
||||||
"ohmyzsh/ohmyzsh path:plugins/extract"
|
|
||||||
"zsh-users/zsh-syntax-highlighting"
|
|
||||||
"zsh-users/zsh-autosuggestions"
|
|
||||||
"zsh-users/zsh-completions"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
initContent = conda_init "zsh" + nd_bash_function;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
xdg = {
|
xdg = {
|
||||||
dataFile = { "julia/config/startup.jl".source = ./../dotfiles/startup.jl; };
|
dataFile = { "julia/config/startup.jl".source = ./../dotfiles/startup.jl; };
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
{ config, lib, pkgs, pkgs-unstable, firefox-addons, buildFirefoxXpiAddon, ... }:
|
{ pkgs, ... }: {
|
||||||
let
|
|
||||||
firefox-config = import ./../programs/firefox.nix;
|
imports = [
|
||||||
zed-config = import ./../programs/zed.nix;
|
./../programs/firefox.nix
|
||||||
in {
|
./../programs/zed.nix
|
||||||
|
./../services/gpg-agent.nix
|
||||||
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
act
|
act
|
||||||
|
|
@ -29,25 +32,5 @@ in {
|
||||||
];
|
];
|
||||||
shellAliases = { code = "codium"; };
|
shellAliases = { code = "codium"; };
|
||||||
};
|
};
|
||||||
programs = {
|
services = { syncthing.enable = true; };
|
||||||
firefox = firefox-config {
|
|
||||||
inherit firefox-addons;
|
|
||||||
inherit buildFirefoxXpiAddon;
|
|
||||||
inherit lib;
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
zed-editor = zed-config;
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
enableSshSupport = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
defaultCacheTtl = 604800;
|
|
||||||
maxCacheTtl = 604800;
|
|
||||||
verbose = true;
|
|
||||||
};
|
|
||||||
syncthing = { enable = true; };
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
{ config, lib, pkgs, pkgs-unstable, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
home-manager-repo = "${config.xdg.configHome}/home-manager";
|
home-manager-repo = "${config.xdg.configHome}/home-manager";
|
||||||
mkOutOfStoreSymlink = config.lib.file.mkOutOfStoreSymlink;
|
mkOutOfStoreSymlink = config.lib.file.mkOutOfStoreSymlink;
|
||||||
plasma-config = import ./../programs/plasma.nix;
|
|
||||||
in {
|
in {
|
||||||
|
imports = [ ./../programs/plasma.nix ];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [ kwalletcli ];
|
packages = with pkgs; [ kwalletcli ];
|
||||||
sessionVariables = { ZED_WINDOW_DECORATIONS = "server"; };
|
sessionVariables = { ZED_WINDOW_DECORATIONS = "server"; };
|
||||||
};
|
};
|
||||||
programs = { plasma = plasma-config { inherit config; }; };
|
|
||||||
services = {
|
services = {
|
||||||
gpg-agent = {
|
gpg-agent = {
|
||||||
# Use kwallet cli, but put it in extraConfig, otherwise gpg-agent will
|
# Use kwallet cli, but put it in extraConfig, otherwise gpg-agent will
|
||||||
|
|
|
||||||
6
programs/bat.nix
Normal file
6
programs/bat.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ ... }: {
|
||||||
|
programs.bat = {
|
||||||
|
enable = true;
|
||||||
|
config = { pager = "less -SRF"; };
|
||||||
|
};
|
||||||
|
}
|
||||||
7
programs/direnv.nix
Normal file
7
programs/direnv.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }: {
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ firefox-addons, buildFirefoxXpiAddon, lib, pkgs }: {
|
{ firefox-addons, buildFirefoxXpiAddon, lib, ... }: {
|
||||||
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package =
|
package =
|
||||||
null; # Use native package manager/Homebrew b/c there are fewer breakages
|
null; # Use native package manager/Homebrew b/c there are fewer breakages
|
||||||
|
|
@ -256,4 +257,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
45
programs/git.nix
Normal file
45
programs/git.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
{ ... }: {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "Thomas A. Christensen II";
|
||||||
|
userEmail = "25492070+MillironX@users.noreply.github.com";
|
||||||
|
extraConfig = {
|
||||||
|
core = { editor = "nvim"; };
|
||||||
|
credential = { helper = "store"; };
|
||||||
|
color = { ui = "auto"; };
|
||||||
|
init = { defaultBranch = "master"; };
|
||||||
|
column = { ui = "auto"; };
|
||||||
|
branch = { sort = "-committerdate"; };
|
||||||
|
tag = { sort = "version:refname"; };
|
||||||
|
diff = {
|
||||||
|
algorithm = "histogram";
|
||||||
|
colorMoved = "plain";
|
||||||
|
mnemonicPrefix = true;
|
||||||
|
renames = true;
|
||||||
|
};
|
||||||
|
push = {
|
||||||
|
default = "simple";
|
||||||
|
autoSetupRemote = true;
|
||||||
|
followTages = true;
|
||||||
|
};
|
||||||
|
fetch = {
|
||||||
|
prune = true;
|
||||||
|
pruneTags = true;
|
||||||
|
all = true;
|
||||||
|
};
|
||||||
|
help = { autocorrect = "prompt"; };
|
||||||
|
commit = { verbose = true; };
|
||||||
|
rerere = {
|
||||||
|
enabled = true;
|
||||||
|
autoupdate = true;
|
||||||
|
};
|
||||||
|
rebase = {
|
||||||
|
autoSquash = true;
|
||||||
|
autoStash = true;
|
||||||
|
updateRefs = true;
|
||||||
|
};
|
||||||
|
merge = { conflictstyle = "zdiff3"; };
|
||||||
|
pull = { rebase = true; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
programs/lsd.nix
Normal file
7
programs/lsd.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }: {
|
||||||
|
programs.lsd = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
23
programs/neovim.nix
Normal file
23
programs/neovim.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.neovim-unwrapped;
|
||||||
|
defaultEditor = true;
|
||||||
|
coc.enable = true;
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
mason-nvim
|
||||||
|
mason-lspconfig-nvim
|
||||||
|
nvim-lspconfig
|
||||||
|
nvim-dap
|
||||||
|
nvim-dap-ui
|
||||||
|
null-ls-nvim
|
||||||
|
nvim-lint
|
||||||
|
formatter-nvim
|
||||||
|
lspsaga-nvim
|
||||||
|
vim-slime
|
||||||
|
];
|
||||||
|
extraLuaConfig = ''
|
||||||
|
require("mason").setup()
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ config }: {
|
{ config, ... }: {
|
||||||
|
programs.plasma = {
|
||||||
enable = true;
|
enable = true;
|
||||||
workspace = {
|
workspace = {
|
||||||
wallpaperFillMode = "preserveAspectCrop";
|
wallpaperFillMode = "preserveAspectCrop";
|
||||||
|
|
@ -8,4 +9,5 @@
|
||||||
"${config.home.homeDirectory}/Nextcloud/Pictures/Desktop backgrounds/";
|
"${config.home.homeDirectory}/Nextcloud/Pictures/Desktop backgrounds/";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
42
programs/shells.nix
Normal file
42
programs/shells.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
conda_init = shell: ''
|
||||||
|
eval "$(${pkgs.micromamba}/bin/micromamba shell hook --shell ${shell})"
|
||||||
|
|
||||||
|
'';
|
||||||
|
nd_bash_function = ''
|
||||||
|
function nd() {
|
||||||
|
mkdir -p "$1" && cd "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
'';
|
||||||
|
in {
|
||||||
|
programs = {
|
||||||
|
bash = {
|
||||||
|
enable = true;
|
||||||
|
initExtra = conda_init "bash" + nd_bash_function + ''
|
||||||
|
export PS1="[\[\e[32m\]\u\[\e[m\]@\[\e[33m\]\h\[\e[m\] \[\e[34m\]\W\[\e[m\]] \\$ "
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
zsh = {
|
||||||
|
enable = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
completionInit =
|
||||||
|
"autoload -U compinit && compinit; autoload -U bashcompinit && bashcompinit";
|
||||||
|
antidote = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
"getantidote/use-omz"
|
||||||
|
"ohmyzsh/ohmyzsh path:lib"
|
||||||
|
"ohmyzsh/ohmyzsh path:plugins/git"
|
||||||
|
"ohmyzsh/ohmyzsh path:plugins/extract"
|
||||||
|
"zsh-users/zsh-syntax-highlighting"
|
||||||
|
"zsh-users/zsh-autosuggestions"
|
||||||
|
"zsh-users/zsh-completions"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
initContent = conda_init "zsh" + nd_bash_function;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib }:
|
{ lib, ... }:
|
||||||
let language-format-string = "[$symbol($version )]($style)";
|
let language-format-string = "[$symbol($version )]($style)";
|
||||||
in {
|
in {
|
||||||
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
|
|
@ -85,4 +85,5 @@ in {
|
||||||
};
|
};
|
||||||
username = { format = "[$user]($style)"; };
|
username = { format = "[$user]($style)"; };
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{ ... }: {
|
||||||
|
programs.zed-editor = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extensions = [
|
extensions = [
|
||||||
"basher"
|
"basher"
|
||||||
|
|
@ -20,7 +21,7 @@
|
||||||
agent = {
|
agent = {
|
||||||
default_model = {
|
default_model = {
|
||||||
provider = "copilot_chat";
|
provider = "copilot_chat";
|
||||||
model = "gpt-4o";
|
model = "gpt-4.1";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
auto_install_extensions = {
|
auto_install_extensions = {
|
||||||
|
|
@ -78,4 +79,5 @@
|
||||||
ui_font_size = 16;
|
ui_font_size = 16;
|
||||||
wrap_guides = [ 80 92 120 ];
|
wrap_guides = [ 80 92 120 ];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
11
services/gpg-agent.nix
Normal file
11
services/gpg-agent.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ ... }: {
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableSshSupport = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
defaultCacheTtl = 604800;
|
||||||
|
maxCacheTtl = 604800;
|
||||||
|
verbose = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
|
|
@ -9,8 +9,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
quadlet = let inherit (config.virtualisation.quadlet) networks pods;
|
quadlet = {
|
||||||
in {
|
|
||||||
containers = {
|
containers = {
|
||||||
pihole = {
|
pihole = {
|
||||||
containerConfig = {
|
containerConfig = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue