1
Fork 0

Cleaned up lapetus a bit

This commit is contained in:
Matei Adriel 2023-07-18 17:30:04 +03:00
parent cfb42f59c6
commit 98d6daf89e
No known key found for this signature in database
8 changed files with 60 additions and 64 deletions

View file

@ -25,21 +25,5 @@ in
crashReportingEnabled = false;
};
};
folders = {
"stellar-sanctum" = {
path = "/home/adrielus/Projects/stellar-sanctum/";
devices = [ "enceladus" ];
# TODO: remove this once I switch to zfs
versioning = {
type = "staggered";
params = {
cleanInterval = "3600"; # 1 hour in seconds
maxAge = "604800"; # 14 days in seconds.
};
};
};
};
};
}

View file

@ -1,61 +1,26 @@
{ config, ... }:
let
device = "/dev/sda";
disko = import ./partitions.nix {
disks = [ device ];
};
in
{
imports = [
../common/global
../common/users/adrielus.nix
../common/optional/slambda.nix
./services/syncthing.nix
./hardware-configuration.nix
disko
./zfs.nix
(import ./partitions.nix {
disks = [ "/dev/sda" ];
})
];
# Set the name of this machine!
# Machine ids
networking.hostName = "lapetus";
# ID required by zfs.
networking.hostId = "08357db3";
# Set machine id for log continuity
environment.etc.machine-id.text = "d9571439c8a34e34b89727b73bad3587";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.05";
# Configure ZFS
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.extraPools = [ "zroot" ];
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
boot.kernelParams = [ "nohibernate" ];
# We use non-legacy mountpoints
# See [this wiki link](https://nixos.wiki/wiki/ZFS)
# systemd.services.zfs-mount.enable = false;
# Roll back to blank snapshot on boot
# boot.initrd.postDeviceCommands = lib.mkAfter ''
# zfs rollback -r zroot@blank
# '';
# {{{ FileSystems
fileSystems =
let zfs = { neededForBoot = true; options = [ "zfsutil" ]; };
in
{
"/" = zfs;
"/nix" = zfs;
"/persist/data" = zfs;
"/persist/state" = zfs;
"/persist/local/cache" = zfs;
"/boot".neededForBoot = true;
};
# }}}
# Boot
# Bootloader
boot.loader.systemd-boot.enable = true;
}

View file

@ -0,0 +1,13 @@
{
fileSystems =
let zfs = { neededForBoot = true; options = [ "zfsutil" ]; };
in
{
"/" = zfs;
"/nix" = zfs;
"/persist/data" = zfs;
"/persist/state" = zfs;
"/persist/local/cache" = zfs;
"/boot".neededForBoot = true;
};
}

View file

@ -0,0 +1,9 @@
{
imports = [ ../../common/optional/syncthing.nix ];
services.syncthing = {
devices.lapetus.id = "";
folders = { };
};
}

View file

View file

@ -10,18 +10,16 @@
../common/optional/slambda.nix
../common/optional/xdg-portal.nix
../common/optional/hyprland.nix
../common/optional/syncthing.nix
../common/optional/gitea.nix
../common/optional/xmonad
./services/syncthing.nix
./hardware-configuration.nix
./boot.nix
];
# Set the name of this machine!
# Machine ids
networking.hostName = "tethys";
# Set machine id for log continuity
environment.etc.machine-id.text = "08357db3540c4cd2b76d4bb7f825ec88";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
@ -37,6 +35,7 @@
# }}}
# {{{ Ad-hoc stylix targets
# TODO: include this on all gui hosts
# TODO: is this useful outside of home-manager?
stylix.targets.gtk.enable = true;
# }}}
}

View file

@ -0,0 +1,23 @@
{
imports = [ ../../common/optional/syncthing.nix ];
services.syncthing = {
devices.tethys.id = "NGHX5G4-IY3ZXL2-NQMMRQV-2GDQLC6-LIDWSNG-DAJUAQH-KBAP64V-55K2LQ6";
folders = {
"stellar-sanctum" = {
path = "/home/adrielus/Projects/stellar-sanctum/";
devices = [ "enceladus" "lapetus" ];
# TODO: remove this once I switch to zfs
versioning = {
type = "staggered";
params = {
cleanInterval = "3600"; # 1 hour in seconds
maxAge = "604800"; # 14 days in seconds.
};
};
};
};
};
}

View file

@ -1,7 +1,10 @@
let
adrielus_tethys = builtins.readFile ./hosts/nixos/tethys/id_ed25519.pub;
tethys = builtins.readFile ./hosts/nixos/tethys/ssh_host_ed25519_key.pub;
lapetus = builtins.readFile ./hosts/nixos/lapetus/ssh_host_ed25519_key.pub;
adrielus_tethys = builtins.readFile ./hosts/nixos/tethys/id_ed25519.pub;
adrielus_lapetus = builtins.readFile ./hosts/nixos/lapetus/id_ed25519.pub;
all_hosts = [ tethys lapetus ];
in
{