wip: feat: Add host deertopia

This commit is contained in:
Madeleine Sydney
2025-01-17 19:57:17 -07:00
parent b86ba2081a
commit 34adb5c26e
8 changed files with 58 additions and 14 deletions

View File

@@ -1,19 +1,20 @@
{ config, pkgs, lib, disko, sydnix-cli, ... }:
{ config, pkgs, lib, disko, /* sydnix-cli, */ ... }:
{
imports = [
./hardware-configuration.nix
./disko-config.nix
./services.nix
];
sydnix = {
filesystemType = "btrfs";
users.users = [
"hause"
"arisu"
];
impermanence = {
# enable = true;
enable = true;
directories = [
# "Warning: Neither /var/lib/nixos nor any of its parents are persisted.
# This means all users/groups without specified uids/gids will have them
@@ -25,18 +26,16 @@
"/etc/ssh"
];
rollback = {
# enable = true;
enable = true;
device = "/dev/sda2";
subvolume = "rootfs";
};
};
};
boot = {
loader = {
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = false;
};
efi.canTouchEfiVariables = true;
};
time.timeZone = "America/Denver";
@@ -55,7 +54,7 @@
environment.systemPackages = with pkgs; [
neovim
git
sydnix-cli.packages.x86_64-linux.default
# sydnix-cli.packages.x86_64-linux.default
];
services.openssh.enable = true;

View File

@@ -0,0 +1,26 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -0,0 +1,7 @@
{ utils, ... }:
{
imports =
map (x: ./services/${x})
(utils.listNixFilesInDirectory ./services);
}

View File

@@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
{
sydnix.sops = {
enable = true;
keyFile = "/persist/vault/root/deertopia-key";
};
# services.nextcloud = {
# };
}

1
hosts/deertopia/system.nix Executable file
View File

@@ -0,0 +1 @@
"x86_64-linux"

View File

@@ -62,6 +62,10 @@ in {
z.group = "users";
z.mode = "2775";
};
"${cfg.persistDirectory}/vault/root" = {
z.group = "root";
z.mode = "2775";
};
};
# TODO: Move this somewhere else.

View File

@@ -13,10 +13,6 @@
];
sydnix = {
sops = {
# enable = true;
keyFile = "/persist/vault/${config.home.username}/keys/primary";
};
};
# Don't touch!