diff --git a/systems/common.nix b/systems/common.nix index 8df31bf..9166b47 100644 --- a/systems/common.nix +++ b/systems/common.nix @@ -13,7 +13,19 @@ # hardware hardware.enableRedistributableFirmware = true; - networking.networkmanager.enable = true; + + # Network + networking = { + extraHosts = ""; + networkmanager = { + enable = true; + plugins = with pkgs; [ + networkmanager-openvpn + networkmanager-openconnect + ]; + }; + useDHCP = false; # Depreciated + }; # Bootloader boot.loader.systemd-boot.enable = true; @@ -23,8 +35,24 @@ boot.kernelPackages = pkgs.linuxPackages_latest; # Nix + nix = { + # Automate garbage collection + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + package = pkgs.nixVersions.stable; + modules.registry.nixpkgs.flake = inputs.nixpkgs; + settings = { + auto-optimise-store = true; + trusted-users = [ "root" "jsutter" ]; + experimental-features = [ "nix-command" "flakes" ]; + keep-outputs = true; + keep-derivations = true; + }; + }; system.stateVersion = "23.05"; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; nixpkgs.config.allowUnfree = true; # Location & internationalisation @@ -89,4 +117,20 @@ pinentryFlavor = "gnome3"; enableSSHSupport = true; }; + + # Docker & VirtualBox. + virtualisation = { + docker = { + enable = true; + autoPrune = { + enable = true; + dates = "weekly"; + }; + }; + virtualbox.host = { + enable = false; + enableExtensionPack = false; + }; + }; + users.extraGroups.vboxusers.members = [ "jsutter" ]; } diff --git a/users/jsutter.nix b/users/jsutter.nix index d02a896..b20e171 100644 --- a/users/jsutter.nix +++ b/users/jsutter.nix @@ -22,7 +22,7 @@ in users.users.jsutter = { isNormalUser = true; description = "Julian Sutter"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ "networkmanager" "wheel" "docker" ]; hashedPassword = "$6$tvkhGd24G6pVOsWr$j8ZAqSnXPTGwMGmIulU5Puzqd4iKdu8eAMSFis/cPqTW6u2xGQMqPHH1W9IZwKSL6.nS7Jc/NR2VwpPosyXDH/"; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBNVUh+RrcOSMRV6qysnsdPs5AyK8dSm4QhhnwgpikyI jsutter@symbiotrip.com" ]; packages = with pkgs; [