Add SSH configuration, move more things to xdg dirs
This commit is contained in:
parent
48ce4411be
commit
517b0a5981
14 changed files with 67 additions and 35 deletions
|
@ -5,7 +5,6 @@
|
||||||
./programs
|
./programs
|
||||||
./services
|
./services
|
||||||
./settings
|
./settings
|
||||||
./user
|
|
||||||
./variables
|
./variables
|
||||||
./wms
|
./wms
|
||||||
];
|
];
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories = [ "data/.config/obs-studio" ];
|
home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories =
|
||||||
|
with lib; with config.home; with config.xdg;
|
||||||
|
[ "data/${removePrefix "${homeDirectory}/" configHome}/obs-studio" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
./nh
|
./nh
|
||||||
./nix-index
|
./nix-index
|
||||||
./ranger
|
./ranger
|
||||||
|
./ssh
|
||||||
./tmux
|
./tmux
|
||||||
./yt-dlp
|
./yt-dlp
|
||||||
./zoxide
|
./zoxide
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories = [ "data/.local/share/direnv" ];
|
home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories =
|
||||||
|
with lib; with config.home; with config.xdg;
|
||||||
|
[ "data/${removePrefix "${homeDirectory}/" dataHome}/direnv" ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
programs.lazygit.enable = true;
|
programs.lazygit.enable = true;
|
||||||
home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories = [ "state/.local/state/lazygit" ];
|
home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories =
|
||||||
|
with lib; with config.home; with config.xdg;
|
||||||
|
[ "state/${removePrefix "${homeDirectory}/" stateHome}/lazygit" ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
set mouse=a
|
set mouse=a
|
||||||
|
|
||||||
set undofile
|
set undofile
|
||||||
set undodir=$HOME/.local/share/nvim/undo
|
set undodir=${config.xdg.dataHome}/nvim/undo
|
||||||
set undolevels=100
|
set undolevels=100
|
||||||
set undoreload=10000
|
set undoreload=10000
|
||||||
|
|
||||||
|
@ -115,6 +115,8 @@
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
sessionVariables.MANPAGER = "nvim +Man!";
|
sessionVariables.MANPAGER = "nvim +Man!";
|
||||||
persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories = [ "state/.local/share/nvim/undo" ];
|
persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories =
|
||||||
|
with lib; with config.home; with config.xdg;
|
||||||
|
[ "state/${removePrefix "${homeDirectory}/" dataHome}/nvim/undo" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgsStable, ... }:
|
{ config, lib, pkgsStable, ... }:
|
||||||
{
|
{
|
||||||
programs.ranger = {
|
programs.ranger = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -94,28 +94,28 @@
|
||||||
|
|
||||||
# Ranger's bookmarks and necessary tools
|
# Ranger's bookmarks and necessary tools
|
||||||
home = {
|
home = {
|
||||||
file = {
|
file = with lib; with config.home; with config.xdg; with config.xdg.userDirs; with config.xdg.userDirs.extraConfig; {
|
||||||
".local/share/ranger/bookmarks".text = ''
|
"${removePrefix "${homeDirectory}/" dataHome}/ranger/bookmarks".text = ''
|
||||||
# Local files
|
# Local files
|
||||||
h:${config.home.homeDirectory}
|
h:${homeDirectory}
|
||||||
k:${config.home.homeDirectory}/Keepers
|
k:${XDG_KEEPERS_DIR}
|
||||||
d:${config.home.homeDirectory}/Downloads
|
d:${download}
|
||||||
j:${config.home.homeDirectory}/Documents
|
j:${documents}
|
||||||
p:${config.home.homeDirectory}/Photos
|
p:${pictures}
|
||||||
v:${config.home.homeDirectory}/Videos
|
v:${videos}
|
||||||
n:${config.home.homeDirectory}/Projects/nixos-config
|
n:${XDG_PROJECTS_DIR}/nixos-config
|
||||||
c:${config.home.homeDirectory}/.config
|
c:${configHome}
|
||||||
l:${config.home.homeDirectory}/.local
|
l:${dataHome}
|
||||||
q:/persist
|
q:${XDG_PERSIST_DIR}
|
||||||
w:/mnt
|
w:/mnt
|
||||||
|
|
||||||
# Remote files
|
# Remote files
|
||||||
N:${config.home.homeDirectory}/Network
|
N:${XDG_NETWORK_DIR}/
|
||||||
H:${config.home.homeDirectory}/Network/Midas/
|
H:${XDG_NETWORK_DIR}/Midas/
|
||||||
K:${config.home.homeDirectory}/Network/Midas/Files
|
K:${XDG_NETWORK_DIR}/Midas/Files
|
||||||
M:${config.home.homeDirectory}/Network/Midas/Music
|
M:${XDG_NETWORK_DIR}/Midas/Music
|
||||||
V:${config.home.homeDirectory}/Network/Midas/Videos
|
V:${XDG_NETWORK_DIR}/Midas/Videos
|
||||||
P:${config.home.homeDirectory}/Network/Midas/Photos
|
P:${XDG_NETWORK_DIR}/Midas/Photos
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
packages = with pkgsStable; [
|
packages = with pkgsStable; [
|
||||||
|
|
|
@ -1,7 +1,24 @@
|
||||||
{ ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
addKeysToAgent = "yes";
|
addKeysToAgent = "yes";
|
||||||
|
compression = true;
|
||||||
|
matchBlocks = with lib.hm.dag; {
|
||||||
|
nixfox = {
|
||||||
|
host = "*.nixfox.ca";
|
||||||
|
user = config.home.username;
|
||||||
|
};
|
||||||
|
midas = entryAfter [ "nixfox" ] {
|
||||||
|
hostname = "sv.nixfox.ca";
|
||||||
|
};
|
||||||
|
kitty = entryAfter [ "nixfox" ] {
|
||||||
|
hostname = "sv.nixfox.ca";
|
||||||
|
port = 2222;
|
||||||
|
};
|
||||||
|
prophet = entryAfter [ "nixfox" ] {
|
||||||
|
hostname = "mx.nixfox.ca";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
{
|
{
|
||||||
programs.zoxide.enable = true;
|
programs.zoxide.enable = true;
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
shellAliases.cd = "z";
|
shellAliases.cd = "z";
|
||||||
persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories = [ "state/.local/share/zoxide" ];
|
persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories =
|
||||||
|
with lib; with config.home; with config.xdg;
|
||||||
|
[ "state/${removePrefix "${homeDirectory}/" dataHome}/zoxide" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
mpd = {
|
mpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
network.startWhenNeeded = true;
|
network.startWhenNeeded = true;
|
||||||
musicDirectory = "${config.home.homeDirectory}/Network/Midas/Music/NixBops";
|
musicDirectory = "${config.xdg.userDirs.extraConfig.XDG_NETWORK_DIR}/Midas/Music/NixBops";
|
||||||
playlistDirectory = "${config.services.mpd.musicDirectory}/Playlists";
|
playlistDirectory = "${config.services.mpd.musicDirectory}/Playlists";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
audio_output {
|
audio_output {
|
||||||
|
@ -18,6 +18,8 @@
|
||||||
mpd-discord-rpc.enable = true;
|
mpd-discord-rpc.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories = [ "state/.local/share/mpd" ];
|
home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories =
|
||||||
|
with lib; with config.home; with config.xdg;
|
||||||
|
[ "state/${removePrefix "${homeDirectory}/" dataHome}/mpd" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
uris = [ "qemu:///system" ];
|
uris = [ "qemu:///system" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories = with lib; with config.home; with config.xdg;
|
home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}".directories =
|
||||||
[ "games/${removePrefix "${homeDirectory}/" stateHome}/dconf" ];
|
with lib; with config.home; with config.xdg;
|
||||||
|
[ "state/${removePrefix "${homeDirectory}/" configHome}/dconf" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
./nix
|
./nix
|
||||||
./nixgl
|
./nixgl
|
||||||
./qt
|
./qt
|
||||||
|
./user
|
||||||
./xdg
|
./xdg
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
XDG_GAMES_DIR = "${homeDirectory}/Games";
|
XDG_GAMES_DIR = "${homeDirectory}/Games";
|
||||||
XDG_KEEPERS_DIR = "${homeDirectory}/Keepers";
|
XDG_KEEPERS_DIR = "${homeDirectory}/Keepers";
|
||||||
|
XDG_NETWORK_DIR = "${homeDirectory}/Network";
|
||||||
XDG_PERSIST_DIR = if !config.targets.genericLinux.enable then "/persist${homeDirectory}" else "${homeDirectory}/.stow";
|
XDG_PERSIST_DIR = if !config.targets.genericLinux.enable then "/persist${homeDirectory}" else "${homeDirectory}/.stow";
|
||||||
XDG_PROJECTS_DIR = "${homeDirectory}/Projects";
|
XDG_PROJECTS_DIR = "${homeDirectory}/Projects";
|
||||||
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue