1
0
Fork 0

Update fluffy config

This commit is contained in:
maralorn 2021-12-05 05:11:17 +01:00
parent 2312db2e1f
commit cc29c2fbd3
4 changed files with 46 additions and 33 deletions

View file

@ -12,5 +12,6 @@ rec {
hera = nixos-21-11;
apollo = nixos-21-11;
zeus = nixos-21-11;
fluffy = nixos-21-11;
chor-cloud = hera;
}

View file

@ -133,6 +133,16 @@ in
./roles/state.nix
./roles/trusted-env.nix
];
fluffy = {
default = makeConfig "hera" ([
./roles/on-my-machine.nix
./roles/accounting.nix
./roles/mode-switching.nix
./roles/systemd-exporter.nix
./roles/headless.nix
./roles/state.nix
]);
};
hera = {
default = makeConfig "hera" (on-my-machines ++ [
./roles/fetch-banking-timer.nix

View file

@ -27,33 +27,33 @@ in
btrfsOptions = { options = [ "compress=zstd" "autodefrag" "noatime" ]; };
in
{
"/disk" = btrfsOptions;
"/disk" = { neededForBoot = true; } // btrfsOptions;
"/nix" = btrfsOptions;
};
environment.etc = {
# nixos.source = "/disk/persist/maralorn/git/config";
nixos.source = "/disk/persist/maralorn/git/config";
machine-id.source = "/disk/persist/machine-id";
};
#systemd.services."activate-home-manager" = {
# path = [ pkgs.nix pkgs.dbus ];
# script = ''
# if [[ -e /home/maralorn/.mode ]]; then
# MODE="$(cat /home/maralorn/.mode)"
# else
# MODE="orga"
# fi
# /disk/volatile/maralorn/modes/$MODE/activate
# '';
# serviceConfig = {
# Type = "oneshot";
# User = "maralorn";
# };
# wantedBy = [ "multi-user.target" ];
# # Try to avoid race conditions, when the user gets logged in before activation was completed.
# before = [ "display-manager.service" ];
#};
systemd.services."activate-home-manager" = {
path = [ pkgs.nix pkgs.dbus ];
script = ''
if [[ -e /home/maralorn/.mode ]]; then
MODE="$(cat /home/maralorn/.mode)"
else
MODE="default"
fi
/disk/volatile/maralorn/modes/$MODE/activate
'';
serviceConfig = {
Type = "oneshot";
User = "maralorn";
};
wantedBy = [ "multi-user.target" ];
# Try to avoid race conditions, when the user gets logged in before activation was completed.
before = [ "display-manager.service" ];
};
systemd.tmpfiles.rules = [
"d /disk/persist/root 700 root root - -"
@ -63,15 +63,18 @@ in
"Z /home/maralorn - maralorn users - -"
"d /disk/volatile/maralorn 700 maralorn users - -"
"d /disk/persist/var/lib/hass - - - - -"
"d /tmp/scans/scans 777 ftp ftp - -"
#"d /tmp/scans/scans 777 ftp ftp - -"
"L+ /var/lib/waydroid - - - - /disk/persist/var/lib/waydroid"
"L+ /root/.ssh - - - - /disk/persist/root/.ssh"
];
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
grub = {
device = "nodev";
efiSupport = true;
efiInstallAsRemovable = true;
};
};
initrd = {
luks.devices."crypted-nixos" = {
@ -88,7 +91,10 @@ in
networking = {
hostName = "fluffy";
domain = "lo.m-0.eu";
interfaces.enp1s0.useDHCP = true;
interfaces.enp1s0 = {
ipv6.addresses = [{ address = "fdc0:1::2"; prefixLength = 64; }];
useDHCP = true;
};
#wireguard.interfaces = {
# m0wire = {
# allowedIPsAsRoutes = false;
@ -106,7 +112,7 @@ in
# postSetup =
# [ "${pkgs.iproute}/bin/ip route add ${prefix}::/96 dev m0wire" ];
# };
};
#};
};
programs = {
@ -187,9 +193,6 @@ in
#boot.kernel.sysctl."fs.inotify.max_user_watches" = 204800;
console.keyMap = "neo";
networking.interfaces.enp1s0.useDHCP = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
@ -199,4 +202,3 @@ in
system.stateVersion = "21.11"; # Did you read the comment?
}

View file

@ -13,19 +13,19 @@
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/43AC-25F1";
{ device = "/dev/disk/by-uuid/C617-5CCC";
fsType = "vfat";
};
fileSystems."/disk" =
{ device = "/dev/disk/by-uuid/573176bd-8420-4174-a39c-0387c1ee1ac8";
{ device = "/dev/disk/by-uuid/9acbc122-e818-49fa-bc2e-de7d9f822d5a";
fsType = "btrfs";
};
boot.initrd.luks.devices."crypted-nixos".device = "/dev/disk/by-uuid/ceb2366c-099a-4ad1-b9b0-1bfa84189a6e";
boot.initrd.luks.devices."crypted-nixos".device = "/dev/disk/by-uuid/020fde09-f651-45a2-9c6a-9b060edf967d";
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/573176bd-8420-4174-a39c-0387c1ee1ac8";
{ device = "/dev/disk/by-uuid/9acbc122-e818-49fa-bc2e-de7d9f822d5a";
fsType = "btrfs";
options = [ "subvol=nix" ];
};