Simplify build-related config

This commit is contained in:
Katherina Walshe-Grey 2024-06-05 23:03:25 +01:00
parent 104d995dd2
commit 433930bde6
4 changed files with 39 additions and 23 deletions

14
colmena/local.nix Normal file
View file

@ -0,0 +1,14 @@
{ name, nodes, config, lib, pkgs, ... }:
{
deployment = {
allowLocalDeployment = true;
targetHost = null;
tags = [ "local" ];
};
environment.systemPackages = with pkgs; [
colmena
npins
];
}

12
colmena/remote.nix Normal file
View file

@ -0,0 +1,12 @@
{ name, nodes, config, lib, pkgs, ... }:
{
deployment = {
targetHost = "${name}.birdsong.network";
tags = [ "remote" ];
};
imports = [
../services/openssh.nix
];
}

View file

@ -2,14 +2,11 @@ let sources = import ./npins;
in {
meta.nixpkgs = sources.nixpkgs;
defaults = { name, pkgs, ... }: {
defaults = { name, nodes, ... }: {
deployment.replaceUnknownProfiles = false;
networking.hostName = name;
environment.systemPackages = with pkgs; [
git
wget
];
nixpkgs.config.allowUnfree = true;
imports = [
(import "${sources.home-manager}/nixos")
@ -18,24 +15,23 @@ in {
];
};
tohru = {
deployment = {
allowLocalDeployment = true;
targetHost = null;
};
tohru = { name, nodes, ... }: {
networking.hostId = "31da19c1";
time.timeZone = "Europe/London";
imports = [ ./hosts/tohru/configuration.nix ];
imports = [
./colmena/local.nix
./hosts/tohru/configuration.nix
];
};
yevaud = { name, ... }: {
deployment.targetHost = "${name}.birdsong.network";
yevaud = { name, nodes, ... }: {
networking.hostId = "09673d65";
time.timeZone = "Etc/UTC";
imports = [ ./hosts/yevaud/configuration.nix ];
imports = [
./colmena/remote.nix
./hosts/yevaud/configuration.nix
];
};
}

View file

@ -27,18 +27,12 @@
sound.enable = true;
hardware.pulseaudio.enable = true;
environment.systemPackages = with pkgs; [
colmena
npins
];
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
nixpkgs.config.allowUnfree = true;
hardware.enableAllFirmware = true;
services.fwupd.enable = true;
services.fstrim.enable = true;