added nas hostname

This commit is contained in:
glenn 2024-05-05 20:53:16 +02:00
parent 642d297710
commit 2d8b2e985a

View file

@ -1,16 +1,16 @@
# 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.
config,
pkgs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
services.postgresql = {
dataDir = "/pool/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}";
};
@ -22,8 +22,8 @@
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sdc";
boot.loader.grub.useOSProber = true;
networking.hostName = "nixos"; # Define your hostname.
networking = {
hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
@ -31,7 +31,15 @@
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
networkmanager.enable = true;
# Open ports in the firewall.
firewall.allowedTCPPorts = [80 443];
extraHosts = ''
192.168.1.88 nas
'';
};
# Set your time zone.
time.timeZone = "Europe/Stockholm";
@ -111,7 +119,6 @@
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMYGJCpFIiWqzy8YbfWh7+i52XVwyhUu+P0rUglVR5uV gws@nixos"];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
@ -134,7 +141,6 @@
alejandra
];
programs = {
ssh.startAgent = true;
fish = {
enable = true;
@ -174,9 +180,6 @@ programs = {
environmentFile = "/etc/nixos/.secrets/cloudflare_dns_tokend";
};
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 80 443 ];
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
@ -189,5 +192,4 @@ programs = {
# 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 = "23.11"; # Did you read the comment?
}