diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 1a23576..f003868 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -1,10 +1,10 @@ -{ config, pkgs, ...}: +{ config, pkgs, lib, ...}: { # Use the systemd-boot EFI boot loader. boot.kernelPackages = pkgs.linuxPackages_latest; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + boot.loader.systemd-boot.enable = lib.mkDefault true; + boot.loader.efi.canTouchEfiVariables = lib.mkDefault true; nixpkgs.config.allowUnfree = true; @@ -15,9 +15,6 @@ ''; }; - networking.networkmanager.enable = true; - programs.nm-applet.enable = true; - # Set time zone. time.timeZone = "Europe/London"; @@ -32,11 +29,6 @@ virtualisation.docker.enable = true; - hardware.opengl.driSupport32Bit = true; - - hardware.bluetooth.enable = true; - services.blueman.enable = true; - hardware.cpu.intel.updateMicrocode = true; # Define a user account. Don't forget to set a password with ‘passwd’. @@ -44,7 +36,7 @@ isNormalUser = true; home = "/home/daniel"; initialPassword = "password"; - extraGroups = [ "wheel" "networkmanager" "docker" "video" ]; + extraGroups = [ "wheel" "networkmanager" "docker" "video" "syncthing" ]; shell = pkgs.zsh; }; @@ -74,27 +66,10 @@ }; services = { - - gnome.gnome-keyring.enable = true; - openssh.enable = true; - pipewire = { - enable = true; - pulse.enable = true; - }; - tailscale = { enable = true; }; }; - - # 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). - system.stateVersion = "21.05"; # Did you read the comment? - } diff --git a/hosts/common/graphical/default.nix b/hosts/common/graphical/default.nix index 9426a8a..a4f4c4a 100644 --- a/hosts/common/graphical/default.nix +++ b/hosts/common/graphical/default.nix @@ -3,30 +3,46 @@ { security.pam.services.gdm.enableGnomeKeyring = true; # Enable the X11 windowing system. - services.xserver = { - enable = true; - layout = "gb"; + hardware.opengl.driSupport32Bit = true; + hardware.bluetooth.enable = true; + services.blueman.enable = true; + networking.networkmanager.enable = true; + programs.nm-applet.enable = true; - libinput = { + + services = { + gnome.gnome-keyring.enable = true; + + pipewire = { + enable = true; + pulse.enable = true; + }; + + xserver = { enable = true; - mouse = { - accelProfile = "flat"; - accelSpeed = "1"; + layout = "gb"; + + libinput = { + enable = true; + mouse = { + accelProfile = "flat"; + accelSpeed = "1"; + }; }; - }; - displayManager = { - gdm.enable = true; - }; + displayManager = { + gdm.enable = true; + }; - windowManager.i3 = { - enable = true; - package = pkgs.i3-gaps; - extraPackages = with pkgs; [ - flameshot - i3lock - i3utils - ]; + windowManager.i3 = { + enable = true; + package = pkgs.i3-gaps; + extraPackages = with pkgs; [ + flameshot + i3lock + i3utils + ]; + }; }; }; } diff --git a/hosts/dingbox/configuration.nix b/hosts/dingbox/configuration.nix index 9f6bca0..171a018 100644 --- a/hosts/dingbox/configuration.nix +++ b/hosts/dingbox/configuration.nix @@ -29,5 +29,13 @@ networking.hostName = "dingbox"; # Define your hostname. networking.interfaces.enp5s0.useDHCP = true; networking.interfaces.wlp6s0.useDHCP = true; + + # 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). + system.stateVersion = "21.05"; # Did you read the comment? } diff --git a/hosts/dingserver/configuration.nix b/hosts/dingserver/configuration.nix index 8d54721..1efa214 100644 --- a/hosts/dingserver/configuration.nix +++ b/hosts/dingserver/configuration.nix @@ -1,52 +1,33 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { imports = [ # Include the results of the hardware scan. + ../common ./hardware-configuration.nix ./caddy.nix ./synapse.nix ./syncthing.nix ]; + # Force disable the common boot loader + boot.loader.systemd-boot.enable = lib.mkForce false; + boot.loader.efi.canTouchEfiVariables = lib.mkForce false; + # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; boot.loader.grub.version = 2; boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only networking.hostName = "dingserver"; - networking.useDHCP = false; networking.interfaces.ens3.useDHCP = true; - # nix flakes compatibility - nix = { - extraOptions = '' - experimental-features = nix-command flakes - ''; - }; - - users.users.daniel = { - isNormalUser = true; - extraGroups = [ "wheel" "syncthing" ]; # Enable ‘sudo’ for the user. - }; - environment.systemPackages = with pkgs; [ - curl - git helix - kitty + kitty # For terminfo lazygit - wget ]; - programs.neovim = { - enable = true; - vimAlias = true; - viAlias = true; - }; - - services.openssh.enable = true; - system.stateVersion = "21.11"; # Did you read the comment? } diff --git a/hosts/miniding/configuration.nix b/hosts/miniding/configuration.nix index 503c7fc..2ac7e73 100644 --- a/hosts/miniding/configuration.nix +++ b/hosts/miniding/configuration.nix @@ -22,5 +22,12 @@ dpi = 144; }; + # 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). + system.stateVersion = "21.05"; # Did you read the comment? } diff --git a/hosts/pingbox/configuration.nix b/hosts/pingbox/configuration.nix index 8e6615a..c23531d 100644 --- a/hosts/pingbox/configuration.nix +++ b/hosts/pingbox/configuration.nix @@ -48,5 +48,13 @@ HibernateDelaySec=600 ''; + # 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). + system.stateVersion = "21.05"; # Did you read the comment? + }