Compare commits
No commits in common. "5a3dda7a106a9ccce540264e1455fe6888b51a02" and "543611983cd66449378ada55e33d6d0bff7a6e55" have entirely different histories.
5a3dda7a10
...
543611983c
15
flake.nix
15
flake.nix
|
@ -231,20 +231,7 @@
|
|||
|
||||
# for each hostname, for each user, generate an attribute "${user}@${hostname}"
|
||||
homeConfigurations =
|
||||
{
|
||||
"chayleaf@hysteria" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = mkPkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [ overlay ];
|
||||
};
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./home/hosts/remote.nix
|
||||
({ pkgs, ... }: { home.file.hysteria.source = pkgs.hysteria; })
|
||||
];
|
||||
};
|
||||
}
|
||||
// builtins.listToAttrs (builtins.concatLists
|
||||
builtins.listToAttrs (builtins.concatLists
|
||||
(lib.flip lib.mapAttrsToList config
|
||||
(hostname: { system, home ? {}, ... }:
|
||||
let
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{ inputs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../modules/general.nix
|
||||
inputs.nur.nixosModules.nur
|
||||
];
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
home.username = "chayleaf";
|
||||
home.homeDirectory = "/home/chayleaf";
|
||||
minimal = true;
|
||||
}
|
|
@ -99,10 +99,10 @@
|
|||
|
||||
# the following 4 values are special in some way
|
||||
# (e.g. even if you use -gx to set them, it won't work)
|
||||
set -U _tide_left_items context pwd git vi_mode
|
||||
set -U _tide_left_items pwd git vi_mode
|
||||
set -U _tide_prompt_69105 \x1b\x28B\x1b\x5bm\x1b\x28B\x1b\x5bm\x1b\x5b34m\x1b\x5b44m\x20\x40PWD\x40\x20\x1b\x5b34m\x1b\x5b40m\ue0b0\x1b\x5b32m\x1b\x5b40m\x20\u276f\x20\x1b\x28B\x1b\x5bm\x1b\x28B\x1b\x5bm\x1b\x5b30m\ue0b0 \x1b\x28B\x1b\x5bm\x1b\x28B\x1b\x5bm\x1b\x5b30m\ue0b2\x1b\x5b32m\x1b\x5b40m\x20\uf00c\x20\x1b\x5b33m\x1b\x5b40m\ue0b2\x1b\x5b30m\x1b\x5b43m\x2021m\x2023s\x20\x1b\x28B\x1b\x5bm\x1b\x28B\x1b\x5bm\x1b\x5b33m
|
||||
set -U _tide_prompt_79899 \x1b\x28B\x1b\x5bm\x1b\x28B\x1b\x5bm\x1b\x5b34m\x1b\x5b44m\x20\x40PWD\x40\x20\x1b\x5b34m\x1b\x5b40m\ue0b0\x1b\x5b32m\x1b\x5b40m\x20\u276f\x20\x1b\x28B\x1b\x5bm\x1b\x28B\x1b\x5bm\x1b\x5b30m\ue0b0 \x1b\x28B\x1b\x5bm\x1b\x28B\x1b\x5bm\x1b\x5b30m\ue0b2\x1b\x5b32m\x1b\x5b40m\x20\uf00c\x20\x1b\x5b33m\x1b\x5b40m\ue0b2\x1b\x5b30m\x1b\x5b43m\x2015s\x20\x1b\x28B\x1b\x5bm\x1b\x28B\x1b\x5bm\x1b\x5b33m
|
||||
set -U _tide_right_items status cmd_duration jobs rustc nix_shell
|
||||
set -U _tide_right_items status cmd_duration context jobs rustc nix_shell
|
||||
|
||||
# for the following values, -gx works too (-g doesn't)
|
||||
# but it pollutes children's env, so do -U
|
||||
|
@ -160,7 +160,7 @@
|
|||
set -U tide_kubectl_color black
|
||||
set -U tide_kubectl_icon \u2388
|
||||
set -U tide_left_prompt_frame_enabled false
|
||||
set -U tide_left_prompt_items context pwd git vi_mode
|
||||
set -U tide_left_prompt_items pwd git vi_mode
|
||||
set -U tide_left_prompt_prefix
|
||||
set -U tide_left_prompt_separator_diff_color \ue0b0
|
||||
set -U tide_left_prompt_separator_same_color \ue0b1
|
||||
|
@ -195,7 +195,7 @@
|
|||
set -U tide_pwd_icon_unwritable \uf023
|
||||
set -U tide_pwd_markers \x2ebzr \x2ecitc \x2egit \x2ehg \x2enode\x2dversion \x2epython\x2dversion \x2eruby\x2dversion \x2eshorten_folder_marker \x2esvn \x2eterraform Cargo\x2etoml composer\x2ejson CVS go\x2emod package\x2ejson
|
||||
set -U tide_right_prompt_frame_enabled false
|
||||
set -U tide_right_prompt_items status cmd_duration jobs node rustc java php go kubectl toolbox terraform aws nix_shell crystal
|
||||
set -U tide_right_prompt_items status cmd_duration context jobs node rustc java php go kubectl toolbox terraform aws nix_shell crystal
|
||||
set -U tide_right_prompt_prefix \ue0b2
|
||||
set -U tide_right_prompt_separator_diff_color \ue0b2
|
||||
set -U tide_right_prompt_separator_same_color \ue0b3
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
./zsh.nix
|
||||
./fish.nix
|
||||
];
|
||||
manual.json.enable = !config.minimal;
|
||||
manual.json.enable = true;
|
||||
services.gpg-agent = {
|
||||
enable = !config.minimal;
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
maxCacheTtl = 72000;
|
||||
maxCacheTtlSsh = 72000;
|
||||
|
@ -65,14 +65,14 @@
|
|||
extraPackages = with pkgs; [
|
||||
# utils
|
||||
gnused mktemp fzf coreutils-full findutils xdg-utils gnupg whois curl
|
||||
file mediainfo unzip gnutar man rclone
|
||||
file mediainfo unzip gnutar man rclone sshfs trash-cli
|
||||
# for preview
|
||||
# exa - TODO: replace with eza wrapper?
|
||||
bat libarchive atool glow
|
||||
bat
|
||||
libarchive atool
|
||||
glow w3m
|
||||
# for opening
|
||||
p7zip unrar-wrapper
|
||||
] ++ lib.optionals (!config.minimal) [
|
||||
odt2txt w3m sshfs trash-cli
|
||||
p7zip unrar-wrapper odt2txt
|
||||
];
|
||||
plugins = {
|
||||
src = pluginSrc;
|
||||
|
@ -92,14 +92,14 @@
|
|||
home-manager.enable = true;
|
||||
# i only use this as a login shell
|
||||
bash = {
|
||||
enable = !config.minimal;
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
bind -x '"\C-r": __atuin_history'
|
||||
export ATUIN_NOBIND=true
|
||||
'';
|
||||
};
|
||||
git = {
|
||||
enable = !config.minimal;
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
delta.enable = true;
|
||||
extraConfig = {
|
||||
|
@ -135,7 +135,7 @@
|
|||
};
|
||||
};
|
||||
ssh = {
|
||||
enable = !config.minimal;
|
||||
enable = true;
|
||||
compression = true;
|
||||
};
|
||||
tmux = {
|
||||
|
@ -145,7 +145,7 @@
|
|||
keyMode = "vi";
|
||||
};
|
||||
gpg = {
|
||||
enable = !config.minimal;
|
||||
enable = true;
|
||||
homedir = "${config.xdg.dataHome}/gnupg";
|
||||
mutableKeys = true;
|
||||
mutableTrust = true;
|
||||
|
@ -156,7 +156,7 @@
|
|||
variables.show-mode-in-prompt = true;
|
||||
};
|
||||
nix-index = {
|
||||
enable = !config.minimal;
|
||||
enable = true;
|
||||
# don't add pkgs.nix to PATH
|
||||
# use the nix that's already in PATH
|
||||
# (because I use nix plugins and plugins are nix version-specific)
|
||||
|
@ -168,38 +168,31 @@
|
|||
# vimKeys = true;
|
||||
#};
|
||||
alot = {
|
||||
enable = !config.minimal;
|
||||
enable = true;
|
||||
settings = {
|
||||
handle_mouse = true;
|
||||
initial_command = "search tag:inbox AND NOT tag:killed";
|
||||
prefer_plaintext = true;
|
||||
};
|
||||
};
|
||||
msmtp.enable = !config.minimal;
|
||||
msmtp.enable = true;
|
||||
notmuch = {
|
||||
enable = !config.minimal;
|
||||
enable = true;
|
||||
hooks.preNew = ''
|
||||
${config.services.mbsync.package}/bin/mbsync --all || ${pkgs.coreutils}/bin/true
|
||||
'';
|
||||
};
|
||||
mbsync.enable = !config.minimal;
|
||||
mbsync.enable = true;
|
||||
};
|
||||
#services.mbsync.enable = true;
|
||||
# TODO: see https://github.com/pazz/alot/issues/1632
|
||||
home.file.".mailcap" = lib.mkIf (!config.minimal) {
|
||||
text = ''
|
||||
text/html; ${pkgs.w3m}/bin/w3m -dump -o document_charset=%{charset} -o display_link_number=1 '%s'; nametemplate=%s.html; copiousoutput
|
||||
'';
|
||||
};
|
||||
home.file.".mailcap".text = ''
|
||||
text/html; ${pkgs.w3m}/bin/w3m -dump -o document_charset=%{charset} -o display_link_number=1 '%s'; nametemplate=%s.html; copiousoutput
|
||||
'';
|
||||
|
||||
home.file.".cache/nix-index/files" = lib.mkIf (!config.minimal) {
|
||||
source =
|
||||
assert config.xdg.cacheHome == "${config.home.homeDirectory}/.cache";
|
||||
inputs.nix-index-database.packages.${pkgs.system}.nix-index-database;
|
||||
};
|
||||
home.file.".cache/nix-index/files".source = assert config.xdg.cacheHome == "${config.home.homeDirectory}/.cache"; inputs.nix-index-database.packages.${pkgs.system}.nix-index-database;
|
||||
|
||||
systemd.user.tmpfiles.rules = lib.mkIf (!config.minimal)
|
||||
(builtins.map (file: "r! \"/home/${config.home.username}/${file}\"") [
|
||||
systemd.user.tmpfiles.rules = builtins.map (file: "r! \"/home/${config.home.username}/${file}\"") [
|
||||
".local/share/clipman.json"
|
||||
".local/state/lesshst" # I don't need less search history to persist across boots...
|
||||
".Xauthority"
|
||||
|
@ -308,14 +301,12 @@
|
|||
] ++ builtins.map (dir: "x \"/home/${config.home.username}/${dir}/\"") [
|
||||
# WHY DOES THIS KEEP PART OF THE CONFIG
|
||||
".cache/keepassxc"
|
||||
]);
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
rclone sshfs fuse
|
||||
file jq python3Full killall
|
||||
comma nix-output-monitor
|
||||
appimage-run comma nix-output-monitor
|
||||
unzip p7zip unrar-wrapper
|
||||
] ++ lib.optionals (!config.minimal) [
|
||||
appimage-run
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{ lib, config, ... }:
|
||||
with lib; {
|
||||
options.minimal = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
options.phone = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = !config.minimal;
|
||||
enable = true;
|
||||
# zsh-autosuggestions
|
||||
autosuggestion.enable = true;
|
||||
# zsh-syntax-highlighting
|
||||
|
|
|
@ -35,7 +35,7 @@ in
|
|||
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||
};
|
||||
|
||||
# as expected, systemd initrd didn't work well, and i really cba to debug it
|
||||
# as expected, systemd initrd and networking didn't work well, and i really cba to debug it
|
||||
networking.useDHCP = false;
|
||||
networking.useNetworkd = true;
|
||||
systemd.network = {
|
||||
|
@ -50,22 +50,46 @@ in
|
|||
networks."10-dhcp" = {
|
||||
DHCP = "yes";
|
||||
name = "e*";
|
||||
networkConfig.IPv6AcceptRA = "yes";
|
||||
networkConfig = {
|
||||
IPv6AcceptRA = "yes";
|
||||
};
|
||||
dhcpV4Config = {
|
||||
ClientIdentifier = "mac";
|
||||
DUIDType = "link-layer";
|
||||
};
|
||||
dhcpV6Config.DUIDType = "link-layer";
|
||||
dhcpV6Config = {
|
||||
DUIDType = "link-layer";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd = {
|
||||
/*systemd = {
|
||||
enable = true;
|
||||
network = {
|
||||
enable = true;
|
||||
links."10-mac" = {
|
||||
matchConfig.OriginalName = "e*";
|
||||
linkConfig = {
|
||||
MACAddressPolicy = "none";
|
||||
MACAddress = router-config.router-settings.serverInitrdMac;
|
||||
};
|
||||
};
|
||||
networks."10-dhcp" = {
|
||||
DHCP = "yes";
|
||||
name = "e*";
|
||||
};
|
||||
};
|
||||
};*/
|
||||
# eth0 on some kernels
|
||||
# end0 on other kernels
|
||||
# sometimes even version dependent
|
||||
preLVMCommands = lib.mkOrder 499 ''
|
||||
ip link set end0 address ${router-config.router-settings.serverInitrdMac} || ip link set eth0 address ${router-config.router-settings.serverInitrdMac} || true
|
||||
'';
|
||||
# postMountCommands = ''
|
||||
# ip link set end0 address ${router-config.router-settings.serverMac} || ip link set eth0 address ${router-config.router-settings.serverMac} || true
|
||||
# '';
|
||||
network.enable = true;
|
||||
network.flushBeforeStage2 = true;
|
||||
network.udhcpc.enable = true;
|
||||
|
@ -78,6 +102,7 @@ in
|
|||
"/secrets/initrd/ssh_host_rsa_key"
|
||||
"/secrets/initrd/ssh_host_ed25519_key"
|
||||
];
|
||||
# shell = "/bin/cryptsetup-askpass";
|
||||
};
|
||||
luks.devices.cryptroot = {
|
||||
device = parts.enc;
|
||||
|
|
Loading…
Reference in a new issue