Skip to content

Commit

Permalink
Extract sigmachine specific components
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigmanificient committed Sep 14, 2024
1 parent 15ccd00 commit 5b0fdd6
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 66 deletions.
48 changes: 25 additions & 23 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,31 +100,33 @@
};
})
// {
nixosConfigurations.Bacon = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit username pkgs;
nixosConfigurations = {
Sigmachine = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit username pkgs;
};

modules = [
./system
./system/_sigmachine.nix
./hardware/sigmachine.hardware-configuration.nix
] ++ [
{ networking.hostName = "Sigmachine"; }
{ nixpkgs.hostPlatform = system; }
] ++ [
home-manager.nixosModules.home-manager
home-manager-config
] ++ [
hosts.nixosModule
({ networking.stevenBlackHosts.enable = true; })
] ++ (with nixos-hardware.nixosModules; [
asus-battery
common-pc-laptop
common-cpu-amd
common-pc-ssd
]);
};

modules = [
./system
./hardware-configuration.nix
] ++ [
{ networking.hostName = "Bacon"; }
{ nixpkgs.hostPlatform = system; }
] ++ [
home-manager.nixosModules.home-manager
home-manager-config
] ++ [
hosts.nixosModule
({
networking.stevenBlackHosts.enable = true;
})
] ++ (with nixos-hardware.nixosModules; [
asus-battery
common-pc-laptop
common-cpu-amd
common-pc-ssd
]);
};
};
}
File renamed without changes.
45 changes: 45 additions & 0 deletions system/_sigmachine.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{ config, pkgs, ... }: {
boot.initrd.kernelModules = [ "amdgpu" ];

services.xserver.videoDrivers = [ "nvidia" ];

hardware = {
nvidia = {
modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;

powerManagement.enable = false;
powerManagement.finegrained = false;

open = false;
nvidiaSettings = true;

prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};

amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
};

graphics = {
enable = true;

extraPackages = with pkgs; [
amdvlk
libvdpau-va-gl
nvidia-vaapi-driver
vaapiVdpau
vulkan-validation-layers
];
};
};

system = {
copySystemConfiguration = false;
stateVersion = "22.11";
};
}
44 changes: 1 addition & 43 deletions system/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

boot = {
consoleLogLevel = 0;
initrd = {
verbose = false;
kernelModules = [ "amdgpu" ];
};
initrd.verbose = false;

loader = {
efi.canTouchEfiVariables = true;
Expand Down Expand Up @@ -73,38 +70,6 @@

hardware = {
pulseaudio.enable = false;
graphics = {
enable = true;

extraPackages = with pkgs; [
amdvlk
libvdpau-va-gl
nvidia-vaapi-driver
vaapiVdpau
vulkan-validation-layers
];
};

nvidia = {
modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;

powerManagement.enable = false;
powerManagement.finegrained = false;

open = false;
nvidiaSettings = true;

prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};

amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
};
};

programs = {
Expand Down Expand Up @@ -190,8 +155,6 @@
"${ouioui}/share/X11/xkb/symbols/us_qwerty-fr";
};
};

videoDrivers = [ "nvidia" ];
windowManager.qtile.enable = true;
};

Expand Down Expand Up @@ -266,11 +229,6 @@
];
};

system = {
copySystemConfiguration = false;
stateVersion = "22.11";
};

qt.style = "adwaita-dark";
xdg.portal = {
enable = true;
Expand Down

0 comments on commit 5b0fdd6

Please sign in to comment.