2024-09-23 01:15:32 +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’ ).
{ config , pkgs , lib , . . . }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../profiles/base.nix
2024-10-26 15:17:38 +02:00
../../services/virt.nix
2024-11-05 13:07:53 +01:00
./qemu.nix
2024-09-23 01:15:32 +02:00
] ;
# Use the systemd-boot EFI boot loader.
boot . loader . systemd-boot . enable = true ;
boot . loader . efi . canTouchEfiVariables = true ;
2024-10-07 00:40:37 +02:00
# Pick only one of the below networking options.
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking . networkmanager . enable = true ; # Easiest to use and most distros use this by default.
2024-09-23 01:15:32 +02:00
# 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.
2024-10-26 15:17:38 +02:00
# networking.useDHCP = true;
networking . interfaces . wlp3s0f0 . useDHCP = true ; # Interface is not constant. I really only want to use dhcp att all so could remove this in favor of the old way.
2024-09-23 01:15:32 +02:00
networking . hostName = " g a n d a l f " ; # Define your hostname.
boot . kernel . sysctl = {
" n e t . i p v 4 . c o n f . a l l . f o r w a r d i n g " = true ;
" n e t . i p v 6 . c o n f . a l l . f o r w a r d i n g " = true ;
} ;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment . systemPackages = with pkgs ; [
git
wget
tailscale
] ;
users . users . gunalx = { # Define a user account. Don't forget to set a password with ‘ passwd’ .
isNormalUser = true ;
extraGroups = [ " w h e e l " ] ; # Enable ‘ sudo’ for the user.
initialPassword = " p w 1 2 3 " ; # this is changed imedeately.
} ;
users . users . " r o o t " . openssh . authorizedKeys . keys = [
" s s h - e d 2 5 5 1 9 A A A A C 3 N z a C 1 l Z D I 1 N T E 5 A A A A I H T E x Y o T 3 + f l r d 2 w P Y i T 7 s F F D m A U q i 2 Y A z 0 l d Q g 7 W M o p "
] ;
users . users . " g u n a l x " . openssh . authorizedKeys . keys = [
" s s h - e d 2 5 5 1 9 A A A A C 3 N z a C 1 l Z D I 1 N T E 5 A A A A I H T E x Y o T 3 + f l r d 2 w P Y i T 7 s F F D m A U q i 2 Y A z 0 l d Q g 7 W M o p "
" s s h - e d 2 5 5 1 9 A A A A C 3 N z a C 1 l Z D I 1 N T E 5 A A A A I E j + Y 0 R U r S a F 8 g U W 8 m 2 B Y 6 i 8 e 7 / 0 b U W h u 8 u 8 K W + A o H D h g u n a l x @ n i x o s "
] ;
#firewall options
networking . firewall = {
enable = true ;
checkReversePath = " l o o s e " ;
trustedInterfaces = [ " t a i l s c a l e 0 " ] ;
allowedUDPPorts = [
80
443
25565
config . services . tailscale . port
#config.services.headscale.port
] ;
allowedTCPPorts = config . networking . firewall . allowedUDPPorts ;
} ;
# 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. It's 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).
2024-10-26 15:17:38 +02:00
system . stateVersion = " 2 4 . 0 5 " ; # Did you read the comment?
2024-09-23 01:15:32 +02:00
}