nixos-config/hosts/emenel-services/configuration.nix

123 lines
2.5 KiB
Nix
Raw Normal View History

2025-04-13 12:10:45 -04:00
{ nix-config, pkgs, inputs, ... }:{
2025-04-12 11:01:31 -04:00
2025-04-13 12:10:45 -04:00
imports = with nix-config.nixosModules; [
2025-04-12 11:01:31 -04:00
./hardware-configuration.nix
2025-04-12 16:26:18 -04:00
./disko-config.nix
2025-04-13 12:10:45 -04:00
forgejo
2025-04-12 11:01:31 -04:00
];
2025-04-13 14:46:32 -04:00
nixpkgs = {
config = {
allowUnfree = true;
};
overlays = builtins.attrValues nix-config.overlays ++ [
inputs.nh.overlays.default
];
};
nix = {
settings = {
experimental-features = [
"nix-command"
"flakes"
];
substituters = [
"https://nix-community.cachix.org"
"https://cache.garnix.io"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
];
};
channel.enable = false; # remove nix-channel related tools & configs, we use flakes instead.
};
2025-04-15 13:45:01 -04:00
fileSystems = {
"/mnt/git-storage" = {
device = "/dev/sdb";
fsType = "ext4";
};
};
2025-04-13 14:46:32 -04:00
sops = {
2025-04-13 15:00:23 -04:00
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
2025-04-13 14:46:32 -04:00
defaultSopsFile = ./secrets.yaml;
secrets = {
2025-04-14 08:29:46 -04:00
forgejo-emenel = {};
2025-04-13 14:46:32 -04:00
};
};
# Set your time zone.
time.timeZone = "America/Toronto";
# Select internationalisation properties.
i18n.defaultLocale = "en_CA.UTF-8";
2025-04-12 11:01:31 -04:00
boot.tmp.cleanOnBoot = true;
2025-04-12 16:26:18 -04:00
boot.loader.grub.enable = true;
2025-04-12 11:01:31 -04:00
zramSwap.enable = true;
networking.hostName = "services-nixos";
networking.domain = "";
2025-04-13 14:46:32 -04:00
networking.useDHCP = true;
2025-04-13 15:11:15 -04:00
networking.firewall.enable = false;
2025-04-12 11:01:31 -04:00
services.openssh.enable = true;
2025-04-12 11:05:41 -04:00
environment.systemPackages = with pkgs; [
wget
home-manager
curl
git-lfs
rsync
gnupg
util-linux
2025-04-13 14:46:32 -04:00
git
2025-04-12 11:05:41 -04:00
];
2025-04-12 11:01:31 -04:00
users.users.emenel = {
openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGbzcaEyzlGJkDL8EMcVmrAWRlyYtilTjpIR2VGxkMHo'' ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFvtBCUQEi7r6mXdaULEaMMvGH1IWZBX9tXpjbIECar2'' ];
isNormalUser = true;
description = "emenel";
extraGroups = [
"networkmanager"
"network"
"wheel"
"uinput"
];
packages = with pkgs; [
git
];
};
2025-04-13 14:46:32 -04:00
security.sudo = {
enable = true;
wheelNeedsPassword = false;
};
programs.nh = {
enable = true;
clean = {
enable = true;
dates = "daily";
extraArgs = "--keep 4";
};
flake = "/home/emenel/source/nixos-config";
package = pkgs.nh;
};
2025-04-14 12:29:32 -04:00
services.caddy = {
enable = true;
email = "matt@emenel.ca";
};
2025-04-13 14:46:32 -04:00
2025-04-12 11:01:31 -04:00
2025-04-12 16:26:18 -04:00
system.stateVersion = "25.05"; # Did you read the comment?
2025-04-12 11:01:31 -04:00
2025-04-12 11:05:41 -04:00
2025-04-12 11:01:31 -04:00
}