Compare commits

..

3 commits

Author SHA1 Message Date
688389edeb
vanadium/display: use lib.mkMerge 2025-10-20 00:11:26 +08:00
5fd498fbed
npins: update sources 2025-10-19 17:36:32 +08:00
13a55c1efe
packages/ruler: update 2025-10-19 17:36:23 +08:00
3 changed files with 30 additions and 20 deletions

View file

@ -85,7 +85,7 @@
# Note: the "position" field corresponds to the "pos" field outputted by autorandr # Note: the "position" field corresponds to the "pos" field outputted by autorandr
# To get the current config, run `xrandr --auto` and then `autorandr --config` # To get the current config, run `xrandr --auto` and then `autorandr --config`
configs = { configs = {
allOff = lib.genAttrs devices.all (_: {enable = false;}); allOff = lib.genAttrs devices.all (_: {enable = lib.mkDefault false;});
enableBuiltin = { enableBuiltin = {
eDP-1 = { eDP-1 = {
enable = true; enable = true;
@ -109,27 +109,37 @@
frameworkBuiltin = { frameworkBuiltin = {
fingerprint = fingerprints.built-in; fingerprint = fingerprints.built-in;
config = configs.allOff // configs.enableBuiltin; config = lib.mkMerge [
configs.allOff
configs.enableBuiltin
];
hooks.postswitch = switches.setDPI {dpi = 150;}; hooks.postswitch = switches.setDPI {dpi = 150;};
}; };
mkAsusProfile = name: { mkAsusProfile = name: {
fingerprint = fingerprints.built-in // fingerprints.asus-monitor name; fingerprint = lib.mkMerge [
config = configs.allOff // configs.enableDevice name; fingerprints.built-in
hooks.postswitch = (fingerprints.asus-monitor name)
switches.setDPI {dpi = 110;} ];
// switches.setSoftwareBrightness { config = lib.mkMerge [
configs.allOff
(configs.enableDevice name)
];
hooks.postswitch = lib.mkMerge [
(switches.setDPI {dpi = 110;})
(switches.setSoftwareBrightness {
device = name; device = name;
brightness = 1; brightness = 1;
} })
// switches.setDDCBrightness { (switches.setDDCBrightness {
modelName = "VG27AQL3A"; modelName = "VG27AQL3A";
brightness = 0; brightness = 0;
} })
// switches.setDDCContrast { (switches.setDDCContrast {
modelName = "VG27AQL3A"; modelName = "VG27AQL3A";
contrast = 0.5; contrast = 0.5;
}; })
];
}; };
in in
lib.mkMerge [ lib.mkMerge [

View file

@ -12,8 +12,8 @@
domain = "git.confusedcompiler.org"; domain = "git.confusedcompiler.org";
owner = "leana8959"; owner = "leana8959";
repo = "ruler"; repo = "ruler";
rev = "96474fa29fda73aa8253ee055bf5fd3c84ef1e60"; rev = "adf8f711b014cba4b73da0132c2be944ba20ba0b";
hash = "sha256-hBfRrKBQ2vTCK4eqKtx8i/7l61RkB8zoThdzoymnCUQ="; hash = "sha256-sHJEgwEAMERhOCPY16Lsirj1bSUfEUpwNnPmHfg+/8Q=";
}) })
{}; {};

View file

@ -220,9 +220,9 @@
}, },
"branch": "nixos-25.05-small", "branch": "nixos-25.05-small",
"submodules": false, "submodules": false,
"revision": "872106a411643f96e2c9576d247cf96e7c8c1b97", "revision": "f2ee78c4eb601be36a277e1779a7a87655419dad",
"url": "https://github.com/NixOS/nixpkgs/archive/872106a411643f96e2c9576d247cf96e7c8c1b97.tar.gz", "url": "https://github.com/NixOS/nixpkgs/archive/f2ee78c4eb601be36a277e1779a7a87655419dad.tar.gz",
"hash": "0r6rpgcxyfrbzsq0l1nnnpnqqlmx81pxjjavsk9vm02r3cf61lwz" "hash": "0g5m7bhqw01a950xga0w246al2cy11pqd0dq763whw5sbqfadr59"
}, },
"nur": { "nur": {
"type": "Git", "type": "Git",
@ -233,9 +233,9 @@
}, },
"branch": "main", "branch": "main",
"submodules": false, "submodules": false,
"revision": "5b9257bd1a5585897308817e715950fcec4f81a8", "revision": "68f4e0f40dfafa9bc9ae50b18685befac76ebcd4",
"url": "https://github.com/nix-community/nur/archive/5b9257bd1a5585897308817e715950fcec4f81a8.tar.gz", "url": "https://github.com/nix-community/nur/archive/68f4e0f40dfafa9bc9ae50b18685befac76ebcd4.tar.gz",
"hash": "0gl1rnm0r9d2jpawx1flmjn1a01f09cr7w48vfqg72qanzzffkz0" "hash": "04p7vqixrbyjnr9nnm3p4k37137f5nm6daly2q2yfci1p1a35qjc"
}, },
"pin-emacs28": { "pin-emacs28": {
"type": "Git", "type": "Git",