added nas hostname
This commit is contained in:
parent
642d297710
commit
2d8b2e985a
|
@ -1,37 +1,45 @@
|
|||
# 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
|
||||
];
|
||||
|
||||
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}";
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
powerManagement.enable = false;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sdc";
|
||||
boot.loader.grub.useOSProber = true;
|
||||
networking = {
|
||||
hostName = "nixos"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
networking.hostName = "nixos"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
# Enable networking
|
||||
networkmanager.enable = true;
|
||||
|
||||
# Enable networking
|
||||
networking.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";
|
||||
|
@ -99,10 +107,10 @@
|
|||
users.users.sondell = {
|
||||
isNormalUser = true;
|
||||
description = "sondell";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
# thunderbird
|
||||
# thunderbird
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -111,15 +119,14 @@
|
|||
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMYGJCpFIiWqzy8YbfWh7+i52XVwyhUu+P0rUglVR5uV gws@nixos"];
|
||||
};
|
||||
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
htop
|
||||
cloudflared
|
||||
filebrowser
|
||||
|
@ -133,22 +140,21 @@
|
|||
tailscale
|
||||
alejandra
|
||||
];
|
||||
programs = {
|
||||
|
||||
ssh.startAgent = true;
|
||||
fish= {
|
||||
enable=true;
|
||||
shellInit = "starship init fish | source";
|
||||
};
|
||||
starship.enable = true;
|
||||
starship.settings = {
|
||||
shell = {
|
||||
disabled = false;
|
||||
fish_indicator = "";
|
||||
bash_indicator = "BASH";
|
||||
programs = {
|
||||
ssh.startAgent = true;
|
||||
fish = {
|
||||
enable = true;
|
||||
shellInit = "starship init fish | source";
|
||||
};
|
||||
starship.enable = true;
|
||||
starship.settings = {
|
||||
shell = {
|
||||
disabled = false;
|
||||
fish_indicator = "";
|
||||
bash_indicator = "BASH";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
|
@ -169,14 +175,11 @@ programs = {
|
|||
defaults = {
|
||||
email = "glennpub@proton.me";
|
||||
dnsProvider = "cloudflare";
|
||||
# # location of your CLOUDFLARE_DNS_API_TOKEN=[value]
|
||||
# # https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#EnvironmentFile=
|
||||
# # location of your CLOUDFLARE_DNS_API_TOKEN=[value]
|
||||
# # https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#EnvironmentFile=
|
||||
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?
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue