Files
ad-nix/configuration.nix
2024-12-28 23:54:16 -06:00

54 lines
1.5 KiB
Nix

{ inputs, pkgs, lib, userSettings, systemSettings, ... }:
let
stateVersion = systemSettings.stateVersion;
# adHome = "/srv/appdaemon";
# adNixPath = "${adHome}/ad-nix";
# adPath = "/usr/src/app";
in
{
imports = [
(import ./home-manager/home.nix {inherit systemSettings userSettings;})
./nixos
];
system.stateVersion = stateVersion;
time.timeZone = "${systemSettings.timeZone}";
nix.settings.trusted-users = [ "root" "@wheel" ];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
programs.nix-ld.enable = true;
sops.defaultSopsFile = ./secrets/secrets.yaml;
sops.defaultSopsFormat = "yaml";
sops.age.keyFile = "${userSettings.adHome}/.config/sops/age/keys.txt";
environment.systemPackages = with pkgs; [
(pkgs.writeShellScriptBin "nrbs" "sudo nixos-rebuild switch")
(pkgs.writeShellScriptBin "nrbsu" "sudo nix-channel --update && sudo nixos-rebuild switch")
(pkgs.writeShellScriptBin "nfs" ''
sudo nixos-rebuild switch --flake $(readlink -f /etc/nixos)#${systemSettings.hostName}
'')
(pkgs.writeShellScriptBin "ads" "nix develop --no-pure-eval $(readlink -f /etc/nixos)")
bash
git
eza
gh
sops
];
virtualisation.docker.enable = true;
virtualisation.oci-containers.backend = "docker";
services.vscode-server.enable = true;
services.openssh.enable = true;
services.tailscale.enable = true;
system.activationScripts.ensureDirectory = ''
if [ ! -d /conf ]; then
mkdir /conf
chmod 0755 /conf
chown 1000:100 /conf
fi
'';
}