diff --git a/flake.nix b/flake.nix index ba7b919..a219183 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,13 @@ ./hosts/thinkpad/configuration.nix ]; }; + dell = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/dell/configuration.nix + ]; + }; }; darwinConfigurations = { diff --git a/hosts/dell/configuration.nix b/hosts/dell/configuration.nix new file mode 100644 index 0000000..f912e26 --- /dev/null +++ b/hosts/dell/configuration.nix @@ -0,0 +1,50 @@ +{ config, pkgs, inputs, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + inputs.home-manager.nixosModules.default + inputs.nixos-hardware.nixosModules.dell-xps-15-9560 + ../../modules/nixos/bootloader.nix + ../../modules/nixos/user.nix + ../../modules/nixos/i3.nix + ../../modules/nixos/nvidia.nix + ../../modules/nixos/nm.nix + ../../modules/nixos/sound.nix + ../../modules/nixos/env.nix + ../../modules/nixos/1password.nix + ]; + + boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelParams = [ "psmouse.synaptics_intertouch=0" ]; + + networking.hostName = "dell"; + + time.timeZone = "America/Toronto"; + + i18n.defaultLocale = "en_CA.UTF-8"; + + nixpkgs.config.allowUnfree = true; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + environment.systemPackages = with pkgs; [ + neovim + wget + git + curl + ]; + + home-manager = { + extraSpecialArgs = { inherit inputs; }; + useGlobalPkgs = true; + useUserPackages = true; + users = { + mthomson = import ./home.nix; + }; + }; + + system.stateVersion = "23.11"; + +} diff --git a/hosts/dell/hardware-configuration.nix b/hosts/dell/hardware-configuration.nix new file mode 100644 index 0000000..67db52f --- /dev/null +++ b/hosts/dell/hardware-configuration.nix @@ -0,0 +1,39 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/b0a1038d-556d-46e9-9289-fc5544d911c7"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/32F4-C54C"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/68b82471-92a3-4f6a-99a8-1dd5ae4f3f8b"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (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.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/dell/home.nix b/hosts/dell/home.nix new file mode 100644 index 0000000..bae1f40 --- /dev/null +++ b/hosts/dell/home.nix @@ -0,0 +1,46 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ../../modules/home-manager/i3 + ../../modules/home-manager/ssh + ../../modules/home-manager/git + ../../modules/home-manager/neovim + ../../modules/home-manager/wezterm + ../../modules/home-manager/zsh + ../../modules/home-manager/tmux + ../../modules/home-manager/taskwarrior + ../../modules/home-manager/zoxide + ../../modules/home-manager/eza + ../../modules/home-manager/bat + ../../modules/home-manager/irssi + ]; + home.username = "mthomson"; + home.homeDirectory = "/home/mthomson"; + home.stateVersion = "23.11"; + + programs = { + direnv = { + enable = true; + enableZshIntegration = true; # see note on other shells below + nix-direnv.enable = true; + }; + }; + + home.packages = with pkgs; [ + firefox + gcc + fzf + ripgrep + jq + protonup + lutris + pavucontrol + pasystray + networkmanagerapplet + upower + acpi + ]; + + programs.home-manager.enable = true; +}