Compare commits

..
3 Commits
Author SHA1 Message Date
hektor 8b6d8bd092 refactor: clean up redundant settings
check / lint (push) Successful in 47s
2026-08-24 20:04:42 +02:00
hektor 7c283c61c4 refactor: extract home directory path into 'home' 2026-08-24 20:04:36 +02:00
hektor 385c26f3a0 fix(astyanax): resolve network error on rebuild 2026-08-24 19:36:19 +02:00
7 changed files with 18 additions and 32 deletions
+4 -4
View File
@@ -7,7 +7,7 @@
let
cfg = config.shell.bash;
inherit (config.home) username;
inherit (config.home) homeDirectory;
in
{
options.shell.bash = {
@@ -54,12 +54,12 @@ in
];
initExtra = ''
for f in /home/${username}/.bashrc.d/*; do
for f in ${homeDirectory}/.bashrc.d/*; do
[ -f "$f" ] && source "$f"
done
${lib.optionalString cfg.aliases.all "source /home/${username}/.bash_aliases/all"}
${lib.optionalString cfg.aliases.lang-js "source /home/${username}/.bash_aliases/lang-js"}
${lib.optionalString cfg.aliases.all "source ${homeDirectory}/.bash_aliases/all"}
${lib.optionalString cfg.aliases.lang-js "source ${homeDirectory}/.bash_aliases/lang-js"}
${cfg.extraInit}
'';
+4 -1
View File
@@ -101,10 +101,13 @@ in
useNetworkd = true;
};
systemd.network.networks."40-wlan0" = {
systemd.network = {
networks."40-wlan0" = {
matchConfig.Name = "wlan0";
networkConfig.DHCP = "yes";
};
wait-online.anyInterface = true;
};
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
+1 -10
View File
@@ -59,16 +59,7 @@ in
git
];
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
"@wheel"
];
};
nix.settings.trusted-users = [ "@wheel" ];
system.stateVersion = "26.05";
}
+1 -10
View File
@@ -112,16 +112,7 @@ in
git
];
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
"@wheel"
];
};
nix.settings.trusted-users = [ "@wheel" ];
system.stateVersion = "26.05";
}
+4 -3
View File
@@ -2,12 +2,13 @@
let
inherit (config.host) username;
home = config.users.users.${username}.home;
in
{
config = lib.mkIf config.ssh.enable {
system.activationScripts.extractSshKeys = lib.stringAfter [ "etc" ] ''
HOST_KEY="/etc/ssh/ssh_host_ed25519_key.pub"
HOST_DIR="/home/${username}/nix/hosts/${config.networking.hostName}"
HOST_DIR="${home}/nix/hosts/${config.networking.hostName}"
if [ -f "$HOST_KEY" ] && [ -d "$HOST_DIR" ]; then
cp "$HOST_KEY" "$HOST_DIR/ssh_host.pub"
@@ -17,8 +18,8 @@ in
USER_KEY=""
for candidate in \
"/home/${username}/.ssh/id_ed25519_sk.pub" \
"/home/${username}/.ssh/id_ed25519.pub"; do
"${home}/.ssh/id_ed25519_sk.pub" \
"${home}/.ssh/id_ed25519.pub"; do
if [ -f "$candidate" ]; then
USER_KEY="$candidate"
break
-1
View File
@@ -5,6 +5,5 @@
config = lib.mkIf config.storage.enable {
services.udisks2.enable = true;
boot.zfs.forceImportRoot = false;
};
}
+2 -1
View File
@@ -3,6 +3,7 @@
let
cfg = config.syncthing;
inherit (config.host) username;
home = config.users.users.${username}.home;
deviceRegistry = import ./devices.nix;
deviceName = lib.types.enum (builtins.attrNames deviceRegistry);
@@ -48,7 +49,7 @@ in
enable = true;
user = username;
group = username;
configDir = "/home/${username}/.local/state/syncthing";
configDir = "${home}/.local/state/syncthing";
openDefaultPorts = true;
settings = {
devices = lib.mapAttrs (_: id: { inherit id; }) (lib.getAttrs referencedDevices deviceRegistry);