2024-09-23 17:27:19 +02:00
|
|
|
{
|
2024-09-26 10:17:09 +02:00
|
|
|
inputs,
|
|
|
|
config,
|
2024-09-23 17:27:19 +02:00
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
|
2024-09-23 16:57:09 +02:00
|
|
|
imports = [
|
|
|
|
./hardware-configuration.nix
|
2024-09-26 16:06:14 +02:00
|
|
|
./sops.nix
|
2024-09-27 15:57:06 +02:00
|
|
|
../../services
|
2024-09-23 16:57:09 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
# Nix
|
|
|
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
ports = [22];
|
|
|
|
settings = {
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
};
|
|
|
|
};
|
2024-09-24 10:13:04 +02:00
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHQyRXFQ6iA5p0vDuoGSHZfajiVZPAGIyqhTziM7QgBV gaspard@nixos"
|
|
|
|
];
|
2024-09-23 16:57:09 +02:00
|
|
|
|
2024-10-02 15:03:00 +02:00
|
|
|
# Podman
|
|
|
|
virtualisation = {
|
|
|
|
containers.enable = true;
|
|
|
|
oci-containers.backend = "podman";
|
|
|
|
podman = {
|
|
|
|
enable = true;
|
|
|
|
# Required for containers under podman-compose to be able to talk to each other.
|
|
|
|
defaultNetwork.settings.dns_enabled = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-09-23 16:57:09 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
helix
|
|
|
|
git
|
|
|
|
];
|
2024-09-26 10:17:09 +02:00
|
|
|
|
|
|
|
# User config
|
|
|
|
users.groups.gaspard = {
|
|
|
|
name = "gaspard";
|
|
|
|
};
|
|
|
|
users.users.gaspard = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [
|
|
|
|
"wheel"
|
|
|
|
];
|
|
|
|
group = "gaspard";
|
|
|
|
openssh.authorizedKeys.keys = config.users.users.root.openssh.authorizedKeys.keys;
|
|
|
|
};
|
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
extraSpecialArgs = {inherit inputs;};
|
|
|
|
users = {
|
|
|
|
# FIX: No user config file
|
|
|
|
"gaspard" = {
|
|
|
|
home.username = "gaspard";
|
|
|
|
home.homeDirectory = "/home/gaspard";
|
|
|
|
home.stateVersion = "24.05";
|
|
|
|
|
|
|
|
programs.home-manager.enable = true;
|
|
|
|
programs.direnv.enable = true;
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
../../shell
|
|
|
|
../../editor
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
system.stateVersion = "24.11";
|
2024-09-23 16:57:09 +02:00
|
|
|
}
|