nixfiles/nixos/boxes/colony.nix

64 lines
1.5 KiB
Nix
Raw Normal View History

2022-02-13 13:10:21 +00:00
{
nixos.systems.colony = {
system = "x86_64-linux";
nixpkgs = "stable";
home-manager = "unstable";
docCustom = false;
2022-02-19 22:55:53 +00:00
configuration = { lib, pkgs, modulesPath, config, ... }:
let
inherit (lib) mkIf;
in
{
imports = [ "${modulesPath}/profiles/qemu-guest.nix" ];
2022-02-13 23:06:31 +00:00
my = {
2022-02-22 00:59:57 +00:00
secrets = {
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINkqdN5t3UKwrNOOPKlbnG1WYhnkV5H9luAzMotr8SbT";
files."test.txt" = {};
};
firewall = {
trustedInterfaces = [ "blah" ];
nat = {
externalInterface = "eth0";
forwardPorts = [
{
proto = "tcp";
sourcePort = 2222;
destination = "127.0.0.1:22";
}
];
};
};
server.enable = true;
tmproot.unsaved.ignore = [
"/var/db/dhcpcd/enp1s0.lease"
];
};
2022-02-13 23:06:31 +00:00
fileSystems = {
"/boot" = {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
};
"/nix" = {
device = "/dev/disk/by-label/nix";
fsType = "ext4";
};
"/persist" = {
device = "/dev/disk/by-label/persist";
fsType = "ext4";
neededForBoot = true;
};
};
networking = {
interfaces = mkIf (!config.my.build.isDevVM) {
enp1s0.useDHCP = true;
};
};
};
2022-02-19 22:55:53 +00:00
};
2022-02-13 13:10:21 +00:00
}