Create configuration.nix
This commit is contained in:
parent
c6114eca92
commit
806140b6cc
71
flake.nix
71
flake.nix
|
@ -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
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue