modularize configuration of dromadaire server

This commit is contained in:
Douze Bé 2024-12-19 15:52:34 +01:00
parent fb3ddea80f
commit 7523f6f495
2 changed files with 5 additions and 76 deletions

View file

@ -2,7 +2,7 @@
{
imports =
[ # Include the results of the hardware scan.
[
./hardware-configuration.nix
/var/src/modules/nixin.nix
/var/src/modules/users.nix

View file

@ -6,8 +6,10 @@
{
imports =
[ # Include the results of the hardware scan.
[
./hardware-configuration.nix
/var/src/modules/nixin.nix
/var/src/modules/users.nix
];
hardware.sensor.hddtemp.enable = true;
@ -17,9 +19,6 @@
boot.loader.systemd-boot.configurationLimit = 7;
boot.loader.efi.canTouchEfiVariables = true;
# Set NIX_PATH to use nixpkgs deployed with krops
environment.variables.NIX_PATH = lib.mkForce "/var/src";
networking = {
hostName = "dromadaire"; # Define your hostname.
# Pick only one of the below networking options.
@ -65,47 +64,6 @@
#useXkbConfig = true; # use xkb.options in tty.
};
# Enable the X11 windowing system.
# services.xserver.enable = true;
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# hardware.pulseaudio.enable = true;
# OR
# services.pipewire = {
# enable = true;
# pulse.enable = true;
# };
# Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true;
# Define a user account. Don't forget to set a password with 'passwd'.
users.users.optisseur = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable 'sudo' for the user.
initialPassword = "Change Me!";
# packages = with pkgs; [
# firefox
# tree
# ];
};
environment.shellAliases = {
tm = "tmux new -A -s shared" ;
ll = "ls -al";
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
@ -122,7 +80,6 @@
#podman-compose # start group of containers for dev
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
@ -132,23 +89,6 @@
vimAlias = true;
};
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.ports = [ 144 ];
services.openssh.settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
virtualisation.containers.enable = true;
virtualisation.podman = {
enable = true;
@ -166,7 +106,6 @@
# };
#};
services.gitea-actions-runner = {
package = pkgs.forgejo-runner;
instances.default = {
@ -190,20 +129,10 @@
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 80 144 443 ];
networking.firewall.interfaces.podman0.allowedUDPPorts = [ 53 ];
networking.firewall.interfaces.podman1.allowedUDPPorts = [ 53 ];
networking.firewall.interfaces.podman2.allowedUDPPorts = [ 53 ];
networking.firewall.interfaces.podman3.allowedUDPPorts = [ 53 ];
networking.firewall.interfaces.podman4.allowedUDPPorts = [ 53 ];
# networking.firewall.allowedUDPPorts = [ ... ];
networking.firewall.allowedUDPPorts = [ 53 ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#