1
0
Fork 0
nixos/akame/default.nix

123 lines
3.6 KiB
Nix
Raw Normal View History

{ config, pkgs, ... }:
{
boot = {
2023-11-30 23:37:47 +01:00
extraModulePackages = [ config.boot.kernelPackages.rtl8812au ];
tmp = {
useTmpfs = true;
tmpfsSize = "10%";
};
};
hardware = {
2024-02-27 15:08:38 +01:00
bluetooth = {
disabledPlugins = [ "input" ];
enable = true;
};
nvidia = {
modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
powerManagement.enable = true;
};
opengl.enable = true;
};
2024-04-15 15:38:55 +02:00
home-manager.users.${config.lwad.definitions.username}.home.stateVersion =
"22.11";
imports = [
../components/desktop-environment.nix
../lwad
2024-03-04 14:53:33 +01:00
./hardware-configuration.nix
];
lwad = {
2024-03-26 21:54:21 +01:00
applications.i3 = {
autoRun = {
always = [ "${pkgs.openrgb}/bin/openrgb --profile Default" ];
startup = [
"${pkgs.signal-desktop}/bin/signal-desktop --start-in-tray"
"${pkgs.whatsapp-for-linux}/bin/whatsapp-for-linux"
];
};
2024-03-26 21:54:21 +01:00
audioControls = {
bluetooth.enable = true;
commands = let
mute_audio = pkgs.writeScript "mute_audio.sh" ''
IFS=$'\n'
sinks=$(${pactl} list short sinks | cut -f 1)
for sink in $sinks; do
${pactl} set-sink-volume $sink 0
done
'';
pactl = "${pkgs.pulseaudio}/bin/pactl";
in {
headphones = ''
${mute_audio} && ${pactl} set-default-sink $(${pactl} list sinks | rg "Name: " | cut -d " " -f 2 | rg "Focusrite_Scarlett_2i2") && ${pkgs.pamixer}/bin/pamixer --set-volume 0'';
speakers = ''
${mute_audio} && ${pactl} set-default-sink $(${pactl} list sinks | rg "Name: " | cut -d " " -f 2 | rg "C-Media_Electronics_Inc._USB_Audio_Device") && ${pkgs.pamixer}/bin/pamixer --set-volume 0'';
};
enable = true;
};
outputWorkspaceMappings = let strings = map (x: toString x);
in {
"HDMI-0" = strings [ 1 2 3 4 5 ];
"DVI-D-0" = strings [ 6 7 8 9 10 ];
2024-03-26 21:54:21 +01:00
};
};
filesystems.simple.enable = true;
utilities.btrbk.snapshots = [{
volume = "/";
subvolume = "home/${config.lwad.definitions.username}/Documents";
snapshotDir = "home/${config.lwad.definitions.username}/snapshots";
sync = {
2024-04-22 10:39:27 +02:00
enable = false;
serverAddress = "shinobu";
serverBackupDir = "/backups/${config.networking.hostName}";
};
}];
};
networking = {
hostName = "akame";
firewall.interfaces."tailscale0".allowedTCPPorts = [ 8081 ];
};
2023-06-19 11:20:47 +02:00
programs = {
bash.shellAliases = {
keyboard-leds =
"${config.lwad.definitions.sudoas.command} ${pkgs.g810-led}/bin/g810-led -a FF0000";
rdiff =
"rsync -nilrc --delete ryuko:Documents/ ~/Documents/ --exclude-from=/home/${config.lwad.definitions.username}/Documents/exclude";
};
tmux.extraConfigBeforePlugins = ''
set-option -g status-right ""
'';
};
services = {
hardware.openrgb = {
enable = true;
motherboard = "intel";
};
xserver = {
videoDrivers = [ "nvidia" ];
xrandrHeads = [
{
2023-05-12 14:08:19 +02:00
output = "HDMI-0";
primary = true;
monitorConfig = ''
Option "Position" "0 0"
Option "PreferredMode" "2560x1080"
Option "DPMS" "false"
'';
}
{
2023-05-12 14:08:19 +02:00
output = "DVI-D-0";
primary = false;
monitorConfig = ''
Option "Position" "2560 0"
Option "PreferredMode" "1920x1080"
Option "DPMS" "false"
'';
}
];
};
};
2023-11-30 23:37:47 +01:00
system.stateVersion =
"22.11"; # Do not change this value, even in the event of an upgrade
}