flake/hosts/muon/configuration.nix
2024-06-11 22:32:13 +00:00

71 lines
1.9 KiB
Nix

{ config, lib, pkgs, inputs, system, ... }:
let
cfg = config.mods;
in {
# Hardware
imports = [
./hardware-configuration.nix
];
# System
nix.settings.experimental-features = [ "nix-command" "flakes" ];
mods.user.name = "muon";
networking.hostName = cfg.user.name;
# Home
home-manager = {
extraSpecialArgs = { inherit system pkgs inputs; };
users."${cfg.user.name}" = {
imports = [
./home.nix
inputs.self.outputs.homeManagerModules.default
];
};
backupFileExtension = "bak";
};
# Modules
mods.desktop.enable = true;
mods.desktop.wayland.enable = false;
mods.theme.enable = true;
mods.theme.wallpaper = ./wallpaper.png;
services.xserver.windowManager.i3.enable = true;
# Proprietary </3
mods.unfree.steam.enable = true;
mods.unfree.nvidia.enable = true;
# Hardware settings
services.xserver.displayManager.sessionCommands = ''
${pkgs.xorg.xinput} --set-prop "pointer:Logitech Gaming Mouse G502" "libinput Accel Profile Enabled" 0, 1
${pkgs.xorg.xinput} --set-prop "pointer:Logitech Gaming Mouse G502" "libinput Accel Speed" -0.4
'';
# services.xserver.displayManager.setupCommands = ''
# ${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-1 --mode 1920x1080 --pos 2560x0 --rotate right --output DP-2 --primary --mode 2560x1440 --pos 0x480 --rotate normal
# '';
services.xserver.xrandrHeads = [
{
output = "DP-2";
primary = true;
monitorConfig = ''
Option "PreferredMode" "2560x1440"
Option "Position" "0 480"
'';
}
{
output = "HDMI-1";
monitorConfig = ''
Option "PreferredMode" "1920x1080"
Option "Position" "2560 0"
Option "Rotate" "right"
'';
}
];
# Backup environment
services.xserver.windowManager.qtile.enable = true;
# Version of first install
system.stateVersion = "23.05";
}