1
0
Fork 0

Fix apollo-boot

This commit is contained in:
Malte Brandy 2019-08-02 19:03:36 +02:00
parent 60bfe70c96
commit 2a2c5369bb
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9
5 changed files with 173 additions and 169 deletions

View file

@ -54,8 +54,10 @@ in rec {
git -C ~/git/nixos/config pull
update-home
sudo -A update-system
sudo -A nix_collect_garbage --delete-older-than ${toString gcRetentionDays}d
nix optimise-store
sudo -A nix-collect-garbage --delete-older-than ${
toString gcRetentionDays
}d
sudo -A nix optimise-store
'';
rewlan = pkgs.writeShellScriptBin "rewlan" ''
nmcli r wifi off;
@ -167,4 +169,4 @@ in rec {
};
foreign-home-pkgs = extra-system-pkgs;
eventd = pkgs.callPackage ./eventd { };
}
}

View file

@ -2,15 +2,13 @@
let
secretsFile = "/var/lib/luks-secret/key";
secretsInitrd = "/boot/grub/secrets-initrd.gz";
in lib.mkIf (builtins.pathExists secretsFile) {
boot.initrd.luks.devices."root" = {
in {
boot.initrd.luks.devices."nixos" = {
fallbackToPassword = true;
keyFile = secretsFile;
};
# copy the secret into the additional initramfs. `null` means same path
boot.initrd.secrets."${secretsFile}" = null;
} // lib.mkIf
(config.boot.loader.grub.enable && config.boot.initrd.secrets != { }) {
boot.loader = {
supportsInitrdSecrets = lib.mkForce true;
grub.extraInitrd = secretsInitrd;

View file

@ -13,8 +13,6 @@ in {
./modules/loginctl-linger.nix
];
config = {
i18n = { defaultLocale = "en_US.UTF-8"; };
time.timeZone = "Europe/Berlin";
@ -42,8 +40,11 @@ in {
};
nix = {
binaryCaches =
[ "https://cache.nixos.org/" "https://nixcache.reflex-frp.org" ];
binaryCaches = [
"https://cache.nixos.org/"
"https://nixcache.reflex-frp.org"
"ssh://nix-ssh@hera.m-0.eu"
];
binaryCachePublicKeys =
[ "ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI=" ];
nixPath = [ "/etc/nix-path" ];
@ -71,5 +72,4 @@ in {
recommendedTlsSettings = true;
};
};
};
}

View file

@ -1,7 +1,6 @@
{ config, pkgs, lib, ... }:
let user = "maralorn";
in
{
in {
imports = [ ./init_ssh.nix ];
@ -31,4 +30,4 @@ in
optimise.automatic = true;
};
}
}

View file

@ -1,10 +1,15 @@
{ pkgs, config, lib, ... }:
{
{ pkgs, config, lib, ... }: {
imports = [ ./admin.nix ];
# 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 = {
defaultUserShell = pkgs.zsh;