Cleaned up lapetus a bit
This commit is contained in:
parent
cfb42f59c6
commit
98d6daf89e
|
@ -25,21 +25,5 @@ in
|
||||||
crashReportingEnabled = false;
|
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.
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,61 +1,26 @@
|
||||||
{ config, ... }:
|
|
||||||
let
|
|
||||||
device = "/dev/sda";
|
|
||||||
disko = import ./partitions.nix {
|
|
||||||
disks = [ device ];
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../common/global
|
../common/global
|
||||||
../common/users/adrielus.nix
|
../common/users/adrielus.nix
|
||||||
../common/optional/slambda.nix
|
../common/optional/slambda.nix
|
||||||
|
|
||||||
|
./services/syncthing.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
disko
|
./zfs.nix
|
||||||
|
|
||||||
|
(import ./partitions.nix {
|
||||||
|
disks = [ "/dev/sda" ];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
# Set the name of this machine!
|
# Machine ids
|
||||||
networking.hostName = "lapetus";
|
networking.hostName = "lapetus";
|
||||||
|
|
||||||
# ID required by zfs.
|
|
||||||
networking.hostId = "08357db3";
|
networking.hostId = "08357db3";
|
||||||
|
|
||||||
# Set machine id for log continuity
|
|
||||||
environment.etc.machine-id.text = "d9571439c8a34e34b89727b73bad3587";
|
environment.etc.machine-id.text = "d9571439c8a34e34b89727b73bad3587";
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
# Configure ZFS
|
# Bootloader
|
||||||
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
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
}
|
}
|
||||||
|
|
13
hosts/nixos/lapetus/filesystems.nix
Normal file
13
hosts/nixos/lapetus/filesystems.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
9
hosts/nixos/lapetus/services/syncthing.nix
Normal file
9
hosts/nixos/lapetus/services/syncthing.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
imports = [ ../../common/optional/syncthing.nix ];
|
||||||
|
|
||||||
|
services.syncthing = {
|
||||||
|
devices.lapetus.id = "";
|
||||||
|
|
||||||
|
folders = { };
|
||||||
|
};
|
||||||
|
}
|
0
hosts/nixos/lapetus/zfs.nix
Normal file
0
hosts/nixos/lapetus/zfs.nix
Normal file
|
@ -10,18 +10,16 @@
|
||||||
../common/optional/slambda.nix
|
../common/optional/slambda.nix
|
||||||
../common/optional/xdg-portal.nix
|
../common/optional/xdg-portal.nix
|
||||||
../common/optional/hyprland.nix
|
../common/optional/hyprland.nix
|
||||||
../common/optional/syncthing.nix
|
|
||||||
../common/optional/gitea.nix
|
../common/optional/gitea.nix
|
||||||
../common/optional/xmonad
|
../common/optional/xmonad
|
||||||
|
|
||||||
|
./services/syncthing.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./boot.nix
|
./boot.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Set the name of this machine!
|
# Machine ids
|
||||||
networking.hostName = "tethys";
|
networking.hostName = "tethys";
|
||||||
|
|
||||||
# Set machine id for log continuity
|
|
||||||
environment.etc.machine-id.text = "08357db3540c4cd2b76d4bb7f825ec88";
|
environment.etc.machine-id.text = "08357db3540c4cd2b76d4bb7f825ec88";
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
|
@ -37,6 +35,7 @@
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ Ad-hoc stylix targets
|
# {{{ Ad-hoc stylix targets
|
||||||
# TODO: include this on all gui hosts
|
# TODO: include this on all gui hosts
|
||||||
|
# TODO: is this useful outside of home-manager?
|
||||||
stylix.targets.gtk.enable = true;
|
stylix.targets.gtk.enable = true;
|
||||||
# }}}
|
# }}}
|
||||||
}
|
}
|
||||||
|
|
23
hosts/nixos/tethys/services/syncthing.nix
Normal file
23
hosts/nixos/tethys/services/syncthing.nix
Normal 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.
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,7 +1,10 @@
|
||||||
let
|
let
|
||||||
adrielus_tethys = builtins.readFile ./hosts/nixos/tethys/id_ed25519.pub;
|
|
||||||
tethys = builtins.readFile ./hosts/nixos/tethys/ssh_host_ed25519_key.pub;
|
tethys = builtins.readFile ./hosts/nixos/tethys/ssh_host_ed25519_key.pub;
|
||||||
lapetus = builtins.readFile ./hosts/nixos/lapetus/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 ];
|
all_hosts = [ tethys lapetus ];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue