Create configuration.nix

This commit is contained in:
nathan mccarty 2022-07-03 00:43:50 -04:00
parent c6114eca92
commit 806140b6cc
Signed by: thatonelutenist
GPG Key ID: D70DA3DD4D1E9F96
3 changed files with 75 additions and 69 deletions

View File

@ -107,58 +107,7 @@
hostName = "levitation";
extraModules = [
./hardware/levitation.nix
({ pkgs, config, lib, ... }: {
# sops for borg
sops.secrets."borg-ssh-key" = {
sopsFile = ./secrets/levitation/borg.yaml;
format = "yaml";
};
sops.secrets."borg-password" = {
sopsFile = ./secrets/levitation/borg.yaml;
format = "yaml";
};
# Setup system configuration
nathan = {
programs = {
games = true;
};
services = {
borg = {
enable = true;
extraExcludes = [
"/home/${config.nathan.config.user}/Music"
"/var/lib/docker"
"/var/log"
];
passwordFile = config.sops.secrets."borg-password".path;
sshKey = config.sops.secrets."borg-ssh-key".path;
};
};
config = {
isDesktop = true;
setupGrub = true;
nix.autoUpdate = false;
harden = false;
};
};
# Configure networking
networking = {
domain = "mccarty.io";
useDHCP = false;
interfaces.enp6s0.useDHCP = true;
nat.externalInterface = "enp6s0";
# Open ports for soulseek
# TODO add in soulseek
firewall = {
allowedTCPPorts = [ 61377 ];
allowedUDPPorts = [ 61377 ];
};
};
# FIXME borg backup module
# Setup home manager
home-manager.users.nathan = import ./machines/levitation/home.nix;
})
./machines/levitation/configuration.nix
];
};
@ -168,23 +117,7 @@
extraModules = [
"${nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
({ pkgs, config, lib, ... }: {
nathan = {
programs = {
games = true;
};
config = {
isDesktop = true;
nix.autoUpdate = false;
};
};
home-manager.users.nathan = import ./machines/x86vm/home.nix;
# Workaround to get sway working in qemu
environment.variables = {
"WLR_RENDERER" = "pixman";
};
})
./machines/x86vm/configuration.nix
];
};
};

View File

@ -0,0 +1,54 @@
{ config, lib, pkgs, ... }:
{
# sops for borg
sops.secrets."borg-ssh-key" = {
sopsFile = ../../secrets/levitation/borg.yaml;
format = "yaml";
};
sops.secrets."borg-password" = {
sopsFile = ../../secrets/levitation/borg.yaml;
format = "yaml";
};
# Setup system configuration
nathan = {
programs = {
games = true;
};
services = {
borg = {
enable = true;
extraExcludes = [
"/home/${config.nathan.config.user}/Music"
"/var/lib/docker"
"/var/log"
];
passwordFile = config.sops.secrets."borg-password".path;
sshKey = config.sops.secrets."borg-ssh-key".path;
};
};
config = {
isDesktop = true;
setupGrub = true;
nix.autoUpdate = false;
harden = false;
};
};
# Configure networking
networking = {
domain = "mccarty.io";
useDHCP = false;
interfaces.enp6s0.useDHCP = true;
nat.externalInterface = "enp6s0";
# Open ports for soulseek
# TODO add in soulseek
firewall = {
allowedTCPPorts = [ 61377 ];
allowedUDPPorts = [ 61377 ];
};
};
# FIXME borg backup module
# Setup home manager
home-manager.users.nathan = import ./home.nix;
}

View File

@ -0,0 +1,19 @@
{ config, lib, pkgs, ... }:
{
nathan = {
programs = {
games = true;
};
config = {
isDesktop = true;
nix.autoUpdate = false;
};
};
home-manager.users.nathan = import ./home.nix;
# Workaround to get sway working in qemu
environment.variables = {
"WLR_RENDERER" = "pixman";
};
}