feat: Added ddcbacklight for linux

This commit is contained in:
uttarayan21
2025-01-04 03:48:32 +05:30
parent 73effa01b5
commit 77fe7cc116
4 changed files with 201 additions and 63 deletions

View File

@@ -108,6 +108,7 @@ in {
rr rr
sbctl sbctl
usbutils usbutils
ddcbacklight
] ]
++ lib.optionals device.isMac []; ++ lib.optionals device.isMac [];

258
flake.lock generated
View File

@@ -17,6 +17,22 @@
} }
}, },
"advisory-db_2": { "advisory-db_2": {
"flake": false,
"locked": {
"lastModified": 1734961910,
"narHash": "sha256-F4iNNs84rdqN2ZDCKtZrE/PUIfUe6YSZM/O2sckeQr4=",
"owner": "rustsec",
"repo": "advisory-db",
"rev": "b02b7ca7c98eee7fe26ac18277040c3fc814b52d",
"type": "github"
},
"original": {
"owner": "rustsec",
"repo": "advisory-db",
"type": "github"
}
},
"advisory-db_3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1686827229, "lastModified": 1686827229,
@@ -32,7 +48,7 @@
"type": "github" "type": "github"
} }
}, },
"advisory-db_3": { "advisory-db_4": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1734961910, "lastModified": 1734961910,
@@ -191,6 +207,21 @@
} }
}, },
"crane_2": { "crane_2": {
"locked": {
"lastModified": 1734808813,
"narHash": "sha256-3aH/0Y6ajIlfy7j52FGZ+s4icVX0oHhqBzRdlOeztqg=",
"owner": "ipetkov",
"repo": "crane",
"rev": "72e2d02dbac80c8c86bf6bf3e785536acf8ee926",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"crane_3": {
"locked": { "locked": {
"lastModified": 1732991615, "lastModified": 1732991615,
"narHash": "sha256-CgEHGXSzUdlRI1MzsZmWUwW8+6MKYqtCBIDrD/5H5/o=", "narHash": "sha256-CgEHGXSzUdlRI1MzsZmWUwW8+6MKYqtCBIDrD/5H5/o=",
@@ -205,7 +236,7 @@
"type": "github" "type": "github"
} }
}, },
"crane_3": { "crane_4": {
"locked": { "locked": {
"lastModified": 1731098351, "lastModified": 1731098351,
"narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=", "narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=",
@@ -220,15 +251,15 @@
"type": "github" "type": "github"
} }
}, },
"crane_4": { "crane_5": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_5",
"nixpkgs": [ "nixpkgs": [
"music-player", "music-player",
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": "rust-overlay_5" "rust-overlay": "rust-overlay_6"
}, },
"locked": { "locked": {
"lastModified": 1686621798, "lastModified": 1686621798,
@@ -244,7 +275,7 @@
"type": "github" "type": "github"
} }
}, },
"crane_5": { "crane_6": {
"locked": { "locked": {
"lastModified": 1734808813, "lastModified": 1734808813,
"narHash": "sha256-3aH/0Y6ajIlfy7j52FGZ+s4icVX0oHhqBzRdlOeztqg=", "narHash": "sha256-3aH/0Y6ajIlfy7j52FGZ+s4icVX0oHhqBzRdlOeztqg=",
@@ -259,7 +290,7 @@
"type": "github" "type": "github"
} }
}, },
"crane_6": { "crane_7": {
"locked": { "locked": {
"lastModified": 1734808813, "lastModified": 1734808813,
"narHash": "sha256-3aH/0Y6ajIlfy7j52FGZ+s4icVX0oHhqBzRdlOeztqg=", "narHash": "sha256-3aH/0Y6ajIlfy7j52FGZ+s4icVX0oHhqBzRdlOeztqg=",
@@ -306,6 +337,31 @@
"type": "github" "type": "github"
} }
}, },
"ddcbacklight": {
"inputs": {
"advisory-db": "advisory-db_2",
"crane": "crane_2",
"flake-utils": "flake-utils_3",
"nix-github-actions": "nix-github-actions_2",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay_3"
},
"locked": {
"lastModified": 1735942392,
"narHash": "sha256-ANismax0zJNqMbnPIJT8KkEdpGGhwHJMuysE1fzTeo0=",
"owner": "uttarayan21",
"repo": "ddcbacklight",
"rev": "89b5f0ba9fdffbb532b5172691ad373ec06408c5",
"type": "github"
},
"original": {
"owner": "uttarayan21",
"repo": "ddcbacklight",
"type": "github"
}
},
"deploy-rs": { "deploy-rs": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@@ -625,8 +681,23 @@
} }
}, },
"flake-utils_10": { "flake-utils_10": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_11": {
"inputs": { "inputs": {
"systems": "systems_12" "systems": "systems_13"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
@@ -642,9 +713,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_11": { "flake-utils_12": {
"inputs": { "inputs": {
"systems": "systems_13" "systems": "systems_14"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
@@ -660,9 +731,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_12": { "flake-utils_13": {
"inputs": { "inputs": {
"systems": "systems_14" "systems": "systems_15"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
@@ -698,7 +769,7 @@
}, },
"flake-utils_3": { "flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_5" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
@@ -716,14 +787,14 @@
}, },
"flake-utils_4": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_8" "systems": "systems_6"
}, },
"locked": { "locked": {
"lastModified": 1685518550, "lastModified": 1731533236,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -755,11 +826,11 @@
"systems": "systems_10" "systems": "systems_10"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1685518550,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -787,12 +858,15 @@
} }
}, },
"flake-utils_8": { "flake-utils_8": {
"inputs": {
"systems": "systems_12"
},
"locked": { "locked": {
"lastModified": 1644229661, "lastModified": 1731533236,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1070,7 +1144,7 @@
"nixpkgs" "nixpkgs"
], ],
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_6", "systems": "systems_7",
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
@@ -1208,7 +1282,7 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_7" "systems": "systems_8"
}, },
"locked": { "locked": {
"lastModified": 1735497496, "lastModified": 1735497496,
@@ -1326,12 +1400,12 @@
}, },
"ironbar": { "ironbar": {
"inputs": { "inputs": {
"crane": "crane_2", "crane": "crane_3",
"naersk": "naersk", "naersk": "naersk",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": "rust-overlay_3" "rust-overlay": "rust-overlay_4"
}, },
"locked": { "locked": {
"lastModified": 1735432812, "lastModified": 1735432812,
@@ -1377,14 +1451,14 @@
}, },
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane_3", "crane": "crane_4",
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_3",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"pre-commit-hooks-nix": "pre-commit-hooks-nix", "pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay_4" "rust-overlay": "rust-overlay_5"
}, },
"locked": { "locked": {
"lastModified": 1734994463, "lastModified": 1734994463,
@@ -1402,10 +1476,10 @@
}, },
"music-player": { "music-player": {
"inputs": { "inputs": {
"advisory-db": "advisory-db_2", "advisory-db": "advisory-db_3",
"crane": "crane_4", "crane": "crane_5",
"fenix": "fenix", "fenix": "fenix",
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_6",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@@ -1590,6 +1664,27 @@
} }
}, },
"nix-github-actions_2": { "nix-github-actions_2": {
"inputs": {
"nixpkgs": [
"ddcbacklight",
"nixpkgs"
]
},
"locked": {
"lastModified": 1731952509,
"narHash": "sha256-p4gB3Rhw8R6Ak4eMl8pqjCPOLCZRqaehZxdZ/mbFClM=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "7b5f051df789b6b20d259924d349a9ba3319b226",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nix-github-actions_3": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"tmux-float", "tmux-float",
@@ -1834,7 +1929,7 @@
}, },
"nno": { "nno": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_7", "flake-utils": "flake-utils_8",
"neorg": "neorg", "neorg": "neorg",
"neorg-telescope": "neorg-telescope", "neorg-telescope": "neorg-telescope",
"nixpkgs": [ "nixpkgs": [
@@ -1860,7 +1955,7 @@
"norg": { "norg": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_6", "flake-compat": "flake-compat_6",
"flake-utils": "flake-utils_8", "flake-utils": "flake-utils_9",
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
@@ -1881,7 +1976,7 @@
"norg-meta": { "norg-meta": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_7", "flake-compat": "flake-compat_7",
"flake-utils": "flake-utils_9", "flake-utils": "flake-utils_10",
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
@@ -1920,7 +2015,7 @@
}, },
"nuschtosSearch": { "nuschtosSearch": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_6", "flake-utils": "flake-utils_7",
"ixx": "ixx", "ixx": "ixx",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
@@ -1943,7 +2038,7 @@
}, },
"onepassword-shell-plugins": { "onepassword-shell-plugins": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_10", "flake-utils": "flake-utils_11",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@@ -2069,9 +2164,10 @@
"anyrun-rink": "anyrun-rink", "anyrun-rink": "anyrun-rink",
"csshacks": "csshacks", "csshacks": "csshacks",
"d2": "d2", "d2": "d2",
"ddcbacklight": "ddcbacklight",
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"disko": "disko", "disko": "disko",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_4",
"guihua": "guihua", "guihua": "guihua",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
@@ -2093,7 +2189,7 @@
"openapi-tui": "openapi-tui", "openapi-tui": "openapi-tui",
"pets": "pets", "pets": "pets",
"rest-nvim": "rest-nvim", "rest-nvim": "rest-nvim",
"rust-overlay": "rust-overlay_6", "rust-overlay": "rust-overlay_7",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"tmux-float": "tmux-float", "tmux-float": "tmux-float",
"tree-sitter-d2": "tree-sitter-d2", "tree-sitter-d2": "tree-sitter-d2",
@@ -2144,6 +2240,27 @@
} }
}, },
"rust-overlay_3": { "rust-overlay_3": {
"inputs": {
"nixpkgs": [
"ddcbacklight",
"nixpkgs"
]
},
"locked": {
"lastModified": 1735352767,
"narHash": "sha256-3zXufMRWUdwmp8/BTmxVW/k4MyqsPjLnnt/IlQyZvhc=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "a16b9a7cac7f4d39a84234d62e91890370c57d76",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_4": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"ironbar", "ironbar",
@@ -2164,7 +2281,7 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_4": { "rust-overlay_5": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"lanzaboote", "lanzaboote",
@@ -2185,7 +2302,7 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_5": { "rust-overlay_6": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [
"music-player", "music-player",
@@ -2212,7 +2329,7 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_6": { "rust-overlay_7": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@@ -2232,7 +2349,7 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_7": { "rust-overlay_8": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"tmux-float", "tmux-float",
@@ -2253,7 +2370,7 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_8": { "rust-overlay_9": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"zjstatus", "zjstatus",
@@ -2384,6 +2501,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_15": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@@ -2446,16 +2578,16 @@
}, },
"systems_6": { "systems_6": {
"locked": { "locked": {
"lastModified": 1689347949, "lastModified": 1681028828,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default-linux", "repo": "default",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default-linux", "repo": "default",
"type": "github" "type": "github"
} }
}, },
@@ -2476,16 +2608,16 @@
}, },
"systems_8": { "systems_8": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1689347949,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default", "repo": "default-linux",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default", "repo": "default-linux",
"type": "github" "type": "github"
} }
}, },
@@ -2506,14 +2638,14 @@
}, },
"tmux-float": { "tmux-float": {
"inputs": { "inputs": {
"advisory-db": "advisory-db_3", "advisory-db": "advisory-db_4",
"crane": "crane_5", "crane": "crane_6",
"flake-utils": "flake-utils_11", "flake-utils": "flake-utils_12",
"nix-github-actions": "nix-github-actions_2", "nix-github-actions": "nix-github-actions_3",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": "rust-overlay_7" "rust-overlay": "rust-overlay_8"
}, },
"locked": { "locked": {
"lastModified": 1735044950, "lastModified": 1735044950,
@@ -2637,7 +2769,7 @@
}, },
"utils": { "utils": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1701680307,
@@ -2696,12 +2828,12 @@
}, },
"zjstatus": { "zjstatus": {
"inputs": { "inputs": {
"crane": "crane_6", "crane": "crane_7",
"flake-utils": "flake-utils_12", "flake-utils": "flake-utils_13",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": "rust-overlay_8" "rust-overlay": "rust-overlay_9"
}, },
"locked": { "locked": {
"lastModified": 1735124047, "lastModified": 1735124047,

View File

@@ -139,6 +139,10 @@
url = "github:uttarayan21/tmux-float"; url = "github:uttarayan21/tmux-float";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
ddcbacklight = {
url = "github:uttarayan21/ddcbacklight";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { outputs = {

View File

@@ -119,6 +119,7 @@
}; };
}; };
}; };
ddcbacklight = inputs.ddcbacklight.packages.${prev.system}.ddcbacklight;
}; };
anyrun-overlay = final: prev: { anyrun-overlay = final: prev: {
anyrun = anyrun =