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
|
2024-03-02 21:57:21 +01:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
lib',
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
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
|
2024-03-02 21:57:21 +01:00
|
|
|
mkAfter
|
|
|
|
;
|
2023-06-11 23:09:59 +02:00
|
|
|
|
|
|
|
config' = config;
|
2024-03-02 21:57:21 +01:00
|
|
|
in {
|
2024-06-02 20:47:34 +02:00
|
|
|
flake.nixosConfigurations.omen = inputs.nixpkgs-unstable.lib.nixosSystem {
|
2023-06-11 23:09:59 +02:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2024-03-02 21:57:21 +01:00
|
|
|
modules =
|
|
|
|
singleton
|
|
|
|
({
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
secret,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
../../common/steam.nix
|
|
|
|
../../common/sound.nix
|
|
|
|
../../common/remote_access.nix
|
|
|
|
./xserver.nix
|
|
|
|
./grub.nix
|
|
|
|
./networking.nix
|
|
|
|
./filesystems.nix
|
|
|
|
./hardware.nix
|
|
|
|
./users.nix
|
|
|
|
./nixpkgs.nix
|
|
|
|
./firewall.nix
|
|
|
|
./impermenance.nix
|
2024-04-19 13:47:30 +02:00
|
|
|
./chaotic-nix.nix
|
2024-07-03 21:18:39 +02:00
|
|
|
./vr.nix
|
2024-03-02 21:57:21 +01:00
|
|
|
../../../overlays/ifstate/module.nix
|
|
|
|
|
2024-04-07 10:37:17 +02:00
|
|
|
inputs.uk3s-nix.nixosModules.ucontainers
|
|
|
|
inputs.uk3s-nix.nixosModules.ucontainersNetwork
|
2024-03-02 21:57:21 +01:00
|
|
|
inputs.notnft.nixosModules.default
|
|
|
|
inputs.self.nixosModules.notnft
|
|
|
|
inputs.impermenance.nixosModules.impermanence
|
|
|
|
];
|
|
|
|
|
|
|
|
services.fwupd.enable = true;
|
2023-09-28 10:31:25 +02:00
|
|
|
|
2024-03-02 21:57:21 +01:00
|
|
|
services.syncthing = {
|
|
|
|
enable = true;
|
|
|
|
user = "main";
|
|
|
|
group = "main";
|
|
|
|
};
|
2023-06-11 23:09:59 +02:00
|
|
|
|
2024-03-02 21:57:21 +01:00
|
|
|
services.sshd.enable = true;
|
2023-06-11 23:09:59 +02:00
|
|
|
|
2024-03-02 21:57:21 +01:00
|
|
|
# Makes QEMU recompile https://github.com/NixOS/nixpkgs/issues/221056
|
|
|
|
boot.binfmt.emulatedSystems = [
|
|
|
|
"aarch64-linux"
|
|
|
|
"riscv64-linux"
|
|
|
|
"armv6l-linux"
|
|
|
|
"armv7l-linux"
|
|
|
|
];
|
2023-06-11 23:09:59 +02:00
|
|
|
|
2024-03-02 21:57:21 +01:00
|
|
|
environment.systemPackages = [
|
|
|
|
pkgs.man-pages-posix
|
|
|
|
];
|
|
|
|
documentation.dev.enable = true;
|
2023-06-11 23:09:59 +02:00
|
|
|
|
2024-03-02 21:57:21 +01:00
|
|
|
systemd.services.nix-daemon.environment.SSH_AUTH_SOCK = "/run/user/${toString config.users.users.main.uid}/gnupg/S.gpg-agent.ssh";
|
|
|
|
systemd.services.nix-daemon.environment.NIX_SSHOPTS = "-o ControlMaster=auto -o ControlPath=/tmp/nix-daemon-controlmasters/%%r@%%h:%%p -o ControlPersist=300s";
|
|
|
|
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
|
|
|
system.stateVersion = "23.05";
|
|
|
|
|
|
|
|
virtualisation.podman.enable = 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";
|
|
|
|
}
|
|
|
|
];
|
2024-03-02 21:57:21 +01:00
|
|
|
virtualisation.podman.dockerCompat = true;
|
2024-01-18 21:13:36 +01:00
|
|
|
});
|
|
|
|
};
|
2023-06-11 23:09:59 +02:00
|
|
|
}
|