From 73ae74ca1fab120323708bd0c7a1aded37baf319 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 26 Jul 2024 20:20:25 -0400 Subject: [PATCH] thelio76: network --- config/hosts/nixos76/default.nix | 96 ++++--------------- .../hosts/nixos76/hardware-configuration.nix | 2 +- config/modules/system76-pc.nix | 14 ++- 3 files changed, 33 insertions(+), 79 deletions(-) diff --git a/config/hosts/nixos76/default.nix b/config/hosts/nixos76/default.nix index 07466cb..f38dc9d 100644 --- a/config/hosts/nixos76/default.nix +++ b/config/hosts/nixos76/default.nix @@ -9,24 +9,7 @@ ./hardware-configuration.nix ]; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - nixpkgs.config.allowUnfree = true; - nixpkgs.config.permittedInsecurePackages = [ - "electron-25.9.0" - ]; - - - hardware.system76.enableAll = true; - - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "nixos76"; # Define your hostname. - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. # What was this for? maybe wireguard? networking.firewall = { @@ -71,21 +54,6 @@ }; }; - # Set your time zone. - time.timeZone = "America/New_York"; - - # 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"; - # useXkbConfig = true; # use xkbOptions in tty. - # }; - # Add LUKS external drive mount environment.etc.crypttab = { enable = true; @@ -112,42 +80,42 @@ # Enable the X11 windowing system. - services.xserver.enable = true; + # services.xserver.enable = true; services.xserver.desktopManager.xfce.enable = true; services.displayManager.defaultSession = "xfce"; - hardware.graphics.enable = true; - hardware.graphics.extraPackages = [ - pkgs.intel-media-driver - ]; - hardware.graphics.extraPackages32 = [ - pkgs.intel-media-driver - pkgs.pkgsi686Linux.libva - ]; + # hardware.graphics.enable = true; + # hardware.graphics.extraPackages = [ + # pkgs.intel-media-driver + # ]; + # hardware.graphics.extraPackages32 = [ + # pkgs.intel-media-driver + # pkgs.pkgsi686Linux.libva + # ]; # Configure keymap in X11 # services.xserver.layout = "us"; # services.xserver.xkbOptions = "eurosign:e,caps:escape"; # Enable blueooth - hardware.bluetooth.enable = true; + # hardware.bluetooth.enable = true; # Enable sound. # sound.enable = true; - hardware.pulseaudio = { - enable = true; - package = pkgs.pulseaudioFull; - support32Bit = true; - }; + # hardware.pulseaudio = { + # enable = true; + # package = pkgs.pulseaudioFull; + # support32Bit = 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.alex = { - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. - }; + # users.users.alex = { + # isNormalUser = true; + # extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. + # }; fileSystems."/home/alex/Documents" = { device = "/media/external/Documents"; @@ -235,38 +203,12 @@ services.blueman.enable = true; - services.printing.enable = true; - services.avahi = { enable = true; nssmdns4 = true; openFirewall = true; }; - # 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; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - # system.copySystemConfiguration = 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 diff --git a/config/hosts/nixos76/hardware-configuration.nix b/config/hosts/nixos76/hardware-configuration.nix index 3b5ca8d..c194af6 100644 --- a/config/hosts/nixos76/hardware-configuration.nix +++ b/config/hosts/nixos76/hardware-configuration.nix @@ -33,7 +33,7 @@ # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; + # networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp58s0f1.useDHCP = lib.mkDefault true; # networking.interfaces.wlp59s0.useDHCP = lib.mkDefault true; diff --git a/config/modules/system76-pc.nix b/config/modules/system76-pc.nix index 9a8fe05..3f4637f 100644 --- a/config/modules/system76-pc.nix +++ b/config/modules/system76-pc.nix @@ -54,10 +54,22 @@ variant = ""; }; + # Hardware + hardware.graphics.enable = true; + hardware.graphics.extraPackages = [ + pkgs.intel-media-driver + ]; + hardware.graphics.extraPackages32 = [ + pkgs.intel-media-driver + pkgs.pkgsi686Linux.libva + ]; + + hardware.pulseaudio.enable = false; + hardware.bluetooth.enable = true; + # Enable CUPS to print documents. services.printing.enable = true; - hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true;