feat: Nixos-testbed is back
This commit is contained in:
@@ -1,18 +1,15 @@
|
|||||||
{ config, pkgs, lib, disko, sydnix-cli, ... }:
|
{ config, pkgs, lib, disko, sydnix-cli, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware.nix
|
||||||
./disko-config.nix
|
./disks.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
sydnix = {
|
sydnix = {
|
||||||
filesystemType = "btrfs";
|
filesystemType = "btrfs";
|
||||||
|
|
||||||
tailscale.enable = true;
|
|
||||||
dropbox.enable = false;
|
|
||||||
|
|
||||||
users.users = [
|
users.users = [
|
||||||
"crumb"
|
"lain"
|
||||||
];
|
];
|
||||||
|
|
||||||
impermanence = {
|
impermanence = {
|
||||||
@@ -27,29 +24,25 @@
|
|||||||
# just think it's annoying to edit ~/.ssh/known_hosts all the time.
|
# just think it's annoying to edit ~/.ssh/known_hosts all the time.
|
||||||
"/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 = false;
|
efi.canTouchEfiVariables = false;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
# VM-specific. }:3
|
|
||||||
fileSystems."/persist/dots" = {
|
fileSystems."/persist/dots" = {
|
||||||
device = "mount-dots";
|
device = "mount-dots";
|
||||||
fsType = "virtiofs";
|
fsType = "virtiofs";
|
||||||
mountPoint = "/persist/dots";
|
mountPoint = "/persist/dots";
|
||||||
};
|
};
|
||||||
|
|
||||||
# networking.hostName = "nixos-testbed";
|
|
||||||
networking.hostId = "238e9b1e"; # head -c 8 /etc/machine-id
|
networking.hostId = "238e9b1e"; # head -c 8 /etc/machine-id
|
||||||
|
|
||||||
time.timeZone = "America/Denver";
|
time.timeZone = "America/Denver";
|
||||||
@@ -58,31 +51,19 @@
|
|||||||
|
|
||||||
console = {
|
console = {
|
||||||
font = "Lat2-Terminus16";
|
font = "Lat2-Terminus16";
|
||||||
# keyMap = "us";
|
useXkbConfig = true; # Use xkb.options in TTY.
|
||||||
useXkbConfig = true; # use xkb.options in tty.
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.displayManager.sddm = {
|
|
||||||
enable = true;
|
|
||||||
wayland.enable = true;
|
|
||||||
autoNumlock = true;
|
|
||||||
};
|
|
||||||
# services.desktopManager.plasma6.enable = true;
|
|
||||||
|
|
||||||
services.xserver.xkb.layout = "us";
|
services.xserver.xkb.layout = "us";
|
||||||
services.xserver.xkb.options = "ctrl:swapcaps";
|
services.xserver.xkb.options = "ctrl:swapcaps";
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.neovim
|
pkgs.neovim
|
||||||
pkgs.git
|
pkgs.git
|
||||||
|
pkgs.waypipe
|
||||||
sydnix-cli.packages.x86_64-linux.default
|
sydnix-cli.packages.x86_64-linux.default
|
||||||
(import ../../scripts/port-tools { inherit pkgs; })
|
(import ../../scripts/port-tools { inherit pkgs; })
|
||||||
|
|
||||||
# Waypipe provides the equivalent of X11 forwarding for Wayland. This is a
|
|
||||||
# VM, so it's very handy.
|
|
||||||
pkgs.waypipe
|
|
||||||
pkgs.cachix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
@@ -91,17 +72,8 @@
|
|||||||
settings.X11Forwarding = true;
|
settings.X11Forwarding = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: Move to defaults.
|
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
|
|
||||||
# services.xserver.windowManager.qtile = {
|
|
||||||
# enable = true;
|
|
||||||
# extraPackages = python3Packages: with python3Packages; [
|
|
||||||
# qtile-extras
|
|
||||||
# hy
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
trusted-users = [
|
trusted-users = [
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
# sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode disko /persist/dots/hosts/nixos-testbed/disko-config.nix
|
# sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode disko /persist/dots/hosts/nixos-testbed/disko-config.nix
|
||||||
# time sudo nixos-install --flake /persist/dots#nixos-testbed
|
# time sudo nixos-install --flake /persist/dots#nixos-testbed
|
||||||
{ lib, ... }:
|
{ lib
|
||||||
|
, devices ? { bootroot = "/dev/vda"; }
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
# imports = [ disko.nixosModules.disko ];
|
# imports = [ disko.nixosModules.disko ];
|
||||||
boot.initrd.supportedFilesystems.btrfs = true;
|
boot.initrd.supportedFilesystems.btrfs = true;
|
||||||
@@ -13,9 +17,9 @@
|
|||||||
|
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
bootroot = {
|
testbed-bootroot = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev/sda";
|
device = devices.bootroot;
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
Reference in New Issue
Block a user