major rewrite of flake
This commit is contained in:
parent
f9a642398b
commit
9b99eef302
7 changed files with 214 additions and 2171 deletions
|
@ -2,7 +2,7 @@
|
|||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ nixos-hardware, config, pkgs, musnix, lib, ... }:
|
||||
{ nixos-hardware, config, pkgs, musnix, lib, inputs, outputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
|
@ -11,8 +11,44 @@
|
|||
./razer-speaker-fix.nix
|
||||
];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
# outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = let
|
||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||
in {
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than +3";
|
||||
};
|
||||
|
||||
settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
experimental-features = "nix-command flakes";
|
||||
# Workaround for https://github.com/NixOS/nix/issues/9574
|
||||
nix-path = config.nix.nixPath;
|
||||
};
|
||||
# Opinionated: disable channels
|
||||
channel.enable = false;
|
||||
|
||||
# Opinionated: make flake registry and nix path match flake inputs
|
||||
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
|
||||
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
@ -48,8 +84,8 @@
|
|||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot = {
|
||||
initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
||||
kernelParams = [ "nvidia-drm.fbdev=1" "nvidia_drm.modeset=1"];
|
||||
initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" "snd-virmidi"];
|
||||
kernelParams = [ "nvidia_drm.fbdev=1" "nvidia_drm.modeset=1"];
|
||||
};
|
||||
|
||||
systemd.services.tailscaled.after = ["NetworkManager-wait-online.service"];
|
||||
|
@ -166,18 +202,6 @@
|
|||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_CA.UTF-8";
|
||||
|
||||
nix.nixPath = [ "nixos-config=/home/emenel/source/nixos-config" "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" ];
|
||||
|
||||
nix.package = pkgs.nixVersions.latest;
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ]; #repl-flake
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
nix.gc.automatic = true;
|
||||
nix.gc.dates = "daily";
|
||||
nix.gc.options = "--delete-older-than +3";
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
|
@ -203,42 +227,49 @@
|
|||
services.tailscale.enable = true;
|
||||
services.envfs.enable = true;
|
||||
|
||||
#services.emacs = {
|
||||
# enable = true;
|
||||
#};
|
||||
services.gnome.gnome-remote-desktop.enable = false;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.gnome.gnome-remote-desktop.enable = false;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber.enable = true;
|
||||
|
||||
extraConfig.pipewire."91-null-sinks" = {
|
||||
"context.modules" = [
|
||||
{
|
||||
name = "libpipewire-module-loopback";
|
||||
args = {
|
||||
"node.description" = "Default Playback";
|
||||
"capture.props" = {
|
||||
"node.name" = "BixSix_or_fallback_Playback";
|
||||
"media.class" = "Audio/Sink";
|
||||
"audio.position" = "[FL FR]";
|
||||
wireplumber = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
pipewire."91-null-sinks" = {
|
||||
"context.modules" = [
|
||||
{
|
||||
name = "libpipewire-module-loopback";
|
||||
args = {
|
||||
"node.description" = "Default Playback";
|
||||
"capture.props" = {
|
||||
"node.name" = "BixSix_or_fallback_Playback";
|
||||
"media.class" = "Audio/Sink";
|
||||
"audio.position" = "[FL FR]";
|
||||
};
|
||||
"playback.props" = {
|
||||
"node.name" = "playback.BixSixWithFallbackPlayback";
|
||||
"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;
|
||||
};
|
||||
};
|
||||
"playback.props" = {
|
||||
"node.name" = "playback.BixSixWithFallbackPlayback";
|
||||
"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;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -262,7 +293,7 @@
|
|||
};
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
services.ratbagd.enable = true;
|
||||
services.dbus.implementation = "broker";
|
||||
|
||||
#programs.gnupg.enable = true;
|
||||
|
@ -287,7 +318,7 @@
|
|||
config = builtins.readFile ../../dotfiles/dot_config/kmonad/sinc.kbd;
|
||||
};
|
||||
razer = {
|
||||
extraGroups = [ "openrazer" ];
|
||||
extraGroups = [ "openrazer" ];
|
||||
device = "/dev/input/by-id/usb-Razer_Razer_Blade-if01-event-kbd";
|
||||
config = builtins.readFile ../../dotfiles/dot_config/kmonad/razer.kbd;
|
||||
};
|
||||
|
@ -317,8 +348,8 @@
|
|||
binfmt = true;
|
||||
};
|
||||
|
||||
programs.nix-ld.dev.enable = true;
|
||||
programs.nix-ld.dev.libraries = with pkgs; [
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
zlib
|
||||
zstd
|
||||
stdenv.cc.cc
|
||||
|
@ -345,6 +376,7 @@
|
|||
libGLU.dev
|
||||
libuv.out
|
||||
libressl.out
|
||||
libudev-zero.out
|
||||
];
|
||||
|
||||
services.udev.packages = with pkgs; [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue