164 lines
4 KiB
Nix
164 lines
4 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.xyno.presets.cli;
|
|
in
|
|
{
|
|
options.xyno.presets.cli.enable =
|
|
lib.mkEnableOption "enables xynos cli config with fish and helix and stuff";
|
|
config = lib.mkIf cfg.enable {
|
|
home-manager.users.${config.xyno.system.user.name} =
|
|
lib.mkIf config.xyno.presets.home-manager.enable
|
|
(
|
|
{ ... }:
|
|
{
|
|
xyno.helix.enable = true;
|
|
home.sessionVariables.LOCALE_ARCHIVE_2_27 = lib.mkForce "/run/current-system/sw/lib/locale/locale-archive";
|
|
systemd.user.sessionVariables.LOCALE_ARCHIVE_2_27 = lib.mkForce "/run/current-system/sw/lib/locale/locale-archive";
|
|
}
|
|
);
|
|
|
|
xyno.cli.fish.enable = true;
|
|
xyno.cli.starship.enable = true;
|
|
xyno.cli.tmux.enable = true;
|
|
security.sudo.enable = false;
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
i18n.extraLocaleSettings = {
|
|
LC_CTYPE = "en_US.UTF-8";
|
|
LC_ADDRESS = "de_DE.UTF-8";
|
|
LC_MEASUREMENT = "de_DE.UTF-8";
|
|
LC_MESSAGES = "en_US.UTF-8";
|
|
LC_MONETARY = "de_DE.UTF-8";
|
|
LC_NAME = "de_DE.UTF-8";
|
|
LC_NUMERIC = "en_US.UTF-8";
|
|
LC_PAPER = "de_DE.UTF-8";
|
|
LC_TELEPHONE = "de_DE.UTF-8";
|
|
LC_TIME = "en_DK.UTF-8";
|
|
LC_COLLATE = "de_DE.UTF-8";
|
|
};
|
|
|
|
nix.settings = {
|
|
substituters = [
|
|
# "https://cache.lix.systems"
|
|
# "https://helix.cachix.org"
|
|
];
|
|
trusted-public-keys = [
|
|
# "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
|
|
# "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
|
|
];
|
|
trusted-users = lib.mkDefault [
|
|
"root"
|
|
"@wheel"
|
|
];
|
|
allowed-users = lib.mkDefault [
|
|
"root"
|
|
"@wheel"
|
|
];
|
|
auto-optimise-store = true;
|
|
|
|
};
|
|
nix.extraOptions = "experimental-features = nix-command flakes";
|
|
programs.nh.enable = true;
|
|
programs.direnv = {
|
|
enable = true;
|
|
nix-direnv.enable = true;
|
|
enableFishIntegration = true;
|
|
};
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/361592 needed for run0
|
|
security.pam.services.systemd-run0 = { };
|
|
|
|
programs.yazi = {
|
|
enable = true;
|
|
initLua = pkgs.writeText "yazi-init.lua" ''
|
|
function Linemode:size_and_mtime()
|
|
local time = math.floor(self._file.cha.mtime or 0)
|
|
if time == 0 then
|
|
time = ""
|
|
elseif os.date("%Y", time) == os.date("%Y") then
|
|
time = os.date("%b %d %H:%M", time)
|
|
else
|
|
time = os.date("%b %d %Y", time)
|
|
end
|
|
|
|
local size = self._file:size()
|
|
return string.format("%s %s", size and ya.readable_size(size) or "-", time)
|
|
end
|
|
'';
|
|
settings.yazi = {
|
|
mgr = {
|
|
sort_by = "mtime";
|
|
linemode = "size_and_mtime";
|
|
sort_reverse = true;
|
|
sort_dir_first = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
services.pcscd.enable = true;
|
|
programs.gnupg.agent = {
|
|
enable = true;
|
|
# pinentrywlavor = "curses";
|
|
# enableSSHSupport = true;
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
(pkgs.writeShellScriptBin "sudo" "run0 $@")
|
|
aria2
|
|
openssl
|
|
bat
|
|
bottom
|
|
curl
|
|
croc
|
|
comma
|
|
dig
|
|
fd
|
|
ffmpeg
|
|
file
|
|
fzf
|
|
git
|
|
helix
|
|
htop
|
|
imagemagick
|
|
jq
|
|
lm_sensors
|
|
moar
|
|
neofetch
|
|
nix-output-monitor
|
|
poppler
|
|
pv
|
|
ripgrep
|
|
w3m
|
|
unstable.yt-dlp
|
|
gallery-dl
|
|
p7zip
|
|
ncdu
|
|
];
|
|
programs.mosh.enable = true;
|
|
environment.variables.EDITOR = "hx";
|
|
environment.variables.VISUAL = "hx";
|
|
environment.variables.PAGER = "moar";
|
|
|
|
environment.shellAliases = {
|
|
l = "ls -alh";
|
|
n = "y";
|
|
gc = "git commit -v";
|
|
gpl = "git pull";
|
|
gd = "git diff";
|
|
ga = "git add";
|
|
gp = "git push";
|
|
gpf = "git push --force-with-lease";
|
|
gs = "git status -v";
|
|
gl = "git log --graph";
|
|
p = "cd ~/proj";
|
|
ytl = ''yt-dlp -f "bv*+mergeall[vcodec=none]" --audio-multistreams'';
|
|
sudo = "run0";
|
|
less = "moar";
|
|
};
|
|
};
|
|
}
|