Start adding apps
This commit is contained in:
parent
365623390b
commit
76e19d182d
@ -9,6 +9,7 @@
|
|||||||
# ./disko.nix
|
# ./disko.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
# ./impermanence.nix
|
# ./impermanence.nix
|
||||||
|
./ga403
|
||||||
# Profiles
|
# Profiles
|
||||||
../../modules
|
../../modules
|
||||||
# Users
|
# Users
|
||||||
@ -21,12 +22,15 @@
|
|||||||
|
|
||||||
# Custom modules
|
# Custom modules
|
||||||
unfree.enable = true;
|
unfree.enable = true;
|
||||||
|
nvidia.enable = true;
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
desktop.hostMonitorSettings = "
|
desktop.hostSettings = "
|
||||||
monitor = desc:Samsung Display Corp. ATNA40CU05-0, 2880x1800@120, auto, 1.5
|
monitor = desc:Samsung Display Corp. ATNA40CU05-0, 2880x1800@120, auto, 1.5
|
||||||
|
|
||||||
|
exec-once = asus-ctl slash -d; asusctl -c 80
|
||||||
";
|
";
|
||||||
|
|
||||||
# gaming.enable = true;
|
gaming.enable = true;
|
||||||
# gsr.defaultAudioDevice = "alsa_output.usb-Schiit_Audio_Schiit_Modi_-00.analog-stereo.monitor"; # alsa_output.usb-Generic_USB_Audio-00.analog-stereo.monitor
|
# gsr.defaultAudioDevice = "alsa_output.usb-Schiit_Audio_Schiit_Modi_-00.analog-stereo.monitor"; # alsa_output.usb-Generic_USB_Audio-00.analog-stereo.monitor
|
||||||
# low-latency.enable = false;
|
# low-latency.enable = false;
|
||||||
# vhs-decode.enable = true;
|
# vhs-decode.enable = true;
|
||||||
|
|||||||
6
hosts/orion/ga403/common/cpu/amd/default.nix
Normal file
6
hosts/orion/ga403/common/cpu/amd/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
hardware.cpu.amd.updateMicrocode =
|
||||||
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
32
hosts/orion/ga403/common/cpu/amd/pstate.nix
Normal file
32
hosts/orion/ga403/common/cpu/amd/pstate.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{ lib, config, ... }:
|
||||||
|
let
|
||||||
|
kver = config.boot.kernelPackages.kernel.version;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Enables the amd cpu scaling https://www.kernel.org/doc/html/latest/admin-guide/pm/amd-pstate.html
|
||||||
|
# On recent AMD CPUs this can be more energy efficient.
|
||||||
|
|
||||||
|
imports = [ ./. ];
|
||||||
|
boot = lib.mkMerge [
|
||||||
|
(lib.mkIf
|
||||||
|
(
|
||||||
|
(lib.versionAtLeast kver "5.17")
|
||||||
|
&& (lib.versionOlder kver "6.1")
|
||||||
|
)
|
||||||
|
{
|
||||||
|
kernelParams = [ "initcall_blacklist=acpi_cpufreq_init" ];
|
||||||
|
kernelModules = [ "amd-pstate" ];
|
||||||
|
})
|
||||||
|
(lib.mkIf
|
||||||
|
(
|
||||||
|
(lib.versionAtLeast kver "6.1")
|
||||||
|
&& (lib.versionOlder kver "6.3")
|
||||||
|
)
|
||||||
|
{
|
||||||
|
kernelParams = [ "amd_pstate=passive" ];
|
||||||
|
})
|
||||||
|
(lib.mkIf (lib.versionAtLeast kver "6.3") {
|
||||||
|
kernelParams = [ "amd_pstate=active" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
26
hosts/orion/ga403/common/cpu/amd/raphael/igpu.nix
Normal file
26
hosts/orion/ga403/common/cpu/amd/raphael/igpu.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Sets the kernel version to the latest kernel to make the usage of the iGPU possible if your kernel version is too old
|
||||||
|
# Disables scatter/gather which was introduced with kernel version 6.2
|
||||||
|
# It produces completely white or flashing screens when enabled while using the iGPU of Ryzen 7000-series CPUs (Raphael)
|
||||||
|
# This issue is not seen in kernel 6.6 or newer versions
|
||||||
|
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
boot = lib.mkMerge [
|
||||||
|
(lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") {
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
})
|
||||||
|
|
||||||
|
(lib.mkIf (
|
||||||
|
(lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2")
|
||||||
|
&& (lib.versionOlder config.boot.kernelPackages.kernel.version "6.6")
|
||||||
|
) { kernelParams = [ "amdgpu.sg_display=0" ]; })
|
||||||
|
];
|
||||||
|
}
|
||||||
10
hosts/orion/ga403/common/cpu/amd/zenpower.nix
Normal file
10
hosts/orion/ga403/common/cpu/amd/zenpower.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
# Enables the zenpower sensor in lieu of the k10temp sensor on Zen CPUs https://git.exozy.me/a/zenpower3
|
||||||
|
# On Zen CPUs zenpower produces much more data entries
|
||||||
|
|
||||||
|
imports = [ ./. ];
|
||||||
|
boot.blacklistedKernelModules = [ "k10temp" ];
|
||||||
|
boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ];
|
||||||
|
boot.kernelModules = [ "zenpower" ];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/alder-lake
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
6
hosts/orion/ga403/common/cpu/intel/bay-trail/default.nix
Normal file
6
hosts/orion/ga403/common/cpu/intel/bay-trail/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/bay-trail
|
||||||
|
];
|
||||||
|
}
|
||||||
5
hosts/orion/ga403/common/cpu/intel/braswell/cpu-only.nix
Normal file
5
hosts/orion/ga403/common/cpu/intel/braswell/cpu-only.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
6
hosts/orion/ga403/common/cpu/intel/braswell/default.nix
Normal file
6
hosts/orion/ga403/common/cpu/intel/braswell/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/braswell
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
6
hosts/orion/ga403/common/cpu/intel/broadwell/default.nix
Normal file
6
hosts/orion/ga403/common/cpu/intel/broadwell/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/broadwell
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/coffee-lake
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/comet-lake
|
||||||
|
];
|
||||||
|
}
|
||||||
4
hosts/orion/ga403/common/cpu/intel/cpu-only.nix
Normal file
4
hosts/orion/ga403/common/cpu/intel/cpu-only.nix
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
6
hosts/orion/ga403/common/cpu/intel/default.nix
Normal file
6
hosts/orion/ga403/common/cpu/intel/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../gpu/intel
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/elkhart-lake
|
||||||
|
];
|
||||||
|
}
|
||||||
5
hosts/orion/ga403/common/cpu/intel/haswell/cpu-only.nix
Normal file
5
hosts/orion/ga403/common/cpu/intel/haswell/cpu-only.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
6
hosts/orion/ga403/common/cpu/intel/haswell/default.nix
Normal file
6
hosts/orion/ga403/common/cpu/intel/haswell/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/haswell
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/jasper-lake
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
6
hosts/orion/ga403/common/cpu/intel/kaby-lake/default.nix
Normal file
6
hosts/orion/ga403/common/cpu/intel/kaby-lake/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/kaby-lake
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/lunar-lake
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/sandy-bridge
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../cpu-only.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./cpu-only.nix
|
||||||
|
../../../gpu/intel/tiger-lake
|
||||||
|
];
|
||||||
|
}
|
||||||
15
hosts/orion/ga403/common/gpu/24.05-compat.nix
Normal file
15
hosts/orion/ga403/common/gpu/24.05-compat.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# Backward-compat for 24.05, can be removed after we drop 24.05 support
|
||||||
|
imports = lib.optionals (lib.versionOlder lib.version "24.11pre") [
|
||||||
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "enable" ] [ "hardware" "opengl" "enable" ])
|
||||||
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages" ] [ "hardware" "opengl" "extraPackages" ])
|
||||||
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "extraPackages32" ] [ "hardware" "opengl" "extraPackages32" ])
|
||||||
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "enable32Bit" ] [ "hardware" "opengl" "driSupport32Bit" ])
|
||||||
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "package" ] [ "hardware" "opengl" "package" ])
|
||||||
|
(lib.mkAliasOptionModule [ "hardware" "graphics" "package32" ] [ "hardware" "opengl" "package32" ])
|
||||||
|
];
|
||||||
|
}
|
||||||
15
hosts/orion/ga403/common/gpu/amd/default.nix
Normal file
15
hosts/orion/ga403/common/gpu/amd/default.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ../24.05-compat.nix ];
|
||||||
|
config = {
|
||||||
|
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
|
||||||
|
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
enable32Bit = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.amdgpu.initrd.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
}
|
||||||
5
hosts/orion/ga403/common/gpu/amd/sea-islands/default.nix
Normal file
5
hosts/orion/ga403/common/gpu/amd/sea-islands/default.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
# Explicitly set amdgpu support in place of radeon
|
||||||
|
boot.kernelParams = [ "radeon.cik_support=0" "amdgpu.cik_support=1" ];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
# Explicitly set amdgpu support in place of radeon
|
||||||
|
boot.kernelParams = [ "radeon.si_support=0" "amdgpu.si_support=1" ];
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
hardware.intelgpu.vaapiDriver = "intel-media-driver";
|
||||||
|
}
|
||||||
10
hosts/orion/ga403/common/gpu/intel/bay-trail/default.nix
Normal file
10
hosts/orion/ga403/common/gpu/intel/bay-trail/default.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
hardware.intelgpu = {
|
||||||
|
vaapiDriver = "intel-vaapi-driver";
|
||||||
|
enableHybridCodec = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
hosts/orion/ga403/common/gpu/intel/braswell/default.nix
Normal file
10
hosts/orion/ga403/common/gpu/intel/braswell/default.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
hardware.intelgpu = {
|
||||||
|
vaapiDriver = "intel-vaapi-driver";
|
||||||
|
enableHybridCodec = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
hosts/orion/ga403/common/gpu/intel/broadwell/default.nix
Normal file
10
hosts/orion/ga403/common/gpu/intel/broadwell/default.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
hardware.intelgpu = {
|
||||||
|
vaapiDriver = "intel-vaapi-driver";
|
||||||
|
enableHybridCodec = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
11
hosts/orion/ga403/common/gpu/intel/coffee-lake/default.nix
Normal file
11
hosts/orion/ga403/common/gpu/intel/coffee-lake/default.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
boot.kernelParams = [
|
||||||
|
"i915.enable_guc=2"
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.intelgpu.vaapiDriver = "intel-media-driver";
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
boot.kernelParams = [ "i915.enable_guc=2" ];
|
||||||
|
|
||||||
|
hardware.intelgpu.vaapiDriver = "intel-media-driver";
|
||||||
|
}
|
||||||
86
hosts/orion/ga403/common/gpu/intel/default.nix
Normal file
86
hosts/orion/ga403/common/gpu/intel/default.nix
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ ../24.05-compat.nix ];
|
||||||
|
|
||||||
|
options.hardware.intelgpu = {
|
||||||
|
driver = lib.mkOption {
|
||||||
|
description = "Intel GPU driver to use";
|
||||||
|
type = lib.types.enum [
|
||||||
|
"i915"
|
||||||
|
"xe"
|
||||||
|
];
|
||||||
|
default = "i915";
|
||||||
|
};
|
||||||
|
|
||||||
|
loadInInitrd =
|
||||||
|
lib.mkEnableOption "Load the Intel GPU kernel module at stage 1 boot. (Added to `boot.initrd.kernelModules`)"
|
||||||
|
// {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
vaapiDriver = lib.mkOption {
|
||||||
|
description = "Intel VAAPI driver to use (use null to use both)";
|
||||||
|
type = lib.types.nullOr (
|
||||||
|
lib.types.enum [
|
||||||
|
"intel-vaapi-driver"
|
||||||
|
"intel-media-driver"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
default = null; # Use both drivers when we don't know which one to use
|
||||||
|
};
|
||||||
|
|
||||||
|
enableHybridCodec = lib.mkEnableOption "hybrid codec support for Intel GPUs";
|
||||||
|
};
|
||||||
|
|
||||||
|
config =
|
||||||
|
let
|
||||||
|
cfg = config.hardware.intelgpu;
|
||||||
|
|
||||||
|
useIntelVaapiDriver = cfg.vaapiDriver == "intel-vaapi-driver" || cfg.vaapiDriver == null;
|
||||||
|
intel-vaapi-driver = (pkgs.intel-vaapi-driver or pkgs.vaapiIntel).override {
|
||||||
|
enableHybridCodec = cfg.enableHybridCodec;
|
||||||
|
};
|
||||||
|
intel-vaapi-driver-32 = (pkgs.driversi686Linux.intel-vaapi-driver or pkgs.driversi686Linux.vaapiIntel).override {
|
||||||
|
enableHybridCodec = cfg.enableHybridCodec;
|
||||||
|
};
|
||||||
|
|
||||||
|
useIntelOcl = useIntelVaapiDriver && (config.hardware.enableAllFirmware or config.nixpkgs.config.allowUnfree or false);
|
||||||
|
intel-ocl = pkgs.intel-ocl;
|
||||||
|
|
||||||
|
useIntelMediaDriver = cfg.vaapiDriver == "intel-media-driver" || cfg.vaapiDriver == null;
|
||||||
|
intel-media-driver = pkgs.intel-media-driver;
|
||||||
|
intel-media-driver-32 = pkgs.driversi686Linux.intel-media-driver;
|
||||||
|
intel-compute-runtime = pkgs.intel-compute-runtime;
|
||||||
|
vpl-gpu-rt = pkgs.vpl-gpu-rt or pkgs.onevpl-intel-gpu;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
boot.initrd.kernelModules = lib.optionals cfg.loadInInitrd [ cfg.driver ];
|
||||||
|
|
||||||
|
hardware.graphics.extraPackages =
|
||||||
|
lib.optionals useIntelVaapiDriver [ intel-vaapi-driver ]
|
||||||
|
++ lib.optionals useIntelOcl [ intel-ocl ]
|
||||||
|
++ lib.optionals useIntelMediaDriver [
|
||||||
|
intel-media-driver
|
||||||
|
intel-compute-runtime
|
||||||
|
vpl-gpu-rt
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.graphics.extraPackages32 =
|
||||||
|
lib.optionals useIntelVaapiDriver [ intel-vaapi-driver-32 ]
|
||||||
|
++ lib.optionals useIntelMediaDriver [ intel-media-driver-32 ];
|
||||||
|
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = (
|
||||||
|
cfg.driver != "xe" || lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8"
|
||||||
|
);
|
||||||
|
message = "Intel Xe GPU driver is not supported on kernels earlier than 6.8. Update or use the i915 driver.";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
7
hosts/orion/ga403/common/gpu/intel/disable.nix
Normal file
7
hosts/orion/ga403/common/gpu/intel/disable.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.blacklistedKernelModules = lib.mkDefault [ "i915" ];
|
||||||
|
# KMS will load the module, regardless of blacklisting
|
||||||
|
boot.kernelParams = lib.mkDefault [ "i915.modeset=0" ];
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
boot.kernelParams = [ "i915.enable_guc=2" ];
|
||||||
|
|
||||||
|
hardware.intelgpu.vaapiDriver = "intel-media-driver";
|
||||||
|
}
|
||||||
10
hosts/orion/ga403/common/gpu/intel/haswell/default.nix
Normal file
10
hosts/orion/ga403/common/gpu/intel/haswell/default.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
hardware.intelgpu = {
|
||||||
|
vaapiDriver = "intel-vaapi-driver";
|
||||||
|
enableHybridCodec = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
boot.kernelParams = [ "i915.enable_guc=2" ];
|
||||||
|
|
||||||
|
hardware.intelgpu.vaapiDriver = "intel-media-driver";
|
||||||
|
}
|
||||||
11
hosts/orion/ga403/common/gpu/intel/kaby-lake/default.nix
Normal file
11
hosts/orion/ga403/common/gpu/intel/kaby-lake/default.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
boot.kernelParams = [
|
||||||
|
"i915.enable_guc=2"
|
||||||
|
"i915.enable_fbc=1"
|
||||||
|
"i915.enable_psr=2"
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.intelgpu.vaapiDriver = "intel-media-driver";
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
hardware.intelgpu = {
|
||||||
|
driver = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.8") "xe";
|
||||||
|
vaapiDriver = "intel-media-driver";
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
# Enables RC6, RC6p and RC6pp.
|
||||||
|
# Last two are only available on Sandy Bridge CPUs (circa 2011).
|
||||||
|
boot.kernelParams = [ "i915.enable_rc6=7" ];
|
||||||
|
|
||||||
|
hardware.intelgpu.vaapiDriver = "intel-vaapi-driver";
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
config = {
|
||||||
|
boot.kernelParams = lib.mkIf (config.hardware.intelgpu.driver == "i915") [ "i915.enable_guc=3" ];
|
||||||
|
hardware.intelgpu.vaapiDriver = "intel-media-driver";
|
||||||
|
};
|
||||||
|
}
|
||||||
10
hosts/orion/ga403/common/gpu/nvidia/ada-lovelace/default.nix
Normal file
10
hosts/orion/ga403/common/gpu/nvidia/ada-lovelace/default.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{lib, config, ...}:
|
||||||
|
let
|
||||||
|
nvidiaPackage = config.hardware.nvidia.package;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
# enable the open source drivers if the package supports it
|
||||||
|
hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware);
|
||||||
|
}
|
||||||
10
hosts/orion/ga403/common/gpu/nvidia/ampere/default.nix
Normal file
10
hosts/orion/ga403/common/gpu/nvidia/ampere/default.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{lib, config, ...}:
|
||||||
|
let
|
||||||
|
nvidiaPackage = config.hardware.nvidia.package;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
# enable the open source drivers if the package supports it
|
||||||
|
hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware);
|
||||||
|
}
|
||||||
8
hosts/orion/ga403/common/gpu/nvidia/default.nix
Normal file
8
hosts/orion/ga403/common/gpu/nvidia/default.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ../24.05-compat.nix ];
|
||||||
|
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
|
||||||
|
# TODO: this will be a default after https://github.com/NixOS/nixpkgs/pull/326369
|
||||||
|
hardware.nvidia.modesetting.enable = lib.mkDefault true;
|
||||||
|
}
|
||||||
26
hosts/orion/ga403/common/gpu/nvidia/disable.nix
Normal file
26
hosts/orion/ga403/common/gpu/nvidia/disable.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# This runs only intel/amdgpu igpus and nvidia dgpus do not drain power.
|
||||||
|
|
||||||
|
##### disable nvidia, very nice battery life.
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
blacklist nouveau
|
||||||
|
options nouveau modeset=0
|
||||||
|
'';
|
||||||
|
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
|
||||||
|
# Remove NVIDIA USB Type-C UCSI devices, if present
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
|
||||||
|
# Remove NVIDIA Audio devices, if present
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
|
||||||
|
# Remove NVIDIA VGA/3D controller devices
|
||||||
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
|
'';
|
||||||
|
boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
|
||||||
|
}
|
||||||
7
hosts/orion/ga403/common/gpu/nvidia/kepler/default.nix
Normal file
7
hosts/orion/ga403/common/gpu/nvidia/kepler/default.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{lib, ...}:
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
# The open source driver does not support Kepler GPUs.
|
||||||
|
hardware.nvidia.open = false;
|
||||||
|
}
|
||||||
7
hosts/orion/ga403/common/gpu/nvidia/maxwell/default.nix
Normal file
7
hosts/orion/ga403/common/gpu/nvidia/maxwell/default.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{lib, ...}:
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
# The open source driver does not support Maxwell GPUs.
|
||||||
|
hardware.nvidia.open = false;
|
||||||
|
}
|
||||||
7
hosts/orion/ga403/common/gpu/nvidia/pascal/default.nix
Normal file
7
hosts/orion/ga403/common/gpu/nvidia/pascal/default.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{lib, ...}:
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
# The open source driver does not support Pascal GPUs.
|
||||||
|
hardware.nvidia.open = false;
|
||||||
|
}
|
||||||
10
hosts/orion/ga403/common/gpu/nvidia/prime-sync.nix
Normal file
10
hosts/orion/ga403/common/gpu/nvidia/prime-sync.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ lib, config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./. ];
|
||||||
|
|
||||||
|
hardware.nvidia.prime = {
|
||||||
|
# For people who want to use sync instead of offload. Especially for AMD CPU users
|
||||||
|
sync.enable = lib.mkOverride 990 true;
|
||||||
|
};
|
||||||
|
}
|
||||||
13
hosts/orion/ga403/common/gpu/nvidia/prime.nix
Normal file
13
hosts/orion/ga403/common/gpu/nvidia/prime.nix
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{ lib, config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./. ];
|
||||||
|
|
||||||
|
hardware.nvidia.prime = {
|
||||||
|
offload = {
|
||||||
|
enable = lib.mkOverride 990 true;
|
||||||
|
enableOffloadCmd = lib.mkIf config.hardware.nvidia.prime.offload.enable true; # Provides `nvidia-offload` command.
|
||||||
|
};
|
||||||
|
# Hardware should specify the bus ID for intel/nvidia devices
|
||||||
|
};
|
||||||
|
}
|
||||||
10
hosts/orion/ga403/common/gpu/nvidia/turing/default.nix
Normal file
10
hosts/orion/ga403/common/gpu/nvidia/turing/default.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{lib, config, ...}:
|
||||||
|
let
|
||||||
|
nvidiaPackage = config.hardware.nvidia.package;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
# enable the open source drivers if the package supports it
|
||||||
|
hardware.nvidia.open = lib.mkOverride 990 (nvidiaPackage ? open && nvidiaPackage ? firmware);
|
||||||
|
}
|
||||||
18
hosts/orion/ga403/common/hidpi.nix
Normal file
18
hosts/orion/ga403/common/hidpi.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
# Starting with kernel 6.8, the console font is set in the kernel automatically to a 16x32 font:
|
||||||
|
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfd19a5004eff03755967086aa04254c3d91b8ec
|
||||||
|
oldKernel = lib.versionOlder config.boot.kernelPackages.kernel.version "6.8";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Just set the console font, don't mess with the font settings
|
||||||
|
console.font = lib.mkIf oldKernel (
|
||||||
|
lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-v32n.psf.gz"
|
||||||
|
);
|
||||||
|
console.earlySetup = lib.mkIf oldKernel (lib.mkDefault true);
|
||||||
|
}
|
||||||
7
hosts/orion/ga403/common/pc/default.nix
Normal file
7
hosts/orion/ga403/common/pc/default.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.blacklistedKernelModules = lib.optionals (!config.hardware.enableRedistributableFirmware) [
|
||||||
|
"ath3k"
|
||||||
|
];
|
||||||
|
}
|
||||||
9
hosts/orion/ga403/common/pc/hdd/default.nix
Normal file
9
hosts/orion/ga403/common/pc/hdd/default.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
warnings = [
|
||||||
|
''
|
||||||
|
DEPRECATED: The <nixos-hardware/common/hdd.nix> module has been deprecated.
|
||||||
|
|
||||||
|
This module has no effect and will be removed in a future release.
|
||||||
|
''
|
||||||
|
];
|
||||||
|
}
|
||||||
11
hosts/orion/ga403/common/pc/laptop/default.nix
Normal file
11
hosts/orion/ga403/common/pc/laptop/default.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ../. ];
|
||||||
|
|
||||||
|
# Gnome 40 introduced a new way of managing power, without tlp.
|
||||||
|
# However, these 2 services clash when enabled simultaneously.
|
||||||
|
# https://github.com/NixOS/nixos-hardware/issues/260
|
||||||
|
services.tlp.enable = lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
|
||||||
|
|| !config.services.power-profiles-daemon.enable);
|
||||||
|
}
|
||||||
6
hosts/orion/ga403/common/pc/laptop/hdd/default.nix
Normal file
6
hosts/orion/ga403/common/pc/laptop/hdd/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Hard disk protection if the laptop falls:
|
||||||
|
services.hdapsd.enable = lib.mkDefault true;
|
||||||
|
}
|
||||||
1
hosts/orion/ga403/common/pc/laptop/ssd
Symbolic link
1
hosts/orion/ga403/common/pc/laptop/ssd
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../ssd
|
||||||
5
hosts/orion/ga403/common/pc/ssd/default.nix
Normal file
5
hosts/orion/ga403/common/pc/ssd/default.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.fstrim.enable = lib.mkDefault true;
|
||||||
|
}
|
||||||
93
hosts/orion/ga403/default.nix
Normal file
93
hosts/orion/ga403/default.nix
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
mkDefault
|
||||||
|
mkForce
|
||||||
|
;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./common/cpu/amd
|
||||||
|
./common/cpu/amd/pstate.nix
|
||||||
|
./common/gpu/amd
|
||||||
|
./common/pc/laptop
|
||||||
|
./common/pc/ssd
|
||||||
|
./common/gpu/nvidia/prime.nix
|
||||||
|
./common/gpu/nvidia/ada-lovelace
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# # Configure basic system settings:
|
||||||
|
boot = {
|
||||||
|
# Note: it seems being on the latest kernel is important for CPPC to work, which is required for the amd_pstate
|
||||||
|
# https://bugzilla.kernel.org/show_bug.cgi?id=218686
|
||||||
|
kernelPackages = pkgs.linuxPackages_xanmod;
|
||||||
|
kernelModules = [ "kvm-amd" ];
|
||||||
|
kernelParams = [
|
||||||
|
"mem_sleep_default=deep"
|
||||||
|
"pcie_aspm.policy=powersupersave"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
asusd = {
|
||||||
|
enable = mkDefault true;
|
||||||
|
enableUserService = mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
|
supergfxd.enable = mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# # Enable the Nvidia card, as well as Prime and Offload: NVIDIA GeForce RTX 4060 Mobile
|
||||||
|
boot.blacklistedKernelModules = [ "nouveau" ];
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = mkForce [
|
||||||
|
"amdgpu"
|
||||||
|
"nvidia"
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
amdgpu.initrd.enable = mkDefault true;
|
||||||
|
|
||||||
|
nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
nvidiaSettings = mkDefault true;
|
||||||
|
|
||||||
|
prime = {
|
||||||
|
offload = {
|
||||||
|
enable = mkDefault true;
|
||||||
|
enableOffloadCmd = mkDefault true;
|
||||||
|
};
|
||||||
|
amdgpuBusId = "PCI:65:0:0";
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
};
|
||||||
|
|
||||||
|
powerManagement = {
|
||||||
|
enable = lib.mkForce true;
|
||||||
|
finegrained = lib.mkForce true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Meditek doesn't seem to be quite sensitive enough on the default roaming settings:
|
||||||
|
# https://wiki.archlinux.org/title/Wpa_supplicant#Roaming
|
||||||
|
# https://wiki.archlinux.org/title/Iwd#iwd_keeps_roaming
|
||||||
|
#
|
||||||
|
# But NixOS doesn't have the tweaks for IWD, yet.
|
||||||
|
# networking.wireless.iwd.settings =
|
||||||
|
# lib.mkIf (config.networking.wireless.iwd.enable && config.networking.wireless.scanOnLowSignal)
|
||||||
|
# {
|
||||||
|
# General = {
|
||||||
|
# RoamThreshold = -75;
|
||||||
|
# RoamThreshold5G = -80;
|
||||||
|
# RoamRetryInterval = 20;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
||||||
41
modules/apps/atuin/default.nix
Normal file
41
modules/apps/atuin/default.nix
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.atuin;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
atuin = {
|
||||||
|
enable = lib.mkEnableOption "Enable atuin in NixOS & home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home-manager.users.${username} = {
|
||||||
|
programs.atuin = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
history_filter = [
|
||||||
|
"^btop$"
|
||||||
|
"^bash$"
|
||||||
|
"^cd$"
|
||||||
|
"^clear$"
|
||||||
|
"^exit$"
|
||||||
|
"^fastfetch$"
|
||||||
|
"^kmon$"
|
||||||
|
"^l$"
|
||||||
|
"^ll$"
|
||||||
|
"^pwd$"
|
||||||
|
"^up$"
|
||||||
|
"^nor$"
|
||||||
|
"^ngc$"
|
||||||
|
"^rbn$"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./atuin
|
||||||
./coolercontrol
|
./coolercontrol
|
||||||
./direnv
|
./direnv
|
||||||
./gamemode
|
./gamemode
|
||||||
@ -7,10 +8,13 @@
|
|||||||
./git
|
./git
|
||||||
./hyprland
|
./hyprland
|
||||||
./lact
|
./lact
|
||||||
|
./lsd
|
||||||
./mangohud
|
./mangohud
|
||||||
|
./nh
|
||||||
./obs
|
./obs
|
||||||
./steam
|
./steam
|
||||||
./sunshine
|
./sunshine
|
||||||
./vscode
|
./vscode
|
||||||
|
./zsh
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,8 +53,8 @@ with lib;
|
|||||||
exec-once = lxqt-policykit-agent
|
exec-once = lxqt-policykit-agent
|
||||||
exec-once = [workspace special silent] foot
|
exec-once = [workspace special silent] foot
|
||||||
exec-once = sleep 1.5 && swww img /home/${username}/Pictures/Wallpapers/pink-desert.jpeg
|
exec-once = sleep 1.5 && swww img /home/${username}/Pictures/Wallpapers/pink-desert.jpeg
|
||||||
${builtins.toString config.desktop.hostMonitorSettings}
|
|
||||||
monitor = Unknown-1, disable
|
monitor = Unknown-1, disable
|
||||||
|
${builtins.toString config.desktop.hostSettings}
|
||||||
exec-once = ${terminal}
|
exec-once = ${terminal}
|
||||||
general {
|
general {
|
||||||
gaps_in = 6
|
gaps_in = 6
|
||||||
@ -202,8 +202,8 @@ with lib;
|
|||||||
bindm = ${modifier},mouse:273,resizewindow
|
bindm = ${modifier},mouse:273,resizewindow
|
||||||
bind = ALT,Tab,cyclenext
|
bind = ALT,Tab,cyclenext
|
||||||
bind = ALT,Tab,bringactivetotop
|
bind = ALT,Tab,bringactivetotop
|
||||||
bind = ,XF86AudioRaiseVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
bind = ,XF86AudioRaiseVolume,exec,wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 && wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||||
bind = ,XF86AudioLowerVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
bind = ,XF86AudioLowerVolume,exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 && wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||||
binde = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
binde = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||||
bind = ,XF86AudioPlay, exec, playerctl play-pause
|
bind = ,XF86AudioPlay, exec, playerctl play-pause
|
||||||
bind = ,XF86AudioPause, exec, playerctl play-pause
|
bind = ,XF86AudioPause, exec, playerctl play-pause
|
||||||
|
|||||||
39
modules/apps/lsd/default.nix
Normal file
39
modules/apps/lsd/default.nix
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.lsd;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
lsd = {
|
||||||
|
enable = lib.mkEnableOption "Enable lsd in NixOS & home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home-manager.users.${username} = {
|
||||||
|
programs.lsd = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
color = {
|
||||||
|
when = "always";
|
||||||
|
};
|
||||||
|
icons = {
|
||||||
|
when = "always";
|
||||||
|
theme = "fancy";
|
||||||
|
separator = " ";
|
||||||
|
};
|
||||||
|
layout = "oneline";
|
||||||
|
size = "short";
|
||||||
|
permission = "rwx";
|
||||||
|
hyperlink = "never";
|
||||||
|
no-symlink = false;
|
||||||
|
symlink-arrow = "⇒";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
23
modules/apps/nh/default.nix
Normal file
23
modules/apps/nh/default.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.nh;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
nh = {
|
||||||
|
enable = lib.mkEnableOption "Enable nh in NixOS & home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.nh = {
|
||||||
|
enable = true;
|
||||||
|
flake = "/home/ryan/.nixos-config";
|
||||||
|
};
|
||||||
|
home-manager.users.${username} = { };
|
||||||
|
};
|
||||||
|
}
|
||||||
75
modules/apps/zsh/default.nix
Normal file
75
modules/apps/zsh/default.nix
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.zsh;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
zsh = {
|
||||||
|
enable = lib.mkEnableOption "Enable zsh in NixOS";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs = {
|
||||||
|
zsh.enable = true;
|
||||||
|
};
|
||||||
|
home-manager.users.${username} =
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
dotDir = ".config/zsh";
|
||||||
|
history = {
|
||||||
|
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
||||||
|
size = 999999999;
|
||||||
|
extended = true;
|
||||||
|
ignoreSpace = true;
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
initExtra = ''
|
||||||
|
export GITHUB_TOKEN="$(cat ${config.sops.secrets."github_token".path})"
|
||||||
|
'';
|
||||||
|
*/
|
||||||
|
oh-my-zsh = {
|
||||||
|
enable = true;
|
||||||
|
custom = "${config.xdg.configHome}/zsh/.zsh_custom";
|
||||||
|
plugins = [
|
||||||
|
"command-not-found"
|
||||||
|
"direnv"
|
||||||
|
"git"
|
||||||
|
"sudo"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
plugins = [
|
||||||
|
{
|
||||||
|
name = "cd-ls";
|
||||||
|
src = inputs.cd-ls;
|
||||||
|
file = "cd-ls.plugin.zsh";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "zsh-fast-syntax-highlighting";
|
||||||
|
src = pkgs.zsh-fast-syntax-highlighting;
|
||||||
|
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "nix-zsh-completions";
|
||||||
|
src = pkgs.nix-zsh-completions;
|
||||||
|
file = "share/zsh/site-functions/nix-zsh-completions.plugin.zsh";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -21,7 +21,7 @@
|
|||||||
"vm.swappiness" = 10;
|
"vm.swappiness" = 10;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
"nowatchdog"
|
"nowatchdog"
|
||||||
"zswap.enabled=0"
|
"zswap.enabled=0"
|
||||||
|
|||||||
@ -23,7 +23,11 @@ in
|
|||||||
"nvidia_drm"
|
"nvidia_drm"
|
||||||
];
|
];
|
||||||
boot.blacklistedKernelModules = [ "nouveau" ];
|
boot.blacklistedKernelModules = [ "nouveau" ];
|
||||||
boot.kernelParams = [ "nvidia_drm.fbdev=1" "nvidia-drm.modeset=1" "module_blacklist=nouveau" ];
|
boot.kernelParams = [
|
||||||
|
"nvidia_drm.fbdev=1"
|
||||||
|
"nvidia-drm.modeset=1"
|
||||||
|
"module_blacklist=nouveau"
|
||||||
|
];
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
(writeShellScriptBin "nvidia-offload" ''
|
(writeShellScriptBin "nvidia-offload" ''
|
||||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||||
@ -42,7 +46,7 @@ in
|
|||||||
open = true;
|
open = true;
|
||||||
nvidiaPersistenced = true;
|
nvidiaPersistenced = true;
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
package = lib.mkForce config.boot.kernelPackages.nvidiaPackages.latest;
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -17,7 +17,7 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
# Custom modules
|
# Custom modules
|
||||||
# Apps
|
# Apps
|
||||||
# atuin.enable = true;
|
atuin.enable = true;
|
||||||
# bash.enable = true;
|
# bash.enable = true;
|
||||||
# bat.enable = true;
|
# bat.enable = true;
|
||||||
# boxxy.enable = true;
|
# boxxy.enable = true;
|
||||||
@ -35,10 +35,10 @@ in
|
|||||||
# jujutsu.enable = true;
|
# jujutsu.enable = true;
|
||||||
# keyd.enable = false;
|
# keyd.enable = false;
|
||||||
# lazygit.enable = true;
|
# lazygit.enable = true;
|
||||||
# lsd.enable = true;
|
lsd.enable = true;
|
||||||
# mullvad.enable = true;
|
# mullvad.enable = true;
|
||||||
# navi.enable = true;
|
# navi.enable = true;
|
||||||
# nh.enable = true;
|
nh.enable = true;
|
||||||
# nix-ld.enable = true;
|
# nix-ld.enable = true;
|
||||||
# nix-index.enable = true;
|
# nix-index.enable = true;
|
||||||
# nushell.enable = true;
|
# nushell.enable = true;
|
||||||
@ -54,7 +54,7 @@ in
|
|||||||
# yt-dlp.enable = true;
|
# yt-dlp.enable = true;
|
||||||
# zen-browser.enable = true;
|
# zen-browser.enable = true;
|
||||||
# zoxide.enable = true;
|
# zoxide.enable = true;
|
||||||
# zsh.enable = true;
|
zsh.enable = true;
|
||||||
|
|
||||||
# System
|
# System
|
||||||
# flatpak.enable = true;
|
# flatpak.enable = true;
|
||||||
|
|||||||
@ -17,7 +17,7 @@ in
|
|||||||
options = {
|
options = {
|
||||||
desktop = {
|
desktop = {
|
||||||
enable = lib.mkEnableOption "Enable desktop in NixOS";
|
enable = lib.mkEnableOption "Enable desktop in NixOS";
|
||||||
hostMonitorSettings = lib.mkOption {
|
hostSettings = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "hostMonitorSettings";
|
default = "hostMonitorSettings";
|
||||||
};
|
};
|
||||||
@ -116,6 +116,7 @@ in
|
|||||||
# Utilities
|
# Utilities
|
||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
swaynotificationcenter
|
swaynotificationcenter
|
||||||
|
brightnessctl
|
||||||
];
|
];
|
||||||
xdg = {
|
xdg = {
|
||||||
mimeApps =
|
mimeApps =
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@ -16,15 +17,27 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
users.users = {
|
users = {
|
||||||
|
defaultUserShell = pkgs.zsh;
|
||||||
|
users = {
|
||||||
${username} = {
|
${username} = {
|
||||||
initialPassword = "'";
|
initialPassword = "'";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
|
"adbusers"
|
||||||
|
"audio"
|
||||||
|
"input"
|
||||||
|
"networkmanager"
|
||||||
|
"plugdev"
|
||||||
|
"realtime"
|
||||||
|
"uinput"
|
||||||
|
"video"
|
||||||
|
"dialout"
|
||||||
"wheel"
|
"wheel"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
home-manager.users.${username} =
|
home-manager.users.${username} =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user