From b61ae77b71d3facaed5d50f86bed788048f4b5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 18 Oct 2021 23:17:15 +0200 Subject: [PATCH] Remove useless defaults We know how nixos works --- hosts/containers/deployer/configuration.nix | 5 -- hosts/containers/lxc-template.nix | 4 -- hosts/containers/nix-build/configuration.nix | 57 ------------------- hosts/containers/prometheus/configuration.nix | 6 -- hosts/containers/registry/configuration.nix | 5 -- hosts/pulsebert/default.nix | 4 -- hosts/storage-ng/configuration.nix | 33 ++++------- 7 files changed, 12 insertions(+), 102 deletions(-) diff --git a/hosts/containers/deployer/configuration.nix b/hosts/containers/deployer/configuration.nix index c1dd21df..20ad96b2 100644 --- a/hosts/containers/deployer/configuration.nix +++ b/hosts/containers/deployer/configuration.nix @@ -1,7 +1,3 @@ -# 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, ... }: { @@ -73,5 +69,4 @@ security.sudo.wheelNeedsPassword = false; system.stateVersion = "19.09"; # Did you read the comment? - } diff --git a/hosts/containers/lxc-template.nix b/hosts/containers/lxc-template.nix index e6a69c02..180edd35 100644 --- a/hosts/containers/lxc-template.nix +++ b/hosts/containers/lxc-template.nix @@ -1,7 +1,3 @@ -# 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, modulesPath, ... }: { diff --git a/hosts/containers/nix-build/configuration.nix b/hosts/containers/nix-build/configuration.nix index 24b5abc2..0655ea6b 100644 --- a/hosts/containers/nix-build/configuration.nix +++ b/hosts/containers/nix-build/configuration.nix @@ -1,12 +1,7 @@ -# 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 ]; @@ -29,9 +24,7 @@ }; networking.hostName = "nix-build"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - # Set your time zone. # time.timeZone = "Europe/Amsterdam"; # The global useDHCP flag is deprecated, therefore explicitly set to false here. @@ -40,66 +33,16 @@ networking.useDHCP = false; networking.interfaces.enp6s18.useDHCP = true; - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # }; - - - - # Configure keymap in X11 - # services.xserver.layout = "us"; - # services.xserver.xkbOptions = "eurosign:e"; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - # Enable sound. - # sound.enable = true; - # hardware.pulseaudio.enable = true; - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - # users.users.jane = { - # isNormalUser = true; - # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - # }; - - # List packages installed in system profile. To search, run: - # $ nix search wget environment.systemPackages = with pkgs; [ wget vim git ]; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. services.openssh.enable = true; services.openssh.permitRootLogin = "yes"; - # Open ports in the firewall. networking.firewall.allowedTCPPorts = [ 22 ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/hosts/containers/prometheus/configuration.nix b/hosts/containers/prometheus/configuration.nix index a4de3916..1c92e9ae 100644 --- a/hosts/containers/prometheus/configuration.nix +++ b/hosts/containers/prometheus/configuration.nix @@ -1,7 +1,3 @@ -# 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, ... }: { @@ -70,7 +66,6 @@ exporters.nginx.enable = true; exporters.nginx.openFirewall = true; - }; services.nginx = { @@ -88,5 +83,4 @@ }; system.stateVersion = "20.09"; # Did you read the comment? - } diff --git a/hosts/containers/registry/configuration.nix b/hosts/containers/registry/configuration.nix index 59d0f69f..f249ee81 100644 --- a/hosts/containers/registry/configuration.nix +++ b/hosts/containers/registry/configuration.nix @@ -1,7 +1,3 @@ -# 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, ... }: { @@ -37,7 +33,6 @@ #}; }; - # Open ports in the firewall. networking.firewall.allowedTCPPorts = [ 22 80 443 5000 ]; services.dockerRegistry = { diff --git a/hosts/pulsebert/default.nix b/hosts/pulsebert/default.nix index ba3ae9bb..6e227dc2 100644 --- a/hosts/pulsebert/default.nix +++ b/hosts/pulsebert/default.nix @@ -1,7 +1,3 @@ -# 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, lib, pkgs, ... }: let diff --git a/hosts/storage-ng/configuration.nix b/hosts/storage-ng/configuration.nix index 3d34c560..e37483f6 100644 --- a/hosts/storage-ng/configuration.nix +++ b/hosts/storage-ng/configuration.nix @@ -1,12 +1,11 @@ -# 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, strings, ... }: -let eth0 = "ens18"; -in { - imports = [ # Include the results of the hardware scan. +let + eth0 = "ens18"; +in +{ + imports = [ + # Include the results of the hardware scan. ./hardware-configuration.nix ../../lib # ../../lib/hq.nix @@ -43,7 +42,6 @@ in { }; defaultGateway.interface = eth0; - }; environment.systemPackages = with pkgs; [ @@ -68,7 +66,6 @@ in { # does not exist yet # secretfile does not work :( - fileSystems."/mnt/cephfs" = { device = "172.22.99.13:6789:/"; fsType = "ceph"; @@ -83,15 +80,10 @@ in { ]; }; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. programs.bash.enableCompletion = true; programs.mtr.enable = true; # programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; - # List services that you want to enable: - - # Enable the OpenSSH daemon. services.openssh = { enable = true; allowSFTP = true; @@ -103,16 +95,15 @@ in { }; /* # Open ports in the firewall. - networking.firewall.allowedTCPPorts = [ - 23 - ]; - networking.firewall.allowedUDPPorts = [ - 69 - ]; + networking.firewall.allowedTCPPorts = [ + 23 + ]; + networking.firewall.allowedUDPPorts = [ + 69 + ]; */ networking.firewall.enable = false; system.stateVersion = "19.03"; # Did you read the comment? - }