Add msi host

This commit is contained in:
outfoxxed 2023-07-27 01:17:17 -07:00
parent e8d8c1c788
commit b93969cf34
Signed by: outfoxxed
GPG Key ID: 4C88A185FB89301E
8 changed files with 116 additions and 1 deletions

View File

@ -50,6 +50,20 @@
outputs = inputs @ { self, nixpkgs, ... }: {
nixosConfigurations = {
msi = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = { inherit self system inputs; };
modules = [
./modules/impurity.nix
./modules/preserve-system.nix
./modules/devenv
./modules/system.nix
./modules/hyprland
./systems/msi
];
};
lenovo = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = { inherit self system inputs; };
@ -64,6 +78,7 @@
];
};
msi-impure = self.nixosConfigurations.msi.extendModules { modules = [ { impurity.enable = true; } ]; };
lenovo-impure = self.nixosConfigurations.lenovo.extendModules { modules = [ { impurity.enable = true; } ]; };
};

View File

@ -21,6 +21,8 @@
environment.systemPackages = with pkgs; [
git
vim
];
networking = {
networkmanager = {
enable = true;
@ -41,5 +43,4 @@
# removable disks in file manager
services.udisks2.enable = true;
];
}

11
systems/msi/default.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, ... }: {
imports = [
./hardware.nix
./mullvad.nix
./hyprland
];
system.stateVersion = "23.11";
networking.hostName = "msi";
time.timeZone = "America/Vancouver";
}

View File

@ -0,0 +1,36 @@
# 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 = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c9cb1730-c0d1-4a2e-a092-12dfa7098476";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/9BF9-E3ED";
fsType = "vfat";
};
swapDevices = [ ];
# 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.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

18
systems/msi/hardware.nix Normal file
View File

@ -0,0 +1,18 @@
{ pkgs, ... }: {
imports = [ ./hardware-configuration.nix ];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
rocm-opencl-icd
amdvlk
];
extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
];
};
}

View File

@ -0,0 +1,6 @@
{ impurity, ... }: {
hyprland-session = {
prerun = "export WLR_DRM_DEVICES=/dev/dri/card0:/dev/dri/card1";
extraConfig = "source = ${impurity.link ./hyprland.conf}";
};
}

View File

@ -0,0 +1,24 @@
monitor = eDP-1, 1920x1080@240Hz, 0x1440, 1
monitor = DP-1, 5120x1440@120Hz, 1350x0, 1
monitor = , preferred, auto, 1
workspace = 01, monitor:DP-1, default:true
workspace = 02, monitor:DP-1
workspace = 03, monitor:DP-1
workspace = 04, monitor:DP-1
workspace = 05, monitor:DP-1
workspace = 06, monitor:DP-1
workspace = 07, monitor:DP-1
workspace = 08, monitor:DP-1
workspace = 09, monitor:DP-1
workspace = 10, monitor:DP-1
workspace = 11, monitor:eDP-1, default:true
workspace = 12, monitor:eDP-1
workspace = 13, monitor:eDP-1
workspace = 14, monitor:eDP-1
workspace = 15, monitor:eDP-1
workspace = 16, monitor:eDP-1
workspace = 17, monitor:eDP-1
workspace = 18, monitor:eDP-1
workspace = 19, monitor:eDP-1
workspace = 20, monitor:eDP-1

4
systems/msi/mullvad.nix Normal file
View File

@ -0,0 +1,4 @@
{ pkgs, config, ... }: {
services.mullvad-vpn.enable = true;
home-manager.users.${config.main-user}.home.packages = [ pkgs.mullvad-vpn ];
}