Fix apollo-boot
This commit is contained in:
parent
60bfe70c96
commit
2a2c5369bb
5 changed files with 173 additions and 169 deletions
|
@ -54,8 +54,10 @@ in rec {
|
||||||
git -C ~/git/nixos/config pull
|
git -C ~/git/nixos/config pull
|
||||||
update-home
|
update-home
|
||||||
sudo -A update-system
|
sudo -A update-system
|
||||||
sudo -A nix_collect_garbage --delete-older-than ${toString gcRetentionDays}d
|
sudo -A nix-collect-garbage --delete-older-than ${
|
||||||
nix optimise-store
|
toString gcRetentionDays
|
||||||
|
}d
|
||||||
|
sudo -A nix optimise-store
|
||||||
'';
|
'';
|
||||||
rewlan = pkgs.writeShellScriptBin "rewlan" ''
|
rewlan = pkgs.writeShellScriptBin "rewlan" ''
|
||||||
nmcli r wifi off;
|
nmcli r wifi off;
|
||||||
|
@ -167,4 +169,4 @@ in rec {
|
||||||
};
|
};
|
||||||
foreign-home-pkgs = extra-system-pkgs;
|
foreign-home-pkgs = extra-system-pkgs;
|
||||||
eventd = pkgs.callPackage ./eventd { };
|
eventd = pkgs.callPackage ./eventd { };
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,15 +2,13 @@
|
||||||
let
|
let
|
||||||
secretsFile = "/var/lib/luks-secret/key";
|
secretsFile = "/var/lib/luks-secret/key";
|
||||||
secretsInitrd = "/boot/grub/secrets-initrd.gz";
|
secretsInitrd = "/boot/grub/secrets-initrd.gz";
|
||||||
in lib.mkIf (builtins.pathExists secretsFile) {
|
in {
|
||||||
boot.initrd.luks.devices."root" = {
|
boot.initrd.luks.devices."nixos" = {
|
||||||
fallbackToPassword = true;
|
fallbackToPassword = true;
|
||||||
keyFile = secretsFile;
|
keyFile = secretsFile;
|
||||||
};
|
};
|
||||||
# copy the secret into the additional initramfs. `null` means same path
|
# copy the secret into the additional initramfs. `null` means same path
|
||||||
boot.initrd.secrets."${secretsFile}" = null;
|
boot.initrd.secrets."${secretsFile}" = null;
|
||||||
} // lib.mkIf
|
|
||||||
(config.boot.loader.grub.enable && config.boot.initrd.secrets != { }) {
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
supportsInitrdSecrets = lib.mkForce true;
|
supportsInitrdSecrets = lib.mkForce true;
|
||||||
grub.extraInitrd = secretsInitrd;
|
grub.extraInitrd = secretsInitrd;
|
||||||
|
|
|
@ -13,8 +13,6 @@ in {
|
||||||
./modules/loginctl-linger.nix
|
./modules/loginctl-linger.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
|
||||||
|
|
||||||
i18n = { defaultLocale = "en_US.UTF-8"; };
|
i18n = { defaultLocale = "en_US.UTF-8"; };
|
||||||
|
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
@ -42,8 +40,11 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
binaryCaches =
|
binaryCaches = [
|
||||||
[ "https://cache.nixos.org/" "https://nixcache.reflex-frp.org" ];
|
"https://cache.nixos.org/"
|
||||||
|
"https://nixcache.reflex-frp.org"
|
||||||
|
"ssh://nix-ssh@hera.m-0.eu"
|
||||||
|
];
|
||||||
binaryCachePublicKeys =
|
binaryCachePublicKeys =
|
||||||
[ "ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=" ];
|
[ "ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=" ];
|
||||||
nixPath = [ "/etc/nix-path" ];
|
nixPath = [ "/etc/nix-path" ];
|
||||||
|
@ -71,5 +72,4 @@ in {
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let user = "maralorn";
|
let user = "maralorn";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
|
|
||||||
imports = [ ./init_ssh.nix ];
|
imports = [ ./init_ssh.nix ];
|
||||||
|
|
||||||
|
@ -31,4 +30,4 @@ in
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }: {
|
||||||
{
|
|
||||||
|
|
||||||
imports = [ ./admin.nix ];
|
imports = [ ./admin.nix ];
|
||||||
|
|
||||||
# So that boot does not fill up with old kernels
|
# So that boot does not fill up with old kernels
|
||||||
boot.loader.grub.configurationLimit = 5;
|
boot.loader = {
|
||||||
|
timeout = 0;
|
||||||
|
grub = {
|
||||||
|
backgroundColor = "#000000";
|
||||||
|
configurationLimit = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
defaultUserShell = pkgs.zsh;
|
defaultUserShell = pkgs.zsh;
|
||||||
|
|
Loading…
Reference in a new issue