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 = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./disko-config.nix ./disko-config.nix
./services.nix
]; ];
sydnix = { sydnix = {
filesystemType = "btrfs"; filesystemType = "btrfs";
users.users = [ users.users = [
"hause" "arisu"
]; ];
impermanence = { impermanence = {
# enable = true; enable = true;
directories = [ directories = [
# "Warning: Neither /var/lib/nixos nor any of its parents are persisted. # "Warning: Neither /var/lib/nixos nor any of its parents are persisted.
# This means all users/groups without specified uids/gids will have them # This means all users/groups without specified uids/gids will have them
@@ -25,18 +26,16 @@
"/etc/ssh" "/etc/ssh"
]; ];
rollback = { rollback = {
# enable = true; enable = true;
device = "/dev/sda2"; device = "/dev/sda2";
subvolume = "rootfs"; subvolume = "rootfs";
}; };
}; };
}; };
boot = { boot.loader = {
loader = { systemd-boot.enable = true;
systemd-boot.enable = true; efi.canTouchEfiVariables = true;
efi.canTouchEfiVariables = false;
};
}; };
time.timeZone = "America/Denver"; time.timeZone = "America/Denver";
@@ -55,7 +54,7 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
neovim neovim
git git
sydnix-cli.packages.x86_64-linux.default # sydnix-cli.packages.x86_64-linux.default
]; ];
services.openssh.enable = true; 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.group = "users";
z.mode = "2775"; z.mode = "2775";
}; };
"${cfg.persistDirectory}/vault/root" = {
z.group = "root";
z.mode = "2775";
};
}; };
# TODO: Move this somewhere else. # TODO: Move this somewhere else.

View File

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