2023-06-11 23:09:59 +02:00
|
|
|
# SPDX-FileCopyrightText: 2022 Richard Brežák <richard@brezak.sk>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: LGPL-3.0-or-later
|
2023-09-28 14:42:44 +02:00
|
|
|
{ inputs, lib', config, ... }:
|
2023-06-11 23:09:59 +02:00
|
|
|
let
|
2023-06-18 20:07:47 +02:00
|
|
|
inherit (lib')
|
2023-06-11 23:09:59 +02:00
|
|
|
flip
|
|
|
|
mapAttrs
|
2023-06-18 20:07:47 +02:00
|
|
|
singleton
|
2023-09-28 10:31:25 +02:00
|
|
|
loadSecrets
|
|
|
|
mkAfter;
|
2023-06-11 23:09:59 +02:00
|
|
|
|
|
|
|
config' = config;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
flake.nixosConfigurations.omen = inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2023-06-18 20:07:47 +02:00
|
|
|
lib = lib';
|
2023-06-11 23:09:59 +02:00
|
|
|
|
|
|
|
specialArgs = {
|
|
|
|
config' = config';
|
|
|
|
inputs' = inputs;
|
2023-06-18 20:07:47 +02:00
|
|
|
secret = loadSecrets inputs.secret;
|
2023-06-11 23:09:59 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
modules = singleton
|
2023-09-28 14:42:44 +02:00
|
|
|
({ pkgs, lib, config, secret, ... }:
|
2023-06-11 23:09:59 +02:00
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
../../common/steam.nix
|
2023-11-19 12:30:53 +01:00
|
|
|
../../common/sound.nix
|
|
|
|
./xserver.nix
|
2023-06-11 23:09:59 +02:00
|
|
|
./grub.nix
|
|
|
|
./networking.nix
|
|
|
|
./filesystems.nix
|
|
|
|
./hardware.nix
|
|
|
|
./users.nix
|
|
|
|
./nixpkgs.nix
|
2023-10-07 22:45:51 +02:00
|
|
|
./firewall.nix
|
|
|
|
./microvm.nix
|
2023-10-03 16:55:14 +02:00
|
|
|
./impermenance.nix
|
2023-10-07 22:49:56 +02:00
|
|
|
./numen.nix
|
2023-09-28 10:31:25 +02:00
|
|
|
# ./test-vm.nix
|
2023-06-11 23:09:59 +02:00
|
|
|
|
|
|
|
inputs.dwarffs.nixosModules.dwarffs
|
2023-09-28 10:31:25 +02:00
|
|
|
inputs.microvm.nixosModules.host
|
|
|
|
inputs.notnft.nixosModules.default
|
|
|
|
inputs.self.nixosModules.notnft
|
|
|
|
inputs.self.nixosModules.microvm-extras-host
|
2023-10-03 16:55:14 +02:00
|
|
|
inputs.impermenance.nixosModules.impermanence
|
2023-06-11 23:09:59 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
_module.args.nixinate = {
|
|
|
|
host = secret.network.ips.omen.vpn or "";
|
|
|
|
sshUser = "main";
|
2023-09-28 10:31:25 +02:00
|
|
|
|
2023-06-11 23:09:59 +02:00
|
|
|
buildOn = "local";
|
|
|
|
substituteOnTarget = true;
|
|
|
|
hermetic = false;
|
|
|
|
nixOptions = [
|
|
|
|
"--override-input secret path://$HOME/dotfiles/secret"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
services.fwupd.enable = true;
|
|
|
|
|
|
|
|
services.syncthing = {
|
|
|
|
enable = true;
|
|
|
|
user = "main";
|
|
|
|
group = "main";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.sshd.enable = true;
|
|
|
|
|
|
|
|
# Makes QEMU recompile https://github.com/NixOS/nixpkgs/issues/221056
|
2023-06-28 14:22:27 +02:00
|
|
|
boot.binfmt.emulatedSystems = [
|
|
|
|
"aarch64-linux"
|
|
|
|
"riscv64-linux"
|
|
|
|
];
|
2023-06-11 23:09:59 +02:00
|
|
|
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
2023-10-29 17:48:40 +01:00
|
|
|
system.stateVersion = "23.05";
|
2023-06-11 23:09:59 +02:00
|
|
|
|
|
|
|
virtualisation.podman.enable = true;
|
2023-07-18 11:45:37 +02:00
|
|
|
virtualisation.podman.dockerCompat = true;
|
2023-06-11 23:09:59 +02:00
|
|
|
});
|
|
|
|
};
|
2024-01-18 14:10:57 +01:00
|
|
|
virtualisation.podman.defaultNetwork.settings.subnets = [
|
|
|
|
{
|
|
|
|
gateway = "10.88.0.1";
|
|
|
|
subnet = "10.88.0.0/16";
|
|
|
|
}
|
|
|
|
];
|
2023-06-11 23:09:59 +02:00
|
|
|
}
|