added nas hostname
This commit is contained in:
parent
642d297710
commit
2d8b2e985a
|
@ -1,16 +1,16 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ # Include the results of the hardware scan.
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
dataDir = "/pool/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}";
|
dataDir = "/pool/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||||
};
|
};
|
||||||
|
@ -22,8 +22,8 @@
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.device = "/dev/sdc";
|
boot.loader.grub.device = "/dev/sdc";
|
||||||
boot.loader.grub.useOSProber = true;
|
boot.loader.grub.useOSProber = true;
|
||||||
|
networking = {
|
||||||
networking.hostName = "nixos"; # Define your hostname.
|
hostName = "nixos"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
# Configure network proxy if necessary
|
||||||
|
@ -31,7 +31,15 @@
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
# Enable networking
|
# 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.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Stockholm";
|
time.timeZone = "Europe/Stockholm";
|
||||||
|
@ -111,7 +119,6 @@
|
||||||
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMYGJCpFIiWqzy8YbfWh7+i52XVwyhUu+P0rUglVR5uV gws@nixos"];
|
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMYGJCpFIiWqzy8YbfWh7+i52XVwyhUu+P0rUglVR5uV gws@nixos"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
@ -134,7 +141,6 @@
|
||||||
alejandra
|
alejandra
|
||||||
];
|
];
|
||||||
programs = {
|
programs = {
|
||||||
|
|
||||||
ssh.startAgent = true;
|
ssh.startAgent = true;
|
||||||
fish = {
|
fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -174,9 +180,6 @@ programs = {
|
||||||
environmentFile = "/etc/nixos/.secrets/cloudflare_dns_tokend";
|
environmentFile = "/etc/nixos/.secrets/cloudflare_dns_tokend";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
|
@ -189,5 +192,4 @@ programs = {
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue