mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-06 19:00:14 +00:00
Compare commits
4 Commits
2b36140fbf
...
home-manag
Author | SHA1 | Date | |
---|---|---|---|
df9cbc4fb3 | |||
a4b5e05f8f | |||
83f548e95f | |||
c66ca460c0 |
@ -194,7 +194,18 @@
|
|||||||
nixpkgs.config.permittedInsecurePackages = config.insecurePackages;
|
nixpkgs.config.permittedInsecurePackages = config.insecurePackages;
|
||||||
|
|
||||||
# Pin a state version to prevent warnings
|
# Pin a state version to prevent warnings
|
||||||
home-manager.users.${config.user}.home.stateVersion = stateVersion;
|
|
||||||
home-manager.users.root.home.stateVersion = stateVersion;
|
home-manager.users.root.home.stateVersion = stateVersion;
|
||||||
|
|
||||||
|
# Fix for running home-manager against the repo directly
|
||||||
|
# See: https://github.com/nix-community/home-manager/issues/2033
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
home.stateVersion = stateVersion;
|
||||||
|
news = {
|
||||||
|
display = "silent";
|
||||||
|
entries = lib.mkForce [ ];
|
||||||
|
json = lib.mkForce { "output" = { }; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -37,17 +37,16 @@
|
|||||||
# Set up screen position and rotation
|
# Set up screen position and rotation
|
||||||
setupCommands = ''
|
setupCommands = ''
|
||||||
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 \
|
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 \
|
||||||
--mode 1920x1200 \
|
|
||||||
--pos 2560x0 \
|
|
||||||
--rotate left \
|
|
||||||
--output DisplayPort-0 \
|
|
||||||
--primary \
|
--primary \
|
||||||
--mode 2560x1440 \
|
|
||||||
--pos 0x560 \
|
|
||||||
--rotate normal \
|
--rotate normal \
|
||||||
--rate 120 \
|
--mode 2560x1440 \
|
||||||
|
--rate 165 \
|
||||||
|
--output DisplayPort-2 \
|
||||||
|
--right-of DisplayPort-1 \
|
||||||
|
--rotate left \
|
||||||
--output DVI-0 --off \
|
--output DVI-0 --off \
|
||||||
--output DVI-1 --off \
|
--output DVI-1 --off \
|
||||||
|
|| echo "xrandr failed"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
|
|
||||||
config = lib.mkIf (config.physical && !config.server) {
|
config = lib.mkIf (config.physical && !config.server) {
|
||||||
|
|
||||||
|
# Use power button to sleep instead of poweroff
|
||||||
|
services.logind.powerKey = "suspend";
|
||||||
|
services.logind.powerKeyLongPress = "poweroff";
|
||||||
|
|
||||||
# Prevent wake from keyboard
|
# Prevent wake from keyboard
|
||||||
powerManagement.powerDownCommands = ''
|
powerManagement.powerDownCommands = ''
|
||||||
set +e
|
set +e
|
||||||
|
@ -8,22 +8,14 @@
|
|||||||
|
|
||||||
config = lib.mkIf pkgs.stdenv.isLinux {
|
config = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
|
||||||
|
services.tzupdate.enable = true;
|
||||||
|
|
||||||
# Service to determine location for time zone
|
# Service to determine location for time zone
|
||||||
|
# This is required for redshift which depends on the location provider
|
||||||
services.geoclue2.enable = true;
|
services.geoclue2.enable = true;
|
||||||
services.geoclue2.enableWifi = false; # Breaks when it can't connect
|
services.geoclue2.enableWifi = false; # Breaks when it can't connect
|
||||||
location = {
|
location = {
|
||||||
provider = "geoclue2";
|
provider = "geoclue2";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable local time based on time zone
|
|
||||||
services.localtimed.enable = true;
|
|
||||||
|
|
||||||
# Required to get localtimed to talk to geoclue2
|
|
||||||
services.geoclue2.appConfig.localtimed.isSystem = true;
|
|
||||||
services.geoclue2.appConfig.localtimed.isAllowed = true;
|
|
||||||
|
|
||||||
# Fix "Failed to set timezone"
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/68489#issuecomment-1484030107
|
|
||||||
services.geoclue2.enableDemoAgent = lib.mkForce true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user