2025-09-05 09:59:31 +02:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
|
|
|
|
{
|
2025-10-05 08:20:57 +02:00
|
|
|
|
config,
|
|
|
|
|
|
pkgs,
|
|
|
|
|
|
...
|
|
|
|
|
|
}: {
|
|
|
|
|
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
|
|
|
|
|
imports = [
|
|
|
|
|
|
# Include the results of the hardware scan.
|
|
|
|
|
|
./hardware.nix
|
|
|
|
|
|
../../profiles/server-selfhosted.nix
|
|
|
|
|
|
../../modules/services/ftp.nix
|
|
|
|
|
|
../../modules/services/forgejo.nix
|
|
|
|
|
|
];
|
2025-09-05 09:59:31 +02:00
|
|
|
|
|
|
|
|
|
|
# Bootloader.
|
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
|
|
|
|
networking.hostName = "terre-neuvas"; # Define your hostname.
|
|
|
|
|
|
|
|
|
|
|
|
# Configure keymap in X11
|
|
|
|
|
|
services.xserver.xkb = {
|
|
|
|
|
|
layout = "fr";
|
|
|
|
|
|
variant = "azerty";
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# Configure console keymap
|
|
|
|
|
|
console.keyMap = "fr";
|
|
|
|
|
|
|
|
|
|
|
|
users.users.lomig = {
|
|
|
|
|
|
isNormalUser = true;
|
2025-10-05 08:20:57 +02:00
|
|
|
|
extraGroups = ["lp" "wheel" "docker"];
|
2025-09-05 09:59:31 +02:00
|
|
|
|
shell = pkgs.zsh;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
|
|
users.lomig = import ../../hm/users/lomig.nix;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2025-10-05 08:20:57 +02:00
|
|
|
|
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
|
|
|
|
git
|
2025-09-05 09:59:31 +02:00
|
|
|
|
];
|
2025-10-04 07:08:16 +02:00
|
|
|
|
networking = {
|
2025-10-05 08:20:57 +02:00
|
|
|
|
useNetworkd = true;
|
|
|
|
|
|
firewall.allowedTCPPorts = [22 80 5900 5901 5902];
|
|
|
|
|
|
interfaces.eno1.useDHCP = false;
|
2025-10-04 09:46:20 +02:00
|
|
|
|
interfaces.br0 = {
|
2025-10-05 08:20:57 +02:00
|
|
|
|
useDHCP = false;
|
2025-10-04 09:46:20 +02:00
|
|
|
|
ipv4.addresses = [
|
|
|
|
|
|
{
|
|
|
|
|
|
address = "192.168.0.3";
|
2025-10-05 08:20:57 +02:00
|
|
|
|
prefixLength = 24;
|
2025-10-04 09:46:20 +02:00
|
|
|
|
}
|
|
|
|
|
|
];
|
|
|
|
|
|
};
|
|
|
|
|
|
defaultGateway = {
|
2025-10-05 08:20:57 +02:00
|
|
|
|
interface = "br0";
|
|
|
|
|
|
address = "192.168.0.254";
|
2025-10-04 09:46:20 +02:00
|
|
|
|
};
|
2025-10-05 08:20:57 +02:00
|
|
|
|
nameservers = ["192.168.0.254" "1.1.1.1"];
|
|
|
|
|
|
bridges.br0.interfaces = ["eno1"];
|
2025-10-04 07:08:16 +02:00
|
|
|
|
};
|
2025-10-04 09:46:20 +02:00
|
|
|
|
systemd.network = {
|
2025-10-05 08:20:57 +02:00
|
|
|
|
enable = true;
|
2025-10-04 09:46:20 +02:00
|
|
|
|
netdevs."br0" = {
|
|
|
|
|
|
netdevConfig = {
|
|
|
|
|
|
Name = "br0";
|
|
|
|
|
|
Kind = "bridge";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
networks."br0" = {
|
2025-10-05 08:20:57 +02:00
|
|
|
|
matchConfig.Name = "br0";
|
2025-10-04 09:46:20 +02:00
|
|
|
|
};
|
|
|
|
|
|
networks."eno1" = {
|
|
|
|
|
|
matchConfig.Name = "eno1";
|
|
|
|
|
|
networkConfig.Bridge = "br0";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
2025-09-05 09:59:31 +02:00
|
|
|
|
system.stateVersion = "25.05"; # Did you read the comment?
|
|
|
|
|
|
}
|