Compare commits
3 commits
357c8d36d0
...
23d4350b1c
Author | SHA1 | Date | |
---|---|---|---|
23d4350b1c | |||
cf374d5c99 | |||
49a8f719ec |
7 changed files with 98 additions and 16 deletions
|
@ -280,7 +280,7 @@
|
||||||
specialArgs = mkSpecialArgs system;
|
specialArgs = mkSpecialArgs system;
|
||||||
|
|
||||||
modules = linuxOfflineGuiModules [
|
modules = linuxOfflineGuiModules [
|
||||||
./nixos/hosts/valere.nix
|
./nixos/hosts/valere
|
||||||
./nixos/configs/steam.nix
|
./nixos/configs/steam.nix
|
||||||
./nixos/configs/vmware.nix
|
./nixos/configs/vmware.nix
|
||||||
./nixos/configs/power-saving.nix
|
./nixos/configs/power-saving.nix
|
||||||
|
|
38
nixos/configs/ccache.nix
Normal file
38
nixos/configs/ccache.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
#
|
||||||
|
# Support for using Ccache.
|
||||||
|
#
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
programs.ccache.enable = true;
|
||||||
|
nix.settings.extra-sandbox-paths = [ config.programs.ccache.cacheDir ];
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: {
|
||||||
|
ccacheWrapper = super.ccacheWrapper.override {
|
||||||
|
extraConfig = ''
|
||||||
|
export CCACHE_COMPRESS=1
|
||||||
|
export CCACHE_DIR="${config.programs.ccache.cacheDir}"
|
||||||
|
export CCACHE_UMASK=007
|
||||||
|
if [ ! -d "$CCACHE_DIR" ]; then
|
||||||
|
echo "====="
|
||||||
|
echo "Directory '$CCACHE_DIR' does not exist"
|
||||||
|
echo "Please create it with:"
|
||||||
|
echo " sudo mkdir -m0770 '$CCACHE_DIR'"
|
||||||
|
echo " sudo chown root:nixbld '$CCACHE_DIR'"
|
||||||
|
echo "====="
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ ! -w "$CCACHE_DIR" ]; then
|
||||||
|
echo "====="
|
||||||
|
echo "Directory '$CCACHE_DIR' is not accessible for user $(whoami)"
|
||||||
|
echo "Please verify its access permissions"
|
||||||
|
echo "====="
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
# Use this for kernel packages.
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,4 +1,7 @@
|
||||||
{ deprekages, pkgs, ... }:
|
{ deprekages, pkgs, ... }:
|
||||||
|
let
|
||||||
|
difft = "${pkgs.difftastic}/bin/difft";
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -11,13 +14,22 @@
|
||||||
# Note: we no longer set a name, here, forcing us to choose our e-mail and username
|
# Note: we no longer set a name, here, forcing us to choose our e-mail and username
|
||||||
# on a per-project basis.
|
# on a per-project basis.
|
||||||
|
|
||||||
# Proide the difftastic command.
|
|
||||||
difftastic.enable = true;
|
|
||||||
|
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
# Use main as our branch names.
|
# Use main as our branch names.
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
|
|
||||||
|
#
|
||||||
|
# Use difftastic.
|
||||||
|
#
|
||||||
|
alias = {
|
||||||
|
dlog = "-c diff.external=${difft} log --ext-diff";
|
||||||
|
dshow = "-c diff.external=${difft} show --ext-diff";
|
||||||
|
ddiff = "-c diff.external=${difft} diff";
|
||||||
|
dl = "-c diff.external=${difft} log -p --ext-diff";
|
||||||
|
ds = "-c diff.external=${difft} show --ext-diff";
|
||||||
|
dd = "-c diff.external=${difft} diff";
|
||||||
|
};
|
||||||
|
|
||||||
#
|
#
|
||||||
# Use mergiraf.
|
# Use mergiraf.
|
||||||
#
|
#
|
||||||
|
|
|
@ -228,6 +228,7 @@ in
|
||||||
"XF86Launch6".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1-";
|
"XF86Launch6".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1-";
|
||||||
"XF86Tools".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1+";
|
"XF86Tools".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 0.1+";
|
||||||
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||||
|
"XF86AudioMicMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||||
|
|
||||||
"XF86MonBrightnessDown".action = sh "brightnessctl set 10%-";
|
"XF86MonBrightnessDown".action = sh "brightnessctl set 10%-";
|
||||||
"XF86MonBrightnessUp".action = sh "brightnessctl set 10%+";
|
"XF86MonBrightnessUp".action = sh "brightnessctl set 10%+";
|
||||||
|
|
|
@ -32,7 +32,8 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
protocol = "ssh";
|
protocol = "ssh";
|
||||||
|
|
||||||
hostName = "trailblazer.kate.tailnet.polytheon.org";
|
#hostName = "trailblazer.kate.tailnet.polytheon.org";
|
||||||
|
hostName = "100.64.0.12";
|
||||||
|
|
||||||
sshUser = "deprekated";
|
sshUser = "deprekated";
|
||||||
sshKey = "/home/deprekated/.ssh/id_ed25519";
|
sshKey = "/home/deprekated/.ssh/id_ed25519";
|
||||||
|
|
21
nixos/hosts/valere/00-support-dell-smbios.patch
Normal file
21
nixos/hosts/valere/00-support-dell-smbios.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
v2:
|
||||||
|
- Commit message reflects Alienware devices may not necessarily support
|
||||||
|
the SMBIOS interface
|
||||||
|
- Commit message now has "Tested on"
|
||||||
|
---
|
||||||
|
drivers/platform/x86/dell/dell-smbios-base.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/platform/x86/dell/dell-smbios-base.c b/drivers/platform/x86/dell/dell-smbios-base.c
|
||||||
|
index 73e41eb69..01c72b91a 100644
|
||||||
|
--- a/drivers/platform/x86/dell/dell-smbios-base.c
|
||||||
|
+++ b/drivers/platform/x86/dell/dell-smbios-base.c
|
||||||
|
@@ -576,6 +576,7 @@ static int __init dell_smbios_init(void)
|
||||||
|
int ret, wmi, smm;
|
||||||
|
|
||||||
|
if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
|
||||||
|
+ !dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL) &&
|
||||||
|
!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
|
||||||
|
pr_err("Unable to run on non-Dell system\n");
|
||||||
|
return -ENODEV;
|
|
@ -53,7 +53,8 @@
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
# Set up the NVIDIA half of the GPU setup.
|
# Set up the NVIDIA half of the GPU setup.
|
||||||
system.nixos.tags = ["NVIDIA" "Intel"];
|
# These are used only in the "enabled" configuration.
|
||||||
|
system.nixos.tags = ["Intel"];
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
|
|
||||||
|
@ -74,18 +75,15 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Provide a way to disable the NVIDIA GPU entirely,
|
# Disable the NVIDIA GPU unless we explicitly request it.
|
||||||
# for points when traveling where we don't want to burn power.
|
|
||||||
specialisation.lowpower.configuration = {
|
|
||||||
system.nixos.tags = lib.mkForce ["Intel"];
|
|
||||||
|
|
||||||
# Disable the NVIDIA GPU.
|
|
||||||
hardware.nvidiaOptimus.disable = true;
|
hardware.nvidiaOptimus.disable = true;
|
||||||
|
|
||||||
# These don't actually do anything, but they make introspecting
|
# Provide a configuration that uses the full GPU power of the system.
|
||||||
# the configuration a bit nicer.
|
specialisation.optimus.configuration = {
|
||||||
hardware.nvidia.modesetting.enable = lib.mkForce false;
|
system.nixos.tags = lib.mkForce ["NVIDIA"];
|
||||||
hardware.nvidia.prime.sync.enable = lib.mkForce false;
|
|
||||||
|
# Don't disable optimus on this config.
|
||||||
|
hardware.nvidiaOptimus.disable = lib.mkForce false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Provide memtest86, since that's nice.
|
# Provide memtest86, since that's nice.
|
||||||
|
@ -117,6 +115,17 @@
|
||||||
];
|
];
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.acpi_call ];
|
boot.extraModulePackages = [ config.boot.kernelPackages.acpi_call ];
|
||||||
|
|
||||||
|
# Support the Dell Privacy Driver.
|
||||||
|
boot.kernelPatches = [ {
|
||||||
|
name = "enable-dell-privacy";
|
||||||
|
patch = ./00-support-dell-smbios.patch;
|
||||||
|
|
||||||
|
extraStructuredConfig = with lib.kernel; {
|
||||||
|
DELL_WMI_PRIVACY = yes;
|
||||||
|
};
|
||||||
|
|
||||||
|
} ];
|
||||||
|
|
||||||
# Support thunderbolt.
|
# Support thunderbolt.
|
||||||
services.hardware.bolt.enable = true;
|
services.hardware.bolt.enable = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue