Compare commits

..

7 commits

7 changed files with 74 additions and 43 deletions

View file

@ -4,5 +4,4 @@
imports = [
./modules
];
}

View file

@ -24,23 +24,6 @@
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
snowhawk.dwm.enable = true;
# Configure keymap in X11
@ -89,13 +72,11 @@
description = "Zynh Ludwig";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
fish
ripgrep
lazygit
unzip
fzf
tree
libsecret
nix-output-monitor
@ -131,6 +112,16 @@
user = "ravenshade";
};
security.sudo.extraRules = [
{
users = [ "ravenshade" ];
commands = [{
command = "${pkgs.nixos-rebuild}/bin/nixos-rebuild";
options = [ "SETENV" "NOPASSWD" ];
}];
}
];
home-manager = {
extraSpecialArgs = { inherit inputs; };
users = { "ravenshade" = import ./home.nix; };

View file

@ -1,4 +1,4 @@
{ config, lib, modulesPath, ... }:
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -34,10 +34,34 @@
# Load nvidia driver for Xorg and Wayland
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
services.xserver.dpi = lib.mkDefault 96;
services.xserver.xrandrHeads = [
"HDMI-0"
{ output = "DP-0"; primary = true; }
];
# services.xserver.xrandrHeads = [
# { output = "HDMI-0"; }
# {
# output = "DP-0";
# primary = true;
# monitorConfig = ''
# Option "Position" "1920 0"
# '';
# }
# ];
systemd.user.services.screenlayout = {
script = ''
${pkgs.xorg.xrandr}/bin/xrandr \
--output DP-0 --primary --mode 1920x1080 --pos 1922x0 --rotate normal \
--output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate normal \
--output DP-1 --off \
--output DP-2 --off \
--output DP-3 --off \
--output DP-4 --off \
--output DP-5 --off \
--output HDMI-1 --off
'';
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
};
hardware.nvidia = {

View file

@ -25,7 +25,7 @@
home.packages = with pkgs; [
(writeShellScriptBin "rebuild" ''
sudo nixos-rebuild switch --log-format internal-json -v |& nom --json
nixos-rebuild switch --log-format internal-json -v |& nom --json
'')
feh

View file

@ -1,7 +1,10 @@
{ ... }:
{ lib, ... }:
{
imports = [
./dwm.nix
./i18n.nix
];
snowhawk.i18n.enable = lib.mkDefault true;
}

View file

@ -9,6 +9,9 @@ in
};
config = lib.mkIf cfg.enable {
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.windowManager.dwm = {
enable = true;
package = pkgs.dwm.overrideAttrs (oldAttrs: {
@ -23,22 +26,6 @@ in
fade = false;
};
# systemd.user.services.screenlayout = {
# script = ''
# ${pkgs.xorg.xrandr}/bin/xrandr \
# --output DP-0 --primary --mode 1920x1080 --pos 1922x0 --rotate normal \
# --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate normal \
# --output DP-1 --off \
# --output DP-2 --off \
# --output DP-3 --off \
# --output DP-4 --off \
# --output DP-5 --off \
# --output HDMI-1 --off
# '';
# wantedBy = [ "graphical-session.target" ];
# partOf = [ "graphical-session.target" ];
# };
systemd.user.services.xrootdatetime = {
script = ''
while true; do

27
modules/i18n.nix Normal file
View file

@ -0,0 +1,27 @@
{ lib, config, ... }:
let
cfg = config.snowhawk.i18n;
in
{
options.snowhawk.i18n = {
enable = lib.mkEnableOption "i18n";
};
config = lib.mkIf cfg.enable {
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
}