nix-config/configuration.nix

98 lines
4.6 KiB
Nix
Raw Normal View History

2021-01-30 21:14:20 +01: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).
{ config, pkgs, ... }:
{
imports =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
# Include my services
./services
2021-01-30 21:14:20 +01:00
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
networking.hostName = "porthos"; # Define your hostname.
networking.domain = "test.belanyi.fr"; # Define your domain.
# Set your time zone.
time.timeZone = "Europe/Paris";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.bond0.useDHCP = true;
networking.interfaces.bonding_masters.useDHCP = true;
networking.interfaces.dummy0.useDHCP = true;
networking.interfaces.erspan0.useDHCP = true;
networking.interfaces.eth0.useDHCP = true;
networking.interfaces.eth1.useDHCP = true;
networking.interfaces.gre0.useDHCP = true;
networking.interfaces.gretap0.useDHCP = true;
networking.interfaces.ifb0.useDHCP = true;
networking.interfaces.ifb1.useDHCP = true;
networking.interfaces.ip6tnl0.useDHCP = true;
networking.interfaces.sit0.useDHCP = true;
networking.interfaces.teql0.useDHCP = true;
networking.interfaces.tunl0.useDHCP = true;
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# Define a user account. Don't forget to set a password with passwd.
users.users.ambroisie = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC+lrntygUjRA7X6AXRXoV0BMbmZI9bzxR7M++temU1N1WQ7sEGu4zHNIeWaqCKtVbdjvuN5nC8IqC5iV+8KBdT2d+iH165yeEh9mYqSOS9wn0oPr6cSvO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kl2K0XkC2rNgaSiVoziVBi8CKgc2FENkprpJTlHwTQeXAP09m8+bhqpwjhKG1dI/t1y4adr+yvChnOAaAFrMAIP7uXaX8xt/LjYNeZ7+w6O7+kwA2XOE3Ucus+a8AUt+bS8JXmh3Vpwg2SfCmn/AmLsNXrwynelVpYO/t0cZIp1uS3OcUQYxuSO++DI6SiKazE47yP0qxK0qIi9Pm9gX1w6SnE0oQcQ6w== ambroisie@shared-key"
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
git
git-crypt
mosh
vim
wget
];
# List services that you want to enable:
2021-01-31 16:56:44 +01:00
my.services = {
2021-01-31 17:46:46 +01:00
# Gitea forge
gitea.enable = true;
2021-01-31 16:56:44 +01:00
# Matrix backend and Element chat front-end
matrix.enable = true;
};
2021-01-30 21:14:20 +01:00
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.mosh.enable = true; # Opens the relevant UDP ports.
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.openssh.permitRootLogin = "no";
services.openssh.passwordAuthentication = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.09"; # Did you read the comment?
}