treewide: Refactor in order to clean up flake.nix

This commit is contained in:
Tristan Daniël Maat 2022-10-13 00:03:32 +01:00
parent 068e6d5d77
commit e8b16459d9
Signed by: tlater
GPG key ID: 49670FD774E43268
7 changed files with 101 additions and 98 deletions
configuration

View file

@ -1,9 +1,13 @@
{
pkgs,
lib,
modulesPath,
...
}: {
imports = [
"${modulesPath}/profiles/headless.nix"
(import ../modules)
./services/gitea.nix
./services/nextcloud.nix
./services/webserver.nix
@ -12,6 +16,14 @@
./sops.nix
];
nixpkgs.overlays = [
(final: prev: {
local = import ../pkgs {
pkgs = prev;
};
})
];
nix = {
package = pkgs.nixFlakes;
extraOptions = ''

View file

@ -1,4 +1,8 @@
{
imports = [
./hardware-configuration.nix
];
# Required for the lish console
boot.kernelParams = ["console=ttyS0,19200n8"];

View file

@ -0,0 +1,17 @@
{lib, ...}: {
users.users.tlater.password = "insecure";
# Disable graphical tty so -curses works
boot.kernelParams = ["nomodeset"];
# Sets the base domain for nginx to localhost so that we
# can easily test locally with the VM.
services.nginx.domain = lib.mkOverride 99 "localhost";
# Use the staging secrets
sops.defaultSopsFile = lib.mkOverride 99 ../../keys/staging.yaml;
# # Set up VM settings to match real VPS
# virtualisation.memorySize = 3941;
# virtualisation.cores = 2;
}