nixos/hosts/common/core/default.nix

64 lines
1.3 KiB
Nix
Raw Normal View History

{ pkgs, lib, inputs, config, outputs, ... }:
2024-05-25 18:34:37 +01:00
let
sopsHashedPasswordFile = lib.optionalString (lib.hasAttr "sops-nix" inputs) config.sops.secrets."passwords/root".path;
in
{
2024-05-12 19:58:55 +01:00
imports = [
inputs.impermanence.nixosModules.impermanence
2024-05-12 19:58:55 +01:00
./sops.nix
2024-05-17 10:54:53 +01:00
./locale.nix
2024-05-12 19:58:55 +01:00
];
2024-05-14 18:26:45 +01:00
2024-05-25 18:34:37 +01:00
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
inputs.nur.overlays.default
];
config = {
allowUnfree = true;
2024-05-25 18:34:37 +01:00
};
};
2024-05-25 18:34:37 +01:00
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
users = {
mutableUsers = true;
extraUsers = {
root = {
2025-01-19 20:07:50 +00:00
hashedPasswordFile = sopsHashedPasswordFile;
2024-05-25 18:34:37 +01:00
};
};
2024-05-25 18:34:37 +01:00
};
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
2024-05-15 20:44:17 +01:00
environment.systemPackages = [
pkgs.rsync
pkgs.curl
pkgs.just
pkgs.vim
];
2024-05-15 20:44:17 +01:00
2025-01-16 13:51:46 +00:00
programs.git = {
enable = true;
package = pkgs.git;
config = {
# need to set /etc/nixos as safe directory to enable root to interact with non-root nix config repo
safe = {directory = ["/etc/nixos"]; };
};
};
system.stateVersion = "24.05";
2024-05-12 19:58:55 +01:00
}