mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-10 17:34:05 -05:00
97 lines
2.1 KiB
Nix
97 lines
2.1 KiB
Nix
{
|
|
inputs,
|
|
outputs,
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
isDarwin,
|
|
...
|
|
}:
|
|
let
|
|
platform = if isDarwin then "darwin" else "nixos";
|
|
platformModules = "${platform}Modules";
|
|
in
|
|
{
|
|
system.stateVersion = "24.05";
|
|
|
|
imports = lib.flatten [
|
|
inputs.home-manager.${platformModules}.home-manager
|
|
inputs.sops-nix.${platformModules}.sops
|
|
inputs.impermanence.${platformModules}.impermanence
|
|
|
|
(map lib.custom.relativeToRoot [
|
|
"hosts/common/core/${platform}.nix"
|
|
"hosts/common/core/shell.nix"
|
|
"hosts/common/core/sops.nix"
|
|
"hosts/common/core/ssh.nix"
|
|
"hosts/common/core/editor.nix"
|
|
"hosts/common/core/fonts.nix"
|
|
"hosts/common/core/sudo.nix"
|
|
"hosts/common/core/avahi.nix"
|
|
"hosts/common/core/dns.nix"
|
|
"hosts/common/core/impermanence.nix"
|
|
"hosts/common/users/primary"
|
|
"hosts/common/users/primary/${platform}.nix"
|
|
"modules/common"
|
|
])
|
|
];
|
|
|
|
hostSpec = {
|
|
username = lib.mkDefault "crow";
|
|
handle = lib.mkDefault "TheWanderingCrow";
|
|
};
|
|
|
|
networking.hostName = config.hostSpec.hostName;
|
|
|
|
environment.systemPackages = [
|
|
pkgs.openssh
|
|
pkgs.file
|
|
pkgs.fastfetch
|
|
];
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.backupFileExtension = "bk";
|
|
|
|
nixpkgs = {
|
|
overlays = [
|
|
outputs.overlays.default
|
|
];
|
|
config = {
|
|
allowUnfree = true;
|
|
};
|
|
};
|
|
|
|
virtualisation.oci-containers.backend = lib.mkDefault "podman";
|
|
|
|
nix = {
|
|
settings = {
|
|
connect-timeout = 5;
|
|
log-lines = 25;
|
|
min-free = 128000000;
|
|
max-free = 1000000000;
|
|
|
|
experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
|
|
fallback = true;
|
|
auto-optimise-store = true;
|
|
|
|
trusted-users = [ "@wheel" ];
|
|
substituters = [
|
|
"https://cache.nixos.org/"
|
|
"https://nix-community.cachix.org"
|
|
];
|
|
trusted-public-keys = [
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
];
|
|
};
|
|
# Automatic garbage collect
|
|
gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
};
|
|
};
|
|
}
|