2024-09-22 01:04:11 -04:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
|
|
|
|
2024-10-08 16:48:50 -04:00
|
|
|
|
{ nixos-hardware, config, pkgs, musnix, lib, ... }:
|
2024-09-22 01:04:11 -04:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
2024-10-07 23:39:25 -04:00
|
|
|
|
./razer-speaker-fix.nix
|
2024-09-22 01:04:11 -04:00
|
|
|
|
];
|
|
|
|
|
|
2024-10-02 18:35:14 -04:00
|
|
|
|
# Allow unfree packages
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
wget
|
2024-11-18 10:54:45 -05:00
|
|
|
|
libGL
|
2024-10-02 18:35:14 -04:00
|
|
|
|
home-manager
|
|
|
|
|
curl
|
|
|
|
|
git-lfs
|
|
|
|
|
tailscale
|
|
|
|
|
rsync
|
|
|
|
|
gnupg
|
|
|
|
|
openrazer-daemon
|
|
|
|
|
clinfo
|
2024-10-05 12:36:08 -04:00
|
|
|
|
alsa-utils
|
2024-10-28 17:34:14 -04:00
|
|
|
|
psutils
|
2024-10-05 12:36:08 -04:00
|
|
|
|
alsa-tools
|
2024-10-07 23:39:25 -04:00
|
|
|
|
util-linux
|
2024-10-18 09:11:27 -04:00
|
|
|
|
libgtop
|
2024-10-20 22:41:51 -04:00
|
|
|
|
ulauncher
|
2024-10-28 17:34:14 -04:00
|
|
|
|
fontconfig
|
2024-11-06 14:33:49 -05:00
|
|
|
|
freetype
|
|
|
|
|
nix-ld
|
2024-11-18 10:54:45 -05:00
|
|
|
|
egl-wayland
|
|
|
|
|
glfw-wayland
|
2024-10-02 18:35:14 -04:00
|
|
|
|
];
|
|
|
|
|
|
2024-09-23 23:35:58 -04:00
|
|
|
|
# Bootloader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
2024-10-31 23:16:03 -04:00
|
|
|
|
boot.loader.systemd-boot.configurationLimit = 8;
|
2024-10-20 22:41:51 -04:00
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
2024-10-31 23:16:03 -04:00
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
2024-09-22 01:04:11 -04:00
|
|
|
|
|
2024-10-02 18:35:14 -04:00
|
|
|
|
boot = {
|
2024-10-04 10:35:41 -04:00
|
|
|
|
initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
2024-11-18 10:54:45 -05:00
|
|
|
|
kernelParams = [ "nvidia-drm.fbdev=1" "nvidia_drm.modeset=1"]; # "amd_pstate=guided"
|
2024-09-24 16:11:23 -04:00
|
|
|
|
};
|
|
|
|
|
|
2024-10-02 18:35:14 -04:00
|
|
|
|
systemd.services.tailscaled.after = ["NetworkManager-wait-online.service"];
|
|
|
|
|
|
2024-10-22 13:12:01 -04:00
|
|
|
|
nixpkgs.config.packageOverrides = pkgs: {
|
|
|
|
|
openrazer-daemon = pkgs.openrazer-daemon.overrideDerivation (previous: {
|
|
|
|
|
name = "openrazer-daemon390";
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
|
owner = "openrazer";
|
|
|
|
|
repo = "openrazer";
|
|
|
|
|
hash = "sha256-MLwhqLPWdjg1ZUZP5Sig37RgZEeHlU+DyELpyMif6iY=";
|
|
|
|
|
rev = "ae5791101e39b91518abb16f26978f2f0eea5e03";
|
|
|
|
|
};
|
|
|
|
|
# patches = [""];
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2024-09-24 16:11:23 -04:00
|
|
|
|
hardware = {
|
2024-10-07 23:39:25 -04:00
|
|
|
|
openrazer = {
|
|
|
|
|
enable = true;
|
|
|
|
|
users = [ "emenel" ];
|
|
|
|
|
};
|
|
|
|
|
|
2024-10-02 18:35:14 -04:00
|
|
|
|
graphics = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enable32Bit = true;
|
|
|
|
|
extraPackages = [
|
2024-10-04 10:35:41 -04:00
|
|
|
|
pkgs.rocmPackages.clr.icd
|
2024-10-02 18:35:14 -04:00
|
|
|
|
];
|
|
|
|
|
};
|
2024-09-24 16:11:23 -04:00
|
|
|
|
|
2024-10-01 16:57:09 -04:00
|
|
|
|
enableAllFirmware = true;
|
|
|
|
|
|
2024-09-24 16:11:23 -04:00
|
|
|
|
nvidia = {
|
|
|
|
|
# Modesetting is required.
|
|
|
|
|
modesetting.enable = true;
|
|
|
|
|
powerManagement.enable = true;
|
2024-09-26 22:00:05 -04:00
|
|
|
|
powerManagement.finegrained = true;
|
2024-10-01 17:24:28 -04:00
|
|
|
|
open = true;
|
2024-09-24 16:11:23 -04:00
|
|
|
|
|
2024-10-02 18:35:14 -04:00
|
|
|
|
forceFullCompositionPipeline = true;
|
2024-09-24 16:11:23 -04:00
|
|
|
|
|
|
|
|
|
prime = {
|
2024-11-18 10:54:45 -05:00
|
|
|
|
amdgpuBusId = "PCI:101:0:0";
|
2024-11-15 13:32:58 -05:00
|
|
|
|
nvidiaBusId = "PCI:1:0:0";
|
2024-09-24 16:11:23 -04:00
|
|
|
|
offload = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableOffloadCmd = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#reverseSync.enable = true;
|
|
|
|
|
#sync.enable = true;
|
|
|
|
|
};
|
|
|
|
|
nvidiaSettings = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-10-08 16:48:50 -04:00
|
|
|
|
specialisation = {
|
|
|
|
|
gpupower.configuration = {
|
|
|
|
|
system.nixos.tags = [ "gpupower" ];
|
|
|
|
|
hardware.nvidia = {
|
|
|
|
|
prime.offload.enable = lib.mkForce false;
|
|
|
|
|
prime.offload.enableOffloadCmd = lib.mkForce false;
|
|
|
|
|
prime.sync.enable = lib.mkForce true;
|
|
|
|
|
powerManagement.finegrained = lib.mkForce false;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-09-28 21:03:16 -04:00
|
|
|
|
musnix = {
|
|
|
|
|
enable = true;
|
|
|
|
|
alsaSeq.enable = true;
|
|
|
|
|
rtcqs.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.udev.extraRules = ''
|
|
|
|
|
DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"
|
|
|
|
|
'';
|
|
|
|
|
|
2024-09-30 20:46:21 -04:00
|
|
|
|
security.polkit.enable = true;
|
|
|
|
|
|
2024-09-24 16:11:23 -04:00
|
|
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
|
|
|
|
|
2024-11-09 14:14:31 -05:00
|
|
|
|
networking = {
|
|
|
|
|
hostName = "eddie";
|
|
|
|
|
domain = "local";
|
|
|
|
|
nameservers = [ "1.1.1.1" "1.0.0.1" ];
|
|
|
|
|
networkmanager = {
|
|
|
|
|
enable = true;
|
|
|
|
|
wifi.powersave = true;
|
|
|
|
|
# connectionConfig = "connection.mdns=2";
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-09-22 01:04:11 -04:00
|
|
|
|
|
2024-11-09 14:14:31 -05:00
|
|
|
|
services.resolved = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
LLMNR=no
|
|
|
|
|
ReadEtcHosts=no
|
|
|
|
|
DNSSEC=no
|
|
|
|
|
'';
|
|
|
|
|
};
|
2024-09-22 01:04:11 -04:00
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "America/Toronto";
|
|
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
i18n.defaultLocale = "en_CA.UTF-8";
|
2024-10-20 22:41:51 -04:00
|
|
|
|
|
2024-10-01 16:57:09 -04:00
|
|
|
|
nix.nixPath = [ "nixos-config=/home/emenel/source/nixos-config" "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" ];
|
2024-10-20 22:41:51 -04:00
|
|
|
|
|
2024-10-31 23:16:03 -04:00
|
|
|
|
nix.package = pkgs.nixVersions.latest;
|
2024-10-05 12:36:08 -04:00
|
|
|
|
nix.settings = {
|
2024-10-20 13:25:53 -04:00
|
|
|
|
experimental-features = [ "nix-command" "flakes" ]; #repl-flake
|
2024-10-05 12:36:08 -04:00
|
|
|
|
auto-optimise-store = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nix.gc.automatic = true;
|
|
|
|
|
nix.gc.dates = "daily";
|
|
|
|
|
nix.gc.options = "--delete-older-than +5";
|
2024-09-22 01:04:11 -04:00
|
|
|
|
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
|
|
|
|
|
# Enable the GNOME Desktop Environment.
|
|
|
|
|
services.xserver.displayManager.gdm.enable = true;
|
2024-10-05 12:36:08 -04:00
|
|
|
|
services.xserver.desktopManager.gnome.enable = true;
|
2024-10-02 13:09:41 -04:00
|
|
|
|
services.xserver.deviceSection = ''Option "TearFree" "true"''; # For amdgpu.
|
2024-10-07 23:39:25 -04:00
|
|
|
|
services.gnome.gnome-keyring.enable = true;
|
|
|
|
|
|
2024-09-24 16:11:23 -04:00
|
|
|
|
programs.dconf.enable = true;
|
|
|
|
|
|
2024-09-22 01:04:11 -04:00
|
|
|
|
services.xserver.xkb = {
|
|
|
|
|
layout = "us";
|
|
|
|
|
variant = "";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.printing.enable = true;
|
2024-09-24 23:46:34 -04:00
|
|
|
|
services.tailscale.enable = true;
|
2024-10-07 23:39:25 -04:00
|
|
|
|
services.envfs.enable = true;
|
2024-09-24 23:46:34 -04:00
|
|
|
|
|
2024-09-27 16:18:32 -04:00
|
|
|
|
#services.emacs = {
|
|
|
|
|
# enable = true;
|
|
|
|
|
#};
|
2024-09-27 15:36:18 -04:00
|
|
|
|
|
2024-09-22 01:04:11 -04:00
|
|
|
|
# Enable sound with pipewire.
|
|
|
|
|
hardware.pulseaudio.enable = false;
|
2024-10-05 12:36:08 -04:00
|
|
|
|
services.gnome.gnome-remote-desktop.enable = false;
|
2024-09-22 01:04:11 -04:00
|
|
|
|
services.pipewire = {
|
|
|
|
|
enable = true;
|
|
|
|
|
alsa.enable = true;
|
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
|
pulse.enable = true;
|
2024-09-28 20:28:06 -04:00
|
|
|
|
jack.enable = true;
|
2024-10-01 16:57:09 -04:00
|
|
|
|
wireplumber.enable = true;
|
2024-10-23 09:54:41 -04:00
|
|
|
|
|
|
|
|
|
extraConfig.pipewire."91-null-sinks" = {
|
|
|
|
|
"context.modules" = [
|
|
|
|
|
{
|
|
|
|
|
name = "libpipewire-module-loopback";
|
|
|
|
|
args = {
|
2024-10-24 10:35:53 -04:00
|
|
|
|
"node.description" = "Default Playback";
|
2024-10-23 09:54:41 -04:00
|
|
|
|
"capture.props" = {
|
2024-10-24 10:35:53 -04:00
|
|
|
|
"node.name" = "BixSix_or_fallback_Playback";
|
2024-10-23 09:54:41 -04:00
|
|
|
|
"media.class" = "Audio/Sink";
|
|
|
|
|
"audio.position" = "[FL FR]";
|
|
|
|
|
};
|
|
|
|
|
"playback.props" = {
|
2024-10-24 10:35:53 -04:00
|
|
|
|
"node.name" = "playback.BixSixWithFallbackPlayback";
|
2024-10-23 09:54:41 -04:00
|
|
|
|
"audio.position" = "[AUX14 AUX15]";
|
|
|
|
|
"target.object" = "alsa_output.usb-Solid_State_Logic_BiG_SiX-00.pro-output-0";
|
|
|
|
|
"stream.dont-remix" = true;
|
|
|
|
|
"node.passive" = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
2024-09-22 01:04:11 -04:00
|
|
|
|
};
|
|
|
|
|
|
2024-10-04 10:35:41 -04:00
|
|
|
|
programs.steam = {
|
|
|
|
|
enable = true;
|
2024-10-14 12:21:14 -04:00
|
|
|
|
protontricks.enable = true;
|
2024-10-04 10:35:41 -04:00
|
|
|
|
extraCompatPackages = [ pkgs.proton-ge-bin ];
|
|
|
|
|
};
|
|
|
|
|
|
2024-09-23 09:46:14 -04:00
|
|
|
|
# enable fish and launch it from bash for interactive shells
|
|
|
|
|
programs.fish.enable = true;
|
2024-10-01 16:57:09 -04:00
|
|
|
|
environment.pathsToLink = [ "/share/fish" ];
|
2024-09-23 09:46:14 -04:00
|
|
|
|
programs.bash = {
|
2024-09-27 14:17:11 -04:00
|
|
|
|
interactiveShellInit = ''
|
|
|
|
|
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
2024-09-23 23:35:58 -04:00
|
|
|
|
then
|
|
|
|
|
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
|
|
|
|
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
|
|
|
|
fi
|
|
|
|
|
'';
|
2024-10-05 12:36:08 -04:00
|
|
|
|
};
|
2024-09-23 23:35:58 -04:00
|
|
|
|
|
|
|
|
|
services.flatpak.enable = true;
|
2024-09-22 01:04:11 -04:00
|
|
|
|
|
2024-10-01 21:18:52 -04:00
|
|
|
|
services.dbus.implementation = "broker";
|
|
|
|
|
|
2024-09-30 22:57:34 -04:00
|
|
|
|
#programs.gnupg.enable = true;
|
|
|
|
|
programs.git.enable = true;
|
|
|
|
|
|
2024-09-30 09:10:52 -04:00
|
|
|
|
services.gnome.core-developer-tools.enable = true;
|
|
|
|
|
environment.gnome.excludePackages = with pkgs; [
|
|
|
|
|
cheese
|
|
|
|
|
geary
|
|
|
|
|
gnome-music
|
2024-10-01 16:57:09 -04:00
|
|
|
|
gnome-tour
|
2024-09-30 09:10:52 -04:00
|
|
|
|
];
|
|
|
|
|
|
2024-10-04 10:35:41 -04:00
|
|
|
|
services.accounts-daemon.enable = true;
|
|
|
|
|
services.gnome.gnome-online-accounts.enable = true;
|
|
|
|
|
|
2024-10-14 12:28:40 -04:00
|
|
|
|
services.kmonad = {
|
2024-10-14 12:30:28 -04:00
|
|
|
|
enable = true;
|
|
|
|
|
keyboards = {
|
|
|
|
|
# quefrency = {
|
|
|
|
|
# device = "/dev/input/by-id/usb-Keebio_Quefrency_Rev._5-event-kbd";
|
|
|
|
|
# config = builtins.readFile ../../dotfiles/dot_config/kmonad/quefrency.kbd;
|
|
|
|
|
# };
|
2024-11-18 10:54:45 -05:00
|
|
|
|
sinc = {
|
|
|
|
|
device = "/dev/input/by-id/usb-Keebio_Sinc_Rev._4-event-kbd";
|
|
|
|
|
config = builtins.readFile ../../dotfiles/dot_config/kmonad/sinc.kbd;
|
2024-10-14 12:30:28 -04:00
|
|
|
|
};
|
|
|
|
|
razer = {
|
2024-11-09 14:14:31 -05:00
|
|
|
|
extraGroups = [ "openrazer" ];
|
2024-10-14 12:30:28 -04:00
|
|
|
|
device = "/dev/input/by-id/usb-Razer_Razer_Blade-if01-event-kbd";
|
|
|
|
|
config = builtins.readFile ../../dotfiles/dot_config/kmonad/razer.kbd;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-09-29 13:45:20 -04:00
|
|
|
|
programs.virt-manager.enable = true;
|
|
|
|
|
|
|
|
|
|
virtualisation = {
|
|
|
|
|
libvirtd = {
|
|
|
|
|
enable = true;
|
|
|
|
|
qemu = {
|
|
|
|
|
package = pkgs.qemu_kvm;
|
|
|
|
|
swtpm.enable = true;
|
|
|
|
|
ovmf.enable = true;
|
|
|
|
|
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
spiceUSBRedirection.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.qemuGuest.enable = true;
|
|
|
|
|
services.spice-vdagentd.enable = true;
|
|
|
|
|
|
2024-10-04 10:35:41 -04:00
|
|
|
|
programs.appimage = {
|
2024-09-28 20:28:06 -04:00
|
|
|
|
enable = true;
|
2024-10-04 10:35:41 -04:00
|
|
|
|
binfmt = true;
|
2024-09-28 20:28:06 -04:00
|
|
|
|
};
|
2024-09-22 01:04:11 -04:00
|
|
|
|
|
2024-11-06 14:33:49 -05:00
|
|
|
|
programs.nix-ld.dev.enable = true;
|
|
|
|
|
programs.nix-ld.dev.libraries = with pkgs; [
|
|
|
|
|
zlib
|
|
|
|
|
zstd
|
|
|
|
|
stdenv.cc.cc
|
2024-11-09 14:14:31 -05:00
|
|
|
|
curlFull
|
2024-11-06 14:33:49 -05:00
|
|
|
|
openssl
|
|
|
|
|
attr
|
|
|
|
|
libssh
|
|
|
|
|
bzip2
|
|
|
|
|
libxml2
|
|
|
|
|
acl
|
|
|
|
|
libsodium
|
|
|
|
|
util-linux
|
|
|
|
|
xz
|
|
|
|
|
systemd
|
|
|
|
|
fontconfig
|
|
|
|
|
freetype
|
2024-11-09 14:14:31 -05:00
|
|
|
|
gnutls
|
|
|
|
|
util-linux
|
2024-11-18 10:54:45 -05:00
|
|
|
|
libGL
|
|
|
|
|
egl-wayland
|
|
|
|
|
glfw-wayland
|
2024-11-06 14:33:49 -05:00
|
|
|
|
];
|
|
|
|
|
|
2024-11-14 19:04:32 -05:00
|
|
|
|
services.udev.packages = with pkgs; [
|
|
|
|
|
via
|
|
|
|
|
vial
|
|
|
|
|
];
|
|
|
|
|
|
2024-11-06 14:33:49 -05:00
|
|
|
|
fonts.fontconfig.enable = true;
|
2024-10-18 09:11:27 -04:00
|
|
|
|
|
2024-10-28 11:20:08 -04:00
|
|
|
|
powerManagement = {
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
2024-10-01 16:57:09 -04:00
|
|
|
|
|
2024-11-04 11:13:56 -05:00
|
|
|
|
services.power-profiles-daemon.enable = true;
|
|
|
|
|
|
2024-10-01 16:57:09 -04:00
|
|
|
|
# enable the OpenSSH daemon.
|
2024-09-22 01:04:11 -04:00
|
|
|
|
services.openssh.enable = true;
|
2024-09-28 20:28:06 -04:00
|
|
|
|
|
2024-11-09 14:14:31 -05:00
|
|
|
|
# services.avahi = {
|
|
|
|
|
# enable = true;
|
|
|
|
|
# nssmdns = true;
|
|
|
|
|
# };
|
|
|
|
|
|
2024-10-05 12:36:08 -04:00
|
|
|
|
# add user accounts
|
|
|
|
|
users.users.emenel = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
description = "emenel";
|
2024-10-31 23:36:58 -04:00
|
|
|
|
extraGroups = [ "networkmanager" "wheel" "uinput" "input" "audio" "video" "libvirtd" "nvidia" "cups" "openrazer" "plugdev" ];
|
2024-10-05 12:36:08 -04:00
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
git
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-28 20:28:06 -04:00
|
|
|
|
#do not change
|
|
|
|
|
system.stateVersion = "24.05";
|
2024-09-22 01:04:11 -04:00
|
|
|
|
|
2024-10-05 12:36:08 -04:00
|
|
|
|
|
|
|
|
|
|
2024-09-22 01:04:11 -04:00
|
|
|
|
}
|