config-perso/kat/default.nix

90 lines
1.9 KiB
Nix
Raw Normal View History

2024-09-26 11:51:04 +02:00
{
lib,
config,
pkgs,
...
}:
with lib;
{
imports = [
./users
./root.nix
];
options.kat = {
wireguardPubKey = mkOption {
type = types.str;
};
2024-09-26 11:51:04 +02:00
path = mkOption {
readOnly = true;
type = types.path;
};
anywhere = lib.mkOption {
type = lib.types.package;
readOnly = true;
};
};
config = {
kat = {
path = ./.;
anywhere = pkgs.writeShellApplication {
name = "anywhere-deploy_${name}.sh";
runtimeInputs = [ pkgs.nixos-anywhere ];
# --kexec ${nodes.kat-kexec.config.system.build.kexecTarball}/${nodes.kat-kexec.config.system.kexec-installer.name}-${pkgs.stdenv.hostPlatform.system}.tar.gz
text = ''
nixos-anywhere --store-paths ${config.system.build.diskoScriptNoDeps} ${config.system.build.toplevel} ${config.deployment.targetHost}
'';
};
};
2024-10-03 17:42:38 +02:00
boot = {
tmp.useTmpfs = true;
supportedFilesystems.bcachefs = mkDefault true;
kernelPackages = pkgs.linuxPackages_latest;
};
networking = {
useNetworkd = true;
nftables.enable = true;
};
systemd.network.enable = true;
2024-10-03 17:42:38 +02:00
2024-09-26 11:51:04 +02:00
nix = {
nixPath = [
"nixpkgs=${builtins.storePath pkgs.path}"
"nixos=${builtins.storePath pkgs.path}"
];
channel.enable = false;
settings.nix-path = config.nix.nixPath;
package = pkgs.lix;
};
2024-10-03 17:42:38 +02:00
time.timeZone = mkDefault "Europe/Paris";
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = mkDefault "fr";
};
environment.systemPackages = with pkgs; [
tree
ranger
ripgrep
wget
git
lazygit
btop
screen
nix-search-cli
nix-output-monitor
];
2024-09-26 11:51:04 +02:00
services = {
resolved.enable = !config.boot.isContainer;
openssh.settings = {
ClientAliveInterval = 60;
ClientAliveCountMax = 1;
};
};
};
}