Compare commits
3 commits
992c4b4acb
...
0bd5639f45
Author | SHA1 | Date | |
---|---|---|---|
chayleaf | 0bd5639f45 | ||
chayleaf | 77c32a9a16 | ||
chayleaf | 6ab0a2133c |
571
flake.lock
571
flake.lock
|
@ -65,20 +65,21 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730945195,
|
||||
"narHash": "sha256-+ZZZOjLROeG10TC7UacIrVxZB3S0VAHCZ2ObRovbx1E=",
|
||||
"owner": "nix-community",
|
||||
"lastModified": 1722902027,
|
||||
"narHash": "sha256-STgis1RRrrerOrI/l7bBeJS8HR3ZHlsAhZ4NXO1eIi0=",
|
||||
"owner": "qowoz",
|
||||
"repo": "buildbot-nix",
|
||||
"rev": "85c0b246cc96cc244e4d9889a97c4991c4593dc3",
|
||||
"rev": "f43d4ee9e3325a486928ddc3d04956844b3baf56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"owner": "qowoz",
|
||||
"ref": "skipped-build-workers",
|
||||
"repo": "buildbot-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cgroup-exporter": {
|
||||
"comin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nix-community-infra",
|
||||
|
@ -86,16 +87,17 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727276091,
|
||||
"narHash": "sha256-CG8XCZemSAs53VKU9VSARprQWI+0mj/RmTsp2WMJr6s=",
|
||||
"owner": "arianvp",
|
||||
"repo": "cgroup-exporter",
|
||||
"rev": "816bfe1bc881ae43cf392949c47d8516a48fceeb",
|
||||
"lastModified": 1714766748,
|
||||
"narHash": "sha256-//fP25eh1f9eA+0TEgWqusWjv9SuKh8rIF1ZJQNL1jo=",
|
||||
"owner": "nlewo",
|
||||
"repo": "comin",
|
||||
"rev": "d3658c452024824235de2355ac3e156b10c3eaaf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "arianvp",
|
||||
"repo": "cgroup-exporter",
|
||||
"owner": "nlewo",
|
||||
"repo": "comin",
|
||||
"rev": "d3658c452024824235de2355ac3e156b10c3eaaf",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
@ -163,27 +165,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728330715,
|
||||
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -192,11 +173,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731895210,
|
||||
"narHash": "sha256-z76Q/OXLxO/RxMII3fIt/TG665DANiE2lVvnolK2lXk=",
|
||||
"lastModified": 1723426710,
|
||||
"narHash": "sha256-yrS9al6l3fYfFfvovnyBWnyELDQOdfKyai4K/jKgoBw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "639d1520df9417ca2761536c3072688569e83c80",
|
||||
"rev": "0d510fe40b56ed74907a021d7e1ffd0042592914",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -283,20 +264,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_5": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"revCount": 57,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
|
@ -305,11 +272,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730504689,
|
||||
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
||||
"lastModified": 1722555600,
|
||||
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
||||
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -323,32 +290,11 @@
|
|||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730504689,
|
||||
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
||||
"lastModified": 1722555600,
|
||||
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730504689,
|
||||
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
||||
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -361,24 +307,6 @@
|
|||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
|
@ -393,83 +321,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"nixvim",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731363552,
|
||||
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hercules-ci-effects": {
|
||||
"inputs": {
|
||||
"flake-parts": [
|
||||
"nix-community-infra",
|
||||
"flake-parts"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nix-community-infra",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730903510,
|
||||
"narHash": "sha256-mnynlrPeiW0nUQ8KGZHb3WyxAxA3Ye/BH8gMjdoKP6E=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"rev": "b89ac4d66d618b915b1f0a408e2775fe3821d141",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -477,65 +328,26 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731943274,
|
||||
"narHash": "sha256-EpVzPygqBuyU3CDNl9bnBhHkz/PTLM4UsIfB5A7QK/k=",
|
||||
"lastModified": 1723599998,
|
||||
"narHash": "sha256-9a/Dq7WUhP35WrpqXUpDBsnKoKASsYB8FQjIeVlghm4=",
|
||||
"owner": "chayleaf",
|
||||
"repo": "home-manager",
|
||||
"rev": "7f95891341303b2b40ce8dc6f931b67071576bd0",
|
||||
"rev": "c29f1c444bbfe3cfa22e347923fe04245030bcda",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "chayleaf",
|
||||
"ref": "ci",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731832479,
|
||||
"narHash": "sha256-icDDuYwJ0avTMZTxe1qyU/Baht5JOqw4pb5mWpR+hT0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "5056a1cf0ce7c2a08ab50713b6c4af77975f6111",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hydra": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1730160474,
|
||||
"narHash": "sha256-uyR+7f+rV0w1UMRQ92I5Smk7pq3/PvXH5c1ozaa/duI=",
|
||||
"owner": "qowoz",
|
||||
"repo": "hydra",
|
||||
"rev": "1c2e3b8c21ed75ed1c8c177d260e2b3b2c66ccf9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "qowoz",
|
||||
"ref": "community",
|
||||
"repo": "hydra",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"impermanence": {
|
||||
"locked": {
|
||||
"lastModified": 1731242966,
|
||||
"narHash": "sha256-B3C3JLbGw0FtLSWCjBxU961gLNv+BOOBC6WvstKLYMw=",
|
||||
"lastModified": 1719091691,
|
||||
"narHash": "sha256-AxaLX5cBEcGtE02PeGsfscSb/fWMnyS7zMWBXQWDKbE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "impermanence",
|
||||
"rev": "3ed3f0eaae9fcc0a8331e77e9319c8a4abd8a71a",
|
||||
"rev": "23c1f06316b67cb5dabdfe2973da3785cfe9c34a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -544,49 +356,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ixx": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729958008,
|
||||
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "ixx",
|
||||
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"ref": "v0.0.6",
|
||||
"repo": "ixx",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lite-config": {
|
||||
"locked": {
|
||||
"lastModified": 1723691425,
|
||||
"narHash": "sha256-xOroQo/+CAtocvJQsGPE5ukr1Btp72xlcWPB4tBZp6M=",
|
||||
"owner": "yelite",
|
||||
"repo": "lite-config",
|
||||
"rev": "34357ad12ad0a66b2de55a2457159bda36c71a06",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "yelite",
|
||||
"repo": "lite-config",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mobile-nixos": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -608,17 +377,12 @@
|
|||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"buildbot-nix": "buildbot-nix",
|
||||
"cgroup-exporter": "cgroup-exporter",
|
||||
"comin": "comin",
|
||||
"disko": "disko",
|
||||
"empty": "empty",
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-parts": "flake-parts",
|
||||
"hercules-ci-effects": "hercules-ci-effects",
|
||||
"hydra": "hydra",
|
||||
"lite-config": "lite-config",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixos-facter-modules": "nixos-facter-modules",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-update": "nixpkgs-update",
|
||||
"nixpkgs-update-github-releases": "nixpkgs-update-github-releases",
|
||||
|
@ -629,11 +393,11 @@
|
|||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731900458,
|
||||
"narHash": "sha256-K4iJLt9yX0QjR2yvBkfN0fxO+VQzq3fmzSiIK0FfnZA=",
|
||||
"lastModified": 1723586765,
|
||||
"narHash": "sha256-2YtIQm1DOph5fXkEySRdKAYSiWJK8ztc1NxoUnjvfSs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "infra",
|
||||
"rev": "de95074435a87de6879e3522569a423cd2032692",
|
||||
"rev": "177e5a2fbfeb70bbf86d7ca7efdfd5d1870678db",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -650,11 +414,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731885500,
|
||||
"narHash": "sha256-ZrztYfSOS33J+ewq5alBOSdnIyZ0/sr1iy7FyBe9zIg=",
|
||||
"lastModified": 1722924007,
|
||||
"narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "c60b5c924c6188a0b3ca2e139ead3d0f92ae5db5",
|
||||
"rev": "91010a5613ffd7ee23ee9263213157a1c422b705",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -663,27 +427,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731809072,
|
||||
"narHash": "sha256-pOsDJQR0imnFLfpvTmRpHcP0tflyxtP/QIzokrKSP8U=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "34588d57cfc41c6953c54c93b6b685cab3b548ee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-gaming": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
|
@ -693,11 +436,11 @@
|
|||
"umu": "umu"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731925304,
|
||||
"narHash": "sha256-FeUIzD9f5Z8OMkogeEMaVLIhawGdmOhKJ4VVpdycOeA=",
|
||||
"lastModified": 1723425928,
|
||||
"narHash": "sha256-BFj0H0h3+hTCTsHTMCzmO7hQL3ym2MTgIdQe1SN1wPw=",
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"rev": "d589673486d8a5c1c6cbc3c0e1c077200da7e085",
|
||||
"rev": "cd19f284c40ce697db66314d0b7d29e41d47eb6b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -709,16 +452,15 @@
|
|||
"nix-index-database": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nix-community-infra",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731814505,
|
||||
"narHash": "sha256-l9ryrx1Twh08a+gxrMGM9O/aZKEimZfa6sZVyPCImgI=",
|
||||
"lastModified": 1723352546,
|
||||
"narHash": "sha256-WTIrvp0yV8ODd6lxAq4F7EbrPQv0gscBnyfn559c3k8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "bdba246946fb079b87b4cada4df9b1cdf1c06132",
|
||||
"rev": "ec78079a904d7d55e81a0468d764d0fffb50ac06",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -727,48 +469,13 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-index-database_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731814505,
|
||||
"narHash": "sha256-l9ryrx1Twh08a+gxrMGM9O/aZKEimZfa6sZVyPCImgI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "bdba246946fb079b87b4cada4df9b1cdf1c06132",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-facter-modules": {
|
||||
"locked": {
|
||||
"lastModified": 1731843871,
|
||||
"narHash": "sha256-aIy8m4jjr/BFXzniNzoH16sF7HEFV/01/5b3FhtUHrw=",
|
||||
"owner": "numtide",
|
||||
"repo": "nixos-facter-modules",
|
||||
"rev": "5a1c2a28589e34f8a44d46dd1909cfacf928cb1a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "nixos-facter-modules",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1731797098,
|
||||
"narHash": "sha256-UhWmEZhwJZmVZ1jfHZFzCg+ZLO9Tb/v3Y6LC0UNyeTo=",
|
||||
"lastModified": 1723310128,
|
||||
"narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "672ac2ac86f7dff2f6f3406405bddecf960e0db6",
|
||||
"rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -824,11 +531,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1731875774,
|
||||
"narHash": "sha256-HIl3lTqMVu/RXx9Gav46qai6+OV9Gu3cQFbvZSOvjJI=",
|
||||
"lastModified": 1723316219,
|
||||
"narHash": "sha256-2B9qh8QBvw3kV/8cHc7ZJcrbVsRwP8wKjkwPXTSz76Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6c33d760f16f52ffc0dd8538b9239808d96ec699",
|
||||
"rev": "bef98989a27429e1cb9e3d9c25701ba2da742af2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -856,14 +563,14 @@
|
|||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1730504152,
|
||||
"narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=",
|
||||
"lastModified": 1722555339,
|
||||
"narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs-update": {
|
||||
|
@ -883,11 +590,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730338630,
|
||||
"narHash": "sha256-rGp0I9m3/nDV70nRXvdCv2QiAGPOaRm92rISXDxNUJM=",
|
||||
"lastModified": 1722969327,
|
||||
"narHash": "sha256-P8g6kDgZYMwxqmp8FRRZOwwBjkT4ILifvXV0fOz9ofY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs-update",
|
||||
"rev": "525c2e488ad26cd46878fd93337521bf42e598a9",
|
||||
"rev": "503f7b0d94b6eb780a51823972e6ab0204b0a137",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -928,11 +635,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1731943205,
|
||||
"narHash": "sha256-PVYJX1oCgzLyblKeOJ5YVzQBlLyq3vl8xhk92vbxwYs=",
|
||||
"lastModified": 1723686439,
|
||||
"narHash": "sha256-sgHQqIDtHQUivF5vqa+k4iwbc/cx8F6x6IvXTlNd4Pg=",
|
||||
"owner": "chayleaf",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "cb19b1decd65da83af22390f5ccbb2338b713963",
|
||||
"rev": "43a0d4fefbfb1a9bc2f109769610038fcfae5ea0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -942,48 +649,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1731676054,
|
||||
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat_5",
|
||||
"flake-parts": "flake-parts_3",
|
||||
"git-hooks": "git-hooks",
|
||||
"home-manager": "home-manager_2",
|
||||
"nix-darwin": "nix-darwin_2",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"treefmt-nix": "treefmt-nix_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731920852,
|
||||
"narHash": "sha256-TczdWFVNDYS8YjVjiUmzOHbBn52keL4ECygrWrBtIgs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "f4c910dd82eb6e811ba171bc923087b7ecfb321c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"notlua": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -1011,11 +676,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726769859,
|
||||
"narHash": "sha256-sHKPDv3ihpoLnX076og9U3fAYcKoHIjKysvjwJ4+oyc=",
|
||||
"lastModified": 1700483422,
|
||||
"narHash": "sha256-ni6niOmObnG9EVGtaeT1I7ULz5+EkEewGTJVeFuWNuc=",
|
||||
"owner": "chayleaf",
|
||||
"repo": "notnft",
|
||||
"rev": "2ca0b2fdfdd6780c9d4cab24afedefdd33ef8e08",
|
||||
"rev": "b3e6a023a13a81d70a6a30997e2f1aaf36feafb3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1026,11 +691,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1731941414,
|
||||
"narHash": "sha256-2Xf90oIkzvOjzZBIgLxga6DqidvB6CSODE5+DODfLeI=",
|
||||
"lastModified": 1723664702,
|
||||
"narHash": "sha256-ErRJ3oUHFOzUXoDAzws/h5u7c6dCExETjmm5uIFL/QY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "23a30a846dc89a997f42f2d7e64d6f38564014ae",
|
||||
"rev": "7bcbb0362c92f230ba4a2c5ad227e04f84fc1ce0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1047,11 +712,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728318238,
|
||||
"narHash": "sha256-iOsIle2mcFaztlAvrPzuiCkdklfuVA3k1JccqFgB76Q=",
|
||||
"lastModified": 1716222588,
|
||||
"narHash": "sha256-gbyIIHsJpk3V8tnsGP8RZpgc0NM/R9QT4zk4SObRDas=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur-update",
|
||||
"rev": "fd8ee17f458880ca4d49965348e144b6fc131e14",
|
||||
"rev": "a54c4c1b0ec643ff36b3c9deecb5fefce57dcabc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1060,32 +725,9 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"ixx": "ixx",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731582522,
|
||||
"narHash": "sha256-1w6aM4bG5cl2E4jHLPnMKkrUO4tY1jUX1NI6/RwJN7Y=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "13300b2297c51368e0892c3ebe220f688014fe15",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"osu-wine": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -1113,13 +755,12 @@
|
|||
"mobile-nixos": "mobile-nixos",
|
||||
"nix-community-infra": "nix-community-infra",
|
||||
"nix-gaming": "nix-gaming",
|
||||
"nix-index-database": "nix-index-database_2",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixos-mailserver": "nixos-mailserver",
|
||||
"nixos-router": "nixos-router",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs-kernel": "nixpkgs-kernel",
|
||||
"nixvim": "nixvim",
|
||||
"notlua": "notlua",
|
||||
"notnft": "notnft",
|
||||
"nur": "nur",
|
||||
|
@ -1135,11 +776,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731897198,
|
||||
"narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=",
|
||||
"lastModified": 1723602049,
|
||||
"narHash": "sha256-Z/noCSn9WPkv7O77dWKLcBxe4Ub4bWyNzsL5JhjaQfw=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "0be641045af6d8666c11c2c40e45ffc9667839b5",
|
||||
"rev": "ea0bf33a11a26a62c60123c49d96011da396602c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1153,14 +794,18 @@
|
|||
"nixpkgs": [
|
||||
"nix-community-infra",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nix-community-infra",
|
||||
"empty"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731862312,
|
||||
"narHash": "sha256-NVUTFxKrJp/hjehlF1IvkPnlRYg/O9HFVutbxOM8zNM=",
|
||||
"lastModified": 1722897572,
|
||||
"narHash": "sha256-3m/iyyjCdRBF8xyehf59QlckIcmShyTesymSb+N4Ap4=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "472741cf3fee089241ac9ea705bb2b9e0bfa2978",
|
||||
"rev": "8ae477955dfd9cbf5fa4eb82a8db8ddbb94e79d9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1177,11 +822,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731891382,
|
||||
"narHash": "sha256-rRREuHCR3k6/g+F9sToP2Cf05qVlWQbl2c7dRRhcqTI=",
|
||||
"lastModified": 1723423676,
|
||||
"narHash": "sha256-E+DdXV2cFj77vU35cVNoEEE5YueE075HXiJLXwAxJ0k=",
|
||||
"owner": "nix-community",
|
||||
"repo": "srvos",
|
||||
"rev": "e26a814735f50034e35dff637efad2d502698d09",
|
||||
"rev": "a7cc81cd76c4c07bb7db01b731199ecd4be17305",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1220,21 +865,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -1243,32 +873,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730321837,
|
||||
"narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=",
|
||||
"lastModified": 1723402464,
|
||||
"narHash": "sha256-xjunKUFQs9D7u0TpVoXhrRYb4tbVkutRoFUHj0lEydE=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "746901bb8dba96d154b66492a29f5db0693dbfcc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730321837,
|
||||
"narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "746901bb8dba96d154b66492a29f5db0693dbfcc",
|
||||
"rev": "c9f97032be6816fa234f24803b8ae79dc7753a91",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1286,11 +895,11 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "packaging/nix",
|
||||
"lastModified": 1731556042,
|
||||
"narHash": "sha256-eUFmLbf06Dph//IbB9KsJio3dJNADt+EhcfNFXjiJjU=",
|
||||
"lastModified": 1723319758,
|
||||
"narHash": "sha256-4WYwxNzH/95Vj0IqR2xh4gyiSn8H9bGnBECFWy4vjIk=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "66a1088194bb13c2d86d2c0af316b280a7235640",
|
||||
"revCount": 839,
|
||||
"rev": "74656e9da4008f75f3b1d136dbaf1172bf6c232f",
|
||||
"revCount": 697,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix"
|
||||
|
|
54
flake.nix
54
flake.nix
|
@ -5,7 +5,6 @@
|
|||
nix-community-infra.url = "github:nix-community/infra";
|
||||
nixpkgs-kernel.url = "github:NixOS/nixpkgs/a58bc8ad779655e790115244571758e8de055e3d";
|
||||
nixpkgs.url = "github:chayleaf/nixpkgs/ci";
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
nix-index-database = {
|
||||
url = "github:nix-community/nix-index-database";
|
||||
|
@ -30,7 +29,7 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:chayleaf/home-manager/ci";
|
||||
url = "github:chayleaf/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-gaming = {
|
||||
|
@ -103,7 +102,7 @@
|
|||
# Private home-manager config for hostname and username
|
||||
getPrivUser = hostname: user: (getPriv hostname).${user} or { };
|
||||
# extended lib
|
||||
lib = inputs.nixpkgs.lib // import ./lib.nix { inherit (nixpkgs) lib; };
|
||||
lib = nixpkgs.lib // import ./lib.nix { inherit (nixpkgs) lib; };
|
||||
# can't use callPackage ./pkgs here, idk why; use import instead
|
||||
overlay' = args: self: super: import (if args.pluginsOverlay or false then ./pkgs/nix-plugins-overlay.nix else ./pkgs) ({
|
||||
pkgs = super;
|
||||
|
@ -115,8 +114,8 @@
|
|||
nix-plugins-overlay = overlay' { pluginsOverlay = true; };
|
||||
all-overlays = [ nix-plugins-overlay overlay ];
|
||||
# I override some settings down the line, but overlays always stay the same
|
||||
mkPkgs = config: import (config.flake or nixpkgs) (builtins.removeAttrs config ["flake"] // {
|
||||
overlays = config.overlays or ([ ] ++ all-overlays);
|
||||
mkPkgs = config: import nixpkgs (config // {
|
||||
overlays = config.overlays or [ ] ++ all-overlays;
|
||||
});
|
||||
# this is actual config, it gets processed below
|
||||
config = let
|
||||
|
@ -137,20 +136,6 @@
|
|||
in {
|
||||
router-emmc = mkBpiR3 "emmc" routerConfig;
|
||||
router-sd = mkBpiR3 "sd" routerConfig;
|
||||
ereader = {
|
||||
# TODO uncom
|
||||
flake = inputs.nixpkgs-kernel;
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
./system/devices/kobo-clara-hd-ereader.nix
|
||||
{
|
||||
nixpkgs.crossSystem.system = "armv7l-linux";
|
||||
# nixpkgs.localSystem.system = "aarch64-linux";
|
||||
}
|
||||
];
|
||||
home.user = [ ./home/hosts/ereader.nix ];
|
||||
home.common.enableNixosModule = true;
|
||||
};
|
||||
server = {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
|
@ -161,7 +146,6 @@
|
|||
nixmsi = rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./system/devices/msi-delta-15-workstation.nix ];
|
||||
home.common.modules = [ inputs.nixvim.homeManagerModules.default ];
|
||||
home.common.extraSpecialArgs = {
|
||||
notlua = inputs.notlua.lib.${system};
|
||||
};
|
||||
|
@ -170,7 +154,6 @@
|
|||
phone = rec {
|
||||
system = "aarch64-linux";
|
||||
modules = [ ./system/devices/oneplus-6-phone.nix ];
|
||||
home.common.modules = [ inputs.nixvim.homeManagerModules.default ];
|
||||
home.common.extraSpecialArgs = {
|
||||
notlua = inputs.notlua.lib.${system};
|
||||
};
|
||||
|
@ -186,7 +169,6 @@
|
|||
packages = lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"armv7l-linux"
|
||||
] (system: let self = overlay' { isOverlay = false; } (mkPkgs { inherit system; } // self) (import nixpkgs { inherit system; }); in self);
|
||||
nixosImages.router = let pkgs = mkPkgs { inherit (config.router-emmc) system; }; in {
|
||||
emmcImage = pkgs.callPackage ./system/hardware/bpi-r3/image.nix {
|
||||
|
@ -212,16 +194,13 @@
|
|||
|
||||
# this is the system config processing part
|
||||
nixosConfigurations = lib.flip builtins.mapAttrs config (hostname: args @ { modules, nixpkgs ? {}, home ? {}, ... }:
|
||||
(args.flake or base-inputs.nixpkgs).lib.nixosSystem {
|
||||
lib.nixosSystem {
|
||||
inherit (args) system;
|
||||
# allow modules to access nixpkgs directly, use customized lib,
|
||||
# and pass nixos-harware to let hardware modules import parts of nixos-hardware
|
||||
specialArgs = {
|
||||
inherit lib;
|
||||
inherit inputs lib;
|
||||
hardware = inputs.nixos-hardware.nixosModules;
|
||||
inputs = inputs // lib.optionalAttrs (args?flake) {
|
||||
nixpkgs = args.flake;
|
||||
};
|
||||
} // args.specialArgs or { };
|
||||
modules = [
|
||||
({ config, ... }: {
|
||||
|
@ -240,21 +219,16 @@
|
|||
++ lib.optionals (home != { } && home.common.enableNixosModule or false) [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{ home-manager = builtins.removeAttrs (home.common or { }) [ "nixpkgs" "nix" "enableNixosModule" ]; }
|
||||
{
|
||||
home-manager.extraSpecialArgs = {
|
||||
inputs = inputs // lib.optionalAttrs (args?flake) {
|
||||
nixpkgs = args.flake;
|
||||
};
|
||||
};
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
{ # set both to false to match behavior with standalone home-manager
|
||||
home-manager.useGlobalPkgs = false;
|
||||
home-manager.useUserPackages = false;
|
||||
home-manager.users = builtins.mapAttrs (username: modules: {
|
||||
imports = modules ++ [
|
||||
# { nixpkgs = home.common.nixpkgs or { };
|
||||
# nix = home.common.nix or { }; }
|
||||
# ({ config, pkgs, lib, ...}: {
|
||||
# nixpkgs.overlays = all-overlays;
|
||||
# nix.package = lib.mkDefault pkgs.nixForNixPlugins; })
|
||||
{ nixpkgs = home.common.nixpkgs or { };
|
||||
nix = home.common.nix or { }; }
|
||||
({ config, pkgs, lib, ...}: {
|
||||
nixpkgs.overlays = all-overlays;
|
||||
nix.package = lib.mkDefault pkgs.nixForNixPlugins; })
|
||||
(getPrivUser hostname username)
|
||||
];
|
||||
}) (builtins.removeAttrs home [ "common" ]); }
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
{ pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../modules/general.nix
|
||||
../modules/i3-sway.nix
|
||||
inputs.nur.nixosModules.nur
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
trusted-public-keys = [
|
||||
"binarycache.pavluk.org:Vk0ms/vSqoOV2JXeNVOroc8EfilgVxCCUtpCShGIKsQ="
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
];
|
||||
trusted-substituters = [
|
||||
"https://binarycache.pavluk.org"
|
||||
"https://cache.nixos.org"
|
||||
];
|
||||
};
|
||||
|
||||
phone.enable = true;
|
||||
minimal = true;
|
||||
home.stateVersion = "23.11";
|
||||
home.username = "user";
|
||||
home.homeDirectory = "/home/user";
|
||||
terminals = [ "foot" ];
|
||||
wayland.windowManager.sway.enable = true;
|
||||
# terminals = [ "kitty" ];
|
||||
# xsession.windowManager.i3.enable = true;
|
||||
|
||||
# services.kdeconnect.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
# TODO fix
|
||||
koreader
|
||||
(calibre.override {
|
||||
speechSupport = false;
|
||||
})
|
||||
wvkbd
|
||||
];
|
||||
}
|
|
@ -92,5 +92,4 @@
|
|||
rawMouse=yes
|
||||
escapeKey=KEY_RIGHTALT
|
||||
'';
|
||||
programs.mpv.config.hwdec = lib.mkForce "vdpau";
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
};
|
||||
|
||||
phone.enable = true;
|
||||
phone.suspend = false;
|
||||
home.stateVersion = "23.11";
|
||||
home.username = "user";
|
||||
home.homeDirectory = "/home/user";
|
||||
|
|
|
@ -46,10 +46,10 @@
|
|||
ublock-origin
|
||||
unpaywall
|
||||
vimium-c
|
||||
yomitan
|
||||
youtube-shorts-block
|
||||
]) ++ (with pkgs.firefoxAddons; [
|
||||
fastforwardteam
|
||||
rikaitan
|
||||
youtube-nonstop
|
||||
]);
|
||||
search.default = "search.pavluk.org";
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
enableSshSupport = true;
|
||||
maxCacheTtl = 72000;
|
||||
maxCacheTtlSsh = 72000;
|
||||
pinentryPackage = if config.minimal then pkgs.pinentry.tty else pkgs.pinentry.qt;
|
||||
pinentryPackage = pkgs.pinentry.tty;
|
||||
};
|
||||
home.shellAliases = {
|
||||
s = "sudo -A";
|
||||
|
@ -64,16 +64,15 @@
|
|||
});
|
||||
extraPackages = with pkgs; [
|
||||
# utils
|
||||
gnused mktemp fzf coreutils-full findutils xdg-utils whois curl
|
||||
file unzip gnutar man
|
||||
gnused mktemp fzf coreutils-full findutils xdg-utils gnupg whois curl
|
||||
file mediainfo unzip gnutar man rclone
|
||||
# for preview
|
||||
# exa - TODO: replace with eza wrapper?
|
||||
libarchive atool
|
||||
bat libarchive atool glow
|
||||
# for opening
|
||||
p7zip
|
||||
p7zip unrar-wrapper
|
||||
] ++ lib.optionals (!config.minimal) [
|
||||
gnupg odt2txt w3m sshfs trash-cli unrar-wrapper
|
||||
mediainfo rclone bat glow
|
||||
odt2txt w3m sshfs trash-cli
|
||||
];
|
||||
plugins = {
|
||||
src = pluginSrc;
|
||||
|
@ -118,7 +117,7 @@
|
|||
lfs.enable = true;
|
||||
};
|
||||
bat = {
|
||||
enable = !config.minimal;
|
||||
enable = true;
|
||||
};
|
||||
bottom = {
|
||||
enable = true;
|
||||
|
@ -315,8 +314,8 @@
|
|||
rclone sshfs fuse
|
||||
file jq python3Full killall
|
||||
comma nix-output-monitor
|
||||
unzip p7zip
|
||||
unzip p7zip unrar-wrapper
|
||||
] ++ lib.optionals (!config.minimal) [
|
||||
appimage-run unrar-wrapper
|
||||
appimage-run
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,27 +1,28 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./terminal.nix ];
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (!config.minimal) {
|
||||
xdg.configFile."alsoft.conf".text = ''
|
||||
[general]
|
||||
hrtf = true
|
||||
stereo-encoding = hrtf
|
||||
drivers = pipewire,pulseaudio,jack,alsa,oss,
|
||||
periods = 2
|
||||
hrtf-paths = ${pkgs.openal}/share/openal/hrtf
|
||||
|
||||
[decoder]
|
||||
hq-mode = true
|
||||
|
||||
[pipewire]
|
||||
rt-mix = true
|
||||
|
||||
[pulse]
|
||||
allow-moves = true
|
||||
'';
|
||||
imports = [ ./terminal.nix ];
|
||||
systemd.user.services.fcitx5-daemon = {
|
||||
Unit.After = "graphical-session-pre.target";
|
||||
Service = {
|
||||
Restart = "on-failure";
|
||||
RestartSec = 3;
|
||||
};
|
||||
};
|
||||
i18n.inputMethod = let fcitx5-qt = pkgs.libsForQt5.fcitx5-qt; in {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [ fcitx5-lua fcitx5-gtk fcitx5-mozc fcitx5-configtool fcitx5-qt ];
|
||||
};
|
||||
home.sessionVariables = {
|
||||
GTK_IM_MODULE = "fcitx";
|
||||
QT_IM_MODULE = "fcitx";
|
||||
XMODIFIERS = "@im=fcitx";
|
||||
SDL_IM_MODULE = "fcitx";
|
||||
XIM_SERVERS = "fcitx";
|
||||
INPUT_METHOD = "fcitx";
|
||||
SUDO_ASKPASS = pkgs.writeScript "sudo-askpass" ''
|
||||
#! ${pkgs.bash}/bin/bash
|
||||
${pkgs.libsecret}/bin/secret-tool lookup root password
|
||||
'';
|
||||
SDL_AUDIODRIVER = "pipewire,pulse,dsound";
|
||||
# SDL 3
|
||||
SDL_AUDIO_DRIVER = "pipewire,pulseaudio,dsound";
|
||||
|
@ -42,6 +43,26 @@ config = lib.mkMerge [
|
|||
ffmpeg ffmpegthumbnailer nsxiv imagemagick
|
||||
zathura /*libreoffice*/ fontpreview djvulibre poppler_utils
|
||||
] ++ lib.optionals (!config.programs.mpv.enable) [ mpv ];
|
||||
xdg.configFile."alsoft.conf".text = ''
|
||||
[general]
|
||||
hrtf = true
|
||||
stereo-encoding = hrtf
|
||||
drivers = pipewire,pulseaudio,jack,alsa,oss,
|
||||
periods = 2
|
||||
hrtf-paths = ${pkgs.openal}/share/openal/hrtf
|
||||
|
||||
[decoder]
|
||||
hq-mode = true
|
||||
|
||||
[pipewire]
|
||||
rt-mix = true
|
||||
|
||||
[pulse]
|
||||
allow-moves = true
|
||||
'';
|
||||
|
||||
xdg.userDirs.enable = true;
|
||||
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
defaultProfiles = [ "gpu-hq" ];
|
||||
|
@ -118,14 +139,6 @@ config = lib.mkMerge [
|
|||
|
||||
"1" = "add volume -1";
|
||||
"2" = "add volume 1";
|
||||
"3" = "add contrast -1";
|
||||
"4" = "add contrast 1";
|
||||
"5" = "add brightness -1";
|
||||
"6" = "add brightness 1";
|
||||
"7" = "add saturation -1";
|
||||
"8" = "add saturation 1";
|
||||
"9" = "add gamma -1";
|
||||
"0" = "add gamma 1";
|
||||
s = "cycle sub";
|
||||
v = "cycle video";
|
||||
a = "cycle audio";
|
||||
|
@ -149,7 +162,7 @@ config = lib.mkMerge [
|
|||
config = {
|
||||
osc = "no";
|
||||
hwdec = "vaapi";
|
||||
vo = "gpu,dmabuf-wayland,wlshm,vdpau,xv,x11,sdl,drm,";
|
||||
vo = "gpu-next,gpu,dmabuf-wayland,wlshm,vdpau,xv,x11,sdl,drm,";
|
||||
alang = "jpn,en,ru";
|
||||
slang = "jpn,en,ru";
|
||||
vlang = "jpn,en,ru";
|
||||
|
@ -188,69 +201,16 @@ config = lib.mkMerge [
|
|||
};
|
||||
};
|
||||
services.gammastep.enable = true;
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.startWhenNeeded = true;
|
||||
};
|
||||
services.mpdris2 = {
|
||||
enable = true;
|
||||
};
|
||||
programs.yt-dlp.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
qt5ct qgnomeplatform
|
||||
qbittorrent mumble
|
||||
keepassxc nheko nextcloud-client
|
||||
# cli tools
|
||||
imagemagick ffmpeg-full
|
||||
# might check out some day (tm)
|
||||
# nyxt qutebrowser
|
||||
|
||||
# for working with nix
|
||||
nix-init
|
||||
nvfetcher
|
||||
config.nur.repos.rycee.mozilla-addons-to-nix
|
||||
];
|
||||
})
|
||||
(lib.mkIf (!config.minimal) {
|
||||
systemd.user.services.fcitx5-daemon = {
|
||||
Unit.After = "graphical-session-pre.target";
|
||||
Service = {
|
||||
Restart = "on-failure";
|
||||
RestartSec = 3;
|
||||
};
|
||||
};
|
||||
i18n.inputMethod = let fcitx5-qt = pkgs.libsForQt5.fcitx5-qt; in {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [ fcitx5-lua fcitx5-gtk fcitx5-mozc fcitx5-configtool fcitx5-qt ];
|
||||
};
|
||||
home.sessionVariables = {
|
||||
GTK_IM_MODULE = "fcitx";
|
||||
QT_IM_MODULE = "fcitx";
|
||||
XMODIFIERS = "@im=fcitx";
|
||||
SDL_IM_MODULE = "fcitx";
|
||||
XIM_SERVERS = "fcitx";
|
||||
INPUT_METHOD = "fcitx";
|
||||
};
|
||||
})
|
||||
{
|
||||
home.sessionVariables = {
|
||||
SUDO_ASKPASS = pkgs.writeScript "sudo-askpass" ''
|
||||
#! ${pkgs.bash}/bin/bash
|
||||
${pkgs.libsecret}/bin/secret-tool lookup root password
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.userDirs.enable = true;
|
||||
fonts.fontconfig.enable = true;
|
||||
gtk = {
|
||||
enable = true;
|
||||
font.name = "Noto Sans";
|
||||
font.size = 10;
|
||||
iconTheme = lib.mkIf (!config.minimal) {
|
||||
iconTheme = {
|
||||
package = pkgs.papirus-icon-theme;
|
||||
name = "Papirus-Dark";
|
||||
};
|
||||
theme = lib.mkIf (!config.minimal) {
|
||||
theme = {
|
||||
package = pkgs.breeze-gtk;
|
||||
name = "Breeze-Dark";
|
||||
};
|
||||
|
@ -274,6 +234,13 @@ config = lib.mkMerge [
|
|||
enable = true;
|
||||
path = "${pkgs.fish}/bin/fish";
|
||||
};
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.startWhenNeeded = true;
|
||||
};
|
||||
services.mpdris2 = {
|
||||
enable = true;
|
||||
};
|
||||
systemd.user.services.kdeconnect = lib.mkIf config.services.kdeconnect.enable {
|
||||
Service = {
|
||||
Restart = lib.mkForce "always";
|
||||
|
@ -285,15 +252,27 @@ config = lib.mkMerge [
|
|||
home.pointerCursor.gtk.enable = true;
|
||||
home.pointerCursor.package = pkgs.vanilla-dmz;
|
||||
home.pointerCursor.name = "Vanilla-DMZ";
|
||||
programs.yt-dlp.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
# wayland
|
||||
grim slurp
|
||||
# gui compat stuff
|
||||
qt5ct qgnomeplatform
|
||||
# various programs i use
|
||||
keepassxc nheko qbittorrent mumble
|
||||
nextcloud-client kdeconnect
|
||||
# cli tools
|
||||
xdg-utils
|
||||
imagemagick ffmpeg-full xdg-utils
|
||||
# fonts
|
||||
noto-fonts noto-fonts-cjk-sans noto-fonts-cjk-serif
|
||||
noto-fonts-emoji noto-fonts-extra
|
||||
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
||||
]
|
||||
++ lib.optional config.services.kdeconnect.enable kdeconnect;
|
||||
}];
|
||||
# might check out some day (tm)
|
||||
# nyxt qutebrowser
|
||||
|
||||
# for working with nix
|
||||
nix-init
|
||||
nvfetcher
|
||||
config.nur.repos.rycee.mozilla-addons-to-nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
let
|
||||
modifier = if config.phone.enable then "Mod1" else "Mod4";
|
||||
rofiSway = config.programs.rofi.finalPackage;
|
||||
rofiI3 = if config.wayland.windowManager.sway.enable then pkgs.rofi.override { plugins = config.programs.rofi.plugins; } else pkgs.rofi;
|
||||
rofiI3 = pkgs.rofi.override { plugins = config.programs.rofi.plugins; };
|
||||
audioNext = pkgs.writeShellScript "playerctl-next" ''
|
||||
${pkgs.playerctl}/bin/playerctl next
|
||||
PLAYER=$(${pkgs.playerctl}/bin/playerctl -l | ${pkgs.coreutils}/bin/head -n 1)
|
||||
|
@ -34,7 +34,6 @@ audioPrev = pkgs.writeShellScript "playerctl-prev" ''
|
|||
${pkgs.playerctl}/bin/playerctl play
|
||||
fi
|
||||
'';
|
||||
# TODO: only unidle mako when unlocked
|
||||
swaylock =
|
||||
if config.phone.enable
|
||||
then "${pkgs.schlock}/bin/schlock -fp /secrets/schlock.pin"
|
||||
|
@ -45,25 +44,17 @@ swaylock-start = pkgs.writeShellScript "swaylock-start" ''
|
|||
dpms-off = pkgs.writeShellScript "sway-dpms-off" ''
|
||||
${config.wayland.windowManager.sway.package}/bin/swaymsg output "*" power off
|
||||
${config.wayland.windowManager.sway.package}/bin/swaymsg input type:touch events disabled
|
||||
${config.services.mako.package}/bin/makoctl mode -a idle
|
||||
'';
|
||||
dpms-on = pkgs.writeShellScript "sway-dpms-on" ''
|
||||
${config.wayland.windowManager.sway.package}/bin/swaymsg output "*" power on
|
||||
${config.wayland.windowManager.sway.package}/bin/swaymsg input type:touch events enabled
|
||||
${config.services.mako.package}/bin/makoctl mode -r idle
|
||||
'';
|
||||
lock-script = pkgs.writeShellScript "lock-start" ''
|
||||
${swaylock-start}
|
||||
${lib.optionalString (config.phone.enable && config.phone.suspend)
|
||||
# suspend if nothing is playing and no ssh sessions are active
|
||||
${lib.optionalString config.phone.enable
|
||||
# suspend if nothing is playing
|
||||
''
|
||||
if ${pkgs.playerctl}/bin/playerctl -a status | ${pkgs.gnugrep}/bin/grep Playing >/dev/null; then
|
||||
exit
|
||||
fi
|
||||
if ${pkgs.coreutils}/bin/who -u | ${pkgs.gnugrep}/bin/grep "pts.*(" >/dev/null; then
|
||||
exit
|
||||
fi
|
||||
/run/current-system/sw/bin/systemctl suspend
|
||||
${pkgs.playerctl}/bin/playerctl -a status | ${pkgs.gnugrep}/bin/grep Playing >/dev/null || /run/current-system/sw/bin/systemctl suspend
|
||||
''}
|
||||
'';
|
||||
barConfig = {
|
||||
|
@ -118,29 +109,25 @@ commonConfig = {
|
|||
${lib.optionalString config.phone.enable ''
|
||||
${pkgs.procps}/bin/pkill -x wvkbd-mobintl
|
||||
${pkgs.wvkbd}/bin/wvkbd-mobintl --hidden -l full,special,cyrillic,emoji&
|
||||
${lib.optionalString (!config.minimal) ''
|
||||
${pkgs.procps}/bin/pkill -x squeekboard
|
||||
${pkgs.squeekboard}/bin/squeekboard&
|
||||
''}
|
||||
${pkgs.procps}/bin/pkill -x squeekboard
|
||||
${pkgs.squeekboard}/bin/squeekboard&
|
||||
/run/current-system/sw/bin/busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true
|
||||
''}
|
||||
${pkgs.procps}/bin/pkill -x home-daemon
|
||||
${pkgs.home-daemon}/bin/home-daemon system76-scheduler ${lib.optionalString (!config.phone.enable) "empty-sound"}&
|
||||
${lib.optionalString (!config.minimal) ''
|
||||
${pkgs.procps}/bin/pkill -x keepassxc
|
||||
${pkgs.zenity}/bin/zenity --password | (${pkgs.keepassxc}/bin/keepassxc --pw-stdin ~/var/local.kdbx &)
|
||||
# sleep to give keepassxc time to take the input
|
||||
sleep 1
|
||||
# nextcloud and nheko need secret service access
|
||||
${pkgs.procps}/bin/pkill -x nextcloud
|
||||
${pkgs.nextcloud-client}/bin/nextcloud --background&
|
||||
${pkgs.procps}/bin/pkill -x nheko
|
||||
${pkgs.nheko}/bin/nheko&
|
||||
${pkgs.procps}/bin/pkill -x telegram-desktop
|
||||
${pkgs.tdesktop}/bin/telegram-desktop -startintray&
|
||||
# and final sleep just in case
|
||||
sleep 1
|
||||
''}
|
||||
${pkgs.procps}/bin/pkill -x keepassxc
|
||||
${pkgs.zenity}/bin/zenity --password | (${pkgs.keepassxc}/bin/keepassxc --pw-stdin ~/var/local.kdbx &)
|
||||
# sleep to give keepassxc time to take the input
|
||||
sleep 1
|
||||
# nextcloud and nheko need secret service access
|
||||
${pkgs.procps}/bin/pkill -x nextcloud
|
||||
${pkgs.nextcloud-client}/bin/nextcloud --background&
|
||||
${pkgs.procps}/bin/pkill -x nheko
|
||||
${pkgs.nheko}/bin/nheko&
|
||||
${pkgs.procps}/bin/pkill -x telegram-desktop
|
||||
${pkgs.tdesktop}/bin/telegram-desktop -startintray&
|
||||
# and final sleep just in case
|
||||
sleep 1
|
||||
''); }
|
||||
];
|
||||
colors = {
|
||||
|
@ -200,7 +187,7 @@ genKeybindings = (default_options: kb:
|
|||
kb // {
|
||||
"${modifier}+Shift+g" = "floating toggle";
|
||||
"${modifier}+g" = "focus mode_toggle";
|
||||
XF86AudioMicMute = lib.mkIf (!config.minimal) "exec ${pkgs.pamixer}/bin/pamixer --default-source --toggle-mute";
|
||||
XF86AudioMicMute = "exec ${pkgs.pamixer}/bin/pamixer --default-source --toggle-mute";
|
||||
XF86MonBrightnessDown = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-";
|
||||
XF86MonBrightnessUp = "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%+";
|
||||
}
|
||||
|
@ -215,11 +202,13 @@ genKeybindings = (default_options: kb:
|
|||
.imports)
|
||||
.options.keybindings.default)
|
||||
);
|
||||
in {
|
||||
# TODO merge with colors in gui.nix and terminal.nix
|
||||
imports = [ ./options.nix ./gui.nix ./waybar.nix ];
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (!config.minimal) {
|
||||
in
|
||||
{
|
||||
# TODO merge with colors in gui.nix and terminal.nix
|
||||
imports = [ ./options.nix ./gui.nix ./waybar.nix ];
|
||||
home.sessionVariables = {
|
||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||
};
|
||||
xdg.configFile."xdg-desktop-portal-wlr/config".source = (pkgs.formats.ini {}).generate "xdg-desktop-portal-wlr.ini" {
|
||||
screencast = {
|
||||
max_fps = 60;
|
||||
|
@ -232,42 +221,28 @@ config = lib.mkMerge [
|
|||
systemd.user.services = lib.mkIf config.wayland.windowManager.sway.enable {
|
||||
gammastep.Unit.ConditionEnvironment = "WAYLAND_DISPLAY";
|
||||
};
|
||||
})
|
||||
{
|
||||
home.sessionVariables = {
|
||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||
};
|
||||
services.mako = {
|
||||
enable = lib.mkDefault config.wayland.windowManager.sway.enable;
|
||||
package = pkgs.mako.overrideAttrs (old: {
|
||||
patches = old.patches or []
|
||||
++ (lib.mapAttrsToList (k: v: ../../pkgs/mako/${k}) (builtins.readDir ../../pkgs/mako));
|
||||
});
|
||||
defaultTimeout = 10000;
|
||||
# ms
|
||||
defaultTimeout = 7500;
|
||||
font = "Noto Sans Mono 12";
|
||||
extraConfig = ''
|
||||
max-history=50
|
||||
[mode=idle]
|
||||
freeze=1
|
||||
'';
|
||||
};
|
||||
xsession.windowManager.i3 = {
|
||||
config = let i3Config = {
|
||||
bars = [
|
||||
(barConfig // {
|
||||
mode = "dock";
|
||||
statusCommand = "${pkgs.i3status}/bin/i3status";
|
||||
})
|
||||
];
|
||||
menu = "${rofiI3}/bin/rofi -show drun";
|
||||
keybindings = genKeybindings options.xsession.windowManager.i3 {
|
||||
"${modifier}+c" = "exec ${rofiI3}/bin/rofi -show calc -no-show-match -no-sort -no-persist-history";
|
||||
XF86AudioRaiseVolume = lib.mkIf (!config.minimal) "exec ${pkgs.pamixer}/bin/pamixer --increase 5";
|
||||
XF86AudioLowerVolume = lib.mkIf (!config.minimal) "exec ${pkgs.pamixer}/bin/pamixer --decrease 5";
|
||||
XF86AudioMute = lib.mkIf (!config.minimal) "exec ${pkgs.pamixer}/bin/pamixer --toggle-mute";
|
||||
XF86AudioPlay = lib.mkIf (!config.minimal) "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
XF86AudioNext = lib.mkIf (!config.minimal) "exec ${audioNext}";
|
||||
XF86AudioPrev = lib.mkIf (!config.minimal) "exec ${audioPrev}";
|
||||
XF86AudioRaiseVolume = "exec ${pkgs.pamixer}/bin/pamixer --increase 5";
|
||||
XF86AudioLowerVolume = "exec ${pkgs.pamixer}/bin/pamixer --decrease 5";
|
||||
XF86AudioMute = "exec ${pkgs.pamixer}/bin/pamixer --toggle-mute";
|
||||
XF86AudioPlay = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
XF86AudioNext = "exec ${audioNext}";
|
||||
XF86AudioPrev = "exec ${audioPrev}";
|
||||
};
|
||||
terminal = config.terminalBinX;
|
||||
}; in commonConfig // i3Config;
|
||||
|
@ -298,9 +273,9 @@ config = lib.mkMerge [
|
|||
sha256 = "sha256-XgkysduhHbmprE334yeL65txpK0HNXeCmgCZMxpwsgU=";
|
||||
})*/
|
||||
] ++ lib.optionals config.phone.enable
|
||||
(lib.mapAttrsToList
|
||||
(k: v: ../../pkgs/sway/${k})
|
||||
(lib.filterAttrs (k: v: lib.hasInfix "-mobile-" k) (builtins.readDir ../../pkgs/sway)));
|
||||
(map
|
||||
(x: ../../pkgs/sway/${x})
|
||||
(builtins.filter (lib.hasInfix "-mobile-") (builtins.attrNames (builtins.readDir ../../pkgs/sway))));
|
||||
});
|
||||
inherit (cfg) extraSessionCommands extraOptions;
|
||||
withBaseWrapper = cfg.wrapperFeatures.base;
|
||||
|
@ -405,17 +380,17 @@ config = lib.mkMerge [
|
|||
# and if stoptalking isn't called for some reason, calling it one time stops being enough
|
||||
"exec ${pkgs.mumble}/bin/mumble rpc stoptalking && ${pkgs.mumble}/bin/mumble rpc stoptalking")
|
||||
//*/ {
|
||||
"--inhibited --no-repeat --allow-other Scroll_Lock" = lib.mkIf (!config.minimal) "exec ${pkgs.mumble}/bin/mumble rpc starttalking";
|
||||
"--inhibited --no-repeat --allow-other --release Scroll_Lock" = lib.mkIf (!config.minimal) "exec ${pkgs.mumble}/bin/mumble rpc stoptalking";
|
||||
"--inhibited --no-repeat --allow-other Scroll_Lock" = "exec ${pkgs.mumble}/bin/mumble rpc starttalking";
|
||||
"--inhibited --no-repeat --allow-other --release Scroll_Lock" = "exec ${pkgs.mumble}/bin/mumble rpc stoptalking";
|
||||
"${modifier}+c" = "exec ${rofiSway}/bin/rofi -show calc -no-show-match -no-sort -no-persist-history";
|
||||
"${modifier}+Print" = "exec ${grimshot}/bin/grimshot copy area";
|
||||
"${modifier}+${if modifier == "Mod1" then "Mod4" else "Mod1"}+Print" = "exec ${grimshot}/bin/grimshot copy window";
|
||||
"--locked XF86AudioRaiseVolume" = lib.mkIf (!config.minimal) "exec ${pkgs.pamixer}/bin/pamixer --increase 5";
|
||||
"--locked XF86AudioLowerVolume" = lib.mkIf (!config.minimal) "exec ${pkgs.pamixer}/bin/pamixer --decrease 5";
|
||||
"--locked XF86AudioMute" = lib.mkIf (!config.minimal) "exec ${pkgs.pamixer}/bin/pamixer --toggle-mute";
|
||||
"--locked --inhibited XF86AudioPlay" = lib.mkIf (!config.minimal) "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"--locked --inhibited XF86AudioNext" = lib.mkIf (!config.minimal) "exec ${audioNext}";
|
||||
"--locked --inhibited XF86AudioPrev" = lib.mkIf (!config.minimal) "exec ${audioPrev}";
|
||||
"--locked XF86AudioRaiseVolume" = "exec ${pkgs.pamixer}/bin/pamixer --increase 5";
|
||||
"--locked XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer --decrease 5";
|
||||
"--locked XF86AudioMute" = "exec ${pkgs.pamixer}/bin/pamixer --toggle-mute";
|
||||
"--locked --inhibited XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"--locked --inhibited XF86AudioNext" = "exec ${audioNext}";
|
||||
"--locked --inhibited XF86AudioPrev" = "exec ${audioPrev}";
|
||||
"--locked --inhibited --release XF86PowerOff" = lib.mkIf config.phone.enable "exec ${pkgs.writeShellScript "power-key" ''
|
||||
if ${config.wayland.windowManager.sway.package}/bin/swaymsg -rt get_outputs | ${pkgs.jq}/bin/jq ".[].power" | ${pkgs.gnugrep}/bin/grep true; then
|
||||
${dpms-off}
|
||||
|
@ -425,14 +400,10 @@ config = lib.mkMerge [
|
|||
''}";
|
||||
});
|
||||
startup = [
|
||||
/*{
|
||||
{
|
||||
always = true;
|
||||
command = pkgs.writeShellScript "dbus-upd.sh" ''
|
||||
${lib.getBin pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE
|
||||
/run/current-system/sw/bin/systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
|
||||
/run/current-system/sw/bin/systemctl --user reset-failed";
|
||||
'';
|
||||
}*/
|
||||
command = "${lib.getBin pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE NIXOS_OZONE_WL XCURSOR_THEME XCURSOR_SIZE; /run/current-system/sw/bin/systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP; /run/current-system/sw/bin/systemctl --user reset-failed && /run/current-system/sw/bin/systemctl --user start sway-session.target && ${pkgs.sway}/bin/swaymsg -mt subscribe '[]' || true && /run/current-system/sw/bin/systemctl --user stop sway-session.target";
|
||||
}
|
||||
{
|
||||
command = "${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store --no-persist";
|
||||
}
|
||||
|
@ -472,16 +443,16 @@ config = lib.mkMerge [
|
|||
'';
|
||||
};
|
||||
services.swayidle = {
|
||||
enable = config.wayland.windowManager.sway.enable;
|
||||
enable = config.wayland.windowManager.sway.enable && !config.phone.enable;
|
||||
events = [
|
||||
{ event = "before-sleep"; command = toString swaylock-start; }
|
||||
# after-resume, lock, unlock
|
||||
];
|
||||
timeouts = [
|
||||
{ timeout = if config.phone.enable && !config.minimal then 30 else 300;
|
||||
{ timeout = if config.phone.enable then 30 else 300;
|
||||
command = toString dpms-off;
|
||||
resumeCommand = toString dpms-on; }
|
||||
{ timeout = if config.phone.enable && !config.minimal then 60 else 600;
|
||||
{ timeout = if config.phone.enable then 60 else 600;
|
||||
command = toString lock-script; }
|
||||
];
|
||||
};
|
||||
|
@ -525,16 +496,16 @@ config = lib.mkMerge [
|
|||
text-wrong-color = text-color;
|
||||
ring-wrong-color = "#e64e4e"; # deep-ish red
|
||||
};
|
||||
home.packages = lib.mkIf config.wayland.windowManager.sway.enable (with pkgs; [ wl-clipboard ]);
|
||||
home.packages = lib.mkIf config.wayland.windowManager.sway.enable (with pkgs; [
|
||||
wl-clipboard
|
||||
xdg-desktop-portal
|
||||
# xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
]);
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = "Noto Sans Mono 16";
|
||||
package = lib.mkIf config.wayland.windowManager.sway.enable (pkgs.rofi-wayland.override {
|
||||
rofi-unwrapped = pkgs.rofi-wayland-unwrapped.overrideAttrs (old: {
|
||||
patches = old.patches or []
|
||||
++ (lib.mapAttrsToList (k: v: ../../pkgs/rofi-wayland/${k}) (builtins.readDir ../../pkgs/rofi-wayland));
|
||||
});
|
||||
});
|
||||
package = lib.mkIf config.wayland.windowManager.sway.enable pkgs.rofi-wayland;
|
||||
plugins = with pkgs; [
|
||||
rofi-calc
|
||||
];
|
||||
|
@ -593,5 +564,4 @@ config = lib.mkMerge [
|
|||
steal-focus = true;
|
||||
};
|
||||
};
|
||||
}];
|
||||
}
|
||||
|
|
|
@ -13,11 +13,8 @@
|
|||
*/
|
||||
|
||||
# welcome to my cursed DSL
|
||||
programs.nixvim = let
|
||||
notlua-nvim = notlua.neovim {
|
||||
plugins = config.programs.nixvim.extraPlugins;
|
||||
inherit (config.programs.nixvim) extraLuaPackages;
|
||||
};
|
||||
programs.neovim = let
|
||||
notlua-nvim = notlua.neovim { inherit (config.programs.neovim) plugins extraLuaPackages; };
|
||||
inherit (notlua.keywords)
|
||||
AND APPLY CALL DEFUN ELSE EQ GE IDX IF
|
||||
LE LET LETREC MERGE OR PROP RETURN SET;
|
||||
|
@ -71,13 +68,102 @@
|
|||
|
||||
which-key = REQ "which-key";
|
||||
luasnip = REQ "luasnip";
|
||||
in {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
extraPackages = with pkgs; [
|
||||
rust-analyzer
|
||||
nodePackages_latest.bash-language-server shellcheck
|
||||
nodePackages_latest.typescript-language-server
|
||||
# nodePackages_latest.svelte-language-server
|
||||
clang-tools_latest
|
||||
nodePackages_latest.vscode-langservers-extracted
|
||||
nil
|
||||
marksman
|
||||
taplo
|
||||
ripgrep
|
||||
(python3.withPackages (p: with p; [
|
||||
python-lsp-server
|
||||
python-lsp-black
|
||||
pylsp-mypy
|
||||
python-lsp-server.optional-dependencies.pyflakes
|
||||
python-lsp-server.optional-dependencies.mccabe
|
||||
python-lsp-server.optional-dependencies.pycodestyle
|
||||
]))
|
||||
];
|
||||
# extraPython3Packages = pyPkgs: with pyPkgs; [
|
||||
# ];
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
|
||||
plugins = let ps = pkgs.vimPlugins; in [
|
||||
{ plugin = ps.vim-svelte; }
|
||||
extraLuaConfig = compile "main" [
|
||||
(kmSetNs {
|
||||
"<C-X>" = {
|
||||
rhs = DEFUN (vim.fn.system [ "chmod" "+x" (vim.fn.expand "%") ]);
|
||||
desc = "chmod +x %";
|
||||
};
|
||||
})
|
||||
(SET (vimg "vimsyn_embed") "l")
|
||||
(LET (vim.api.nvim_create_augroup "nvimrc" { clear = true; }) (group:
|
||||
lib.mapAttrsToList (k: v: vim.api.nvim_create_autocmd k { inherit group; callback = v; }) {
|
||||
BufReadPre = DEFUN (SET vim.o.foldmethod "syntax");
|
||||
BufEnter = { buf, ... }:
|
||||
LET (vim.filetype.match { inherit buf; }) (filetype: [
|
||||
(IF (APPLY OR (map (EQ filetype) [ "gitcommit" "markdown" "mail" ])) (
|
||||
LET vim.o.colorcolumn (old_colorcolumn: [
|
||||
(SET vim.o.colorcolumn "73")
|
||||
(vim.api.nvim_create_autocmd "BufLeave" {
|
||||
buffer = buf;
|
||||
callback = DEFUN [
|
||||
(SET vim.o.colorcolumn old_colorcolumn)
|
||||
# return true = delete autocommand
|
||||
(RETURN true)
|
||||
];
|
||||
})
|
||||
])
|
||||
))
|
||||
(IF (APPLY OR (map (EQ filetype) [ "markdown" "mail" ])) (
|
||||
(SET (IDX vim.bo buf).textwidth 72)
|
||||
))
|
||||
]);
|
||||
BufWinEnter = { buf, ... }:
|
||||
LET (vim.filetype.match { inherit buf; }) (filetype: [
|
||||
(CALL (PROP vim.cmd "folddoc") "foldopen!")
|
||||
(IF (EQ filetype "gitcommit") (
|
||||
vim.cmd {
|
||||
cmd = "normal"; bang = true;
|
||||
args = [ "gg" ];
|
||||
}
|
||||
) ELSE (LET
|
||||
(IDX (vim.api.nvim_buf_get_mark buf "\"") 1)
|
||||
(vim.api.nvim_buf_line_count buf)
|
||||
(pos: cnt:
|
||||
IF (AND (GE pos 1) (LE pos cnt))
|
||||
(vim.cmd {
|
||||
cmd = "normal"; bang = true;
|
||||
args = [ "g`\"" ];
|
||||
})
|
||||
/*ELIF*/ (GE pos 1)
|
||||
(vim.cmd {
|
||||
cmd = "normal"; bang = true;
|
||||
args = [ "g$" ];
|
||||
})
|
||||
ELSE
|
||||
(vim.cmd {
|
||||
cmd = "normal"; bang = true;
|
||||
args = [ "gg" ];
|
||||
})
|
||||
)))
|
||||
]);
|
||||
}
|
||||
))
|
||||
];
|
||||
plugins = let ps = pkgs.vimPlugins; in map (x: if x?config && x?plugin then { type = "lua"; } // x else x) [
|
||||
ps.vim-svelte
|
||||
# vim-nix isn't necessary for syntax highlighting, but it improves overall editing experience
|
||||
{ plugin = ps.vim-nix; }
|
||||
# the latest version of vscode-nvim has breaking changes and i'm too lazy to migrate
|
||||
# FIXME: migrate
|
||||
ps.vim-nix
|
||||
{ plugin = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "vscode-nvim";
|
||||
version = "2023-02-10";
|
||||
|
@ -88,7 +174,7 @@
|
|||
sha256 = "sha256-X2IgIjO5NNq7vJdl09hBY1TFqHlsfF1xfllKr4osILI=";
|
||||
};
|
||||
};
|
||||
config = [
|
||||
config = compile "vscode_nvim" [
|
||||
((REQ "vscode").setup {
|
||||
transparent = true;
|
||||
color_overrides = {
|
||||
|
@ -111,12 +197,14 @@
|
|||
bg = "NONE";
|
||||
})
|
||||
]; }
|
||||
{ settings.plugins.web-devicons.enable = true; }
|
||||
{ settings.plugins.nvim-tree.enable = true;
|
||||
settings.globalOpts.termguicolors = true;
|
||||
settings.globals.loaded_netrw = 1;
|
||||
settings.globals.loaded_netrwPlugin = 1;
|
||||
config = (LET (REQ "nvim-tree") (REQ "nvim-tree.api") (nvim-tree: nvim-tree-api: [
|
||||
{ plugin = ps.nvim-web-devicons;
|
||||
config = compile "nvim_web_devicons" ((REQ "nvim-web-devicons").setup { }); }
|
||||
{ plugin = ps.nvim-tree-lua;
|
||||
config = compile "nvim_tree_lua" (LET (REQ "nvim-tree") (REQ "nvim-tree.api") (nvim-tree: nvim-tree-api: [
|
||||
(SET (vimg "loaded_netrw") 1)
|
||||
(SET (vimg "loaded_netrwPlugin") 1)
|
||||
(SET vim.o.termguicolors true)
|
||||
(nvim-tree.setup { }) # :help nvim-tree-setup
|
||||
(kmSetNs {
|
||||
"<C-N>" = {
|
||||
rhs = nvim-tree-api.tree.toggle;
|
||||
|
@ -124,10 +212,9 @@
|
|||
};
|
||||
})
|
||||
])); }
|
||||
{ settings.plugins.sleuth.enable = true; }
|
||||
{ settings.plugins.luasnip.enable = true; }
|
||||
ps.vim-sleuth
|
||||
ps.luasnip
|
||||
{ plugin = ps.nvim-cmp;
|
||||
settings.plugins.cmp.enable = false;
|
||||
config = let
|
||||
border = (name: [
|
||||
[ "╭" name ]
|
||||
|
@ -139,7 +226,7 @@
|
|||
[ "╰" name ]
|
||||
[ "│" name ]
|
||||
]);
|
||||
in (LET (REQ "cmp") (REQ "lspkind") (cmp: lspkind:
|
||||
in compile "nvim_cmp" (LET (REQ "cmp") (REQ "lspkind") (cmp: lspkind:
|
||||
# call is required because cmp.setup is a table
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
|
@ -198,16 +285,14 @@
|
|||
sources = cmp.config.sources [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "luasnip"; }
|
||||
{ name = "neorg"; }
|
||||
];
|
||||
}
|
||||
)); }
|
||||
{ settings.plugins.lspkind.enable = true; }
|
||||
{ settings.plugins.cmp_luasnip.enable = true; }
|
||||
{ settings.plugins.cmp-nvim-lsp.enable = true; }
|
||||
ps.lspkind-nvim
|
||||
ps.cmp_luasnip
|
||||
ps.cmp-nvim-lsp
|
||||
{ plugin = ps.nvim-autopairs;
|
||||
settings.plugins.nvim-autopairs.enable = false;
|
||||
config = (LET
|
||||
config = compile "nvim_autopairs" (LET
|
||||
(REQ "cmp") (REQ "nvim-autopairs.completion.cmp") (REQ "nvim-autopairs")
|
||||
(cmp: cmp-autopairs: nvim-autopairs:
|
||||
[
|
||||
|
@ -216,9 +301,9 @@
|
|||
})
|
||||
(cmp.event.on cmp.event "confirm_done" (cmp-autopairs.on_confirm_done { }))
|
||||
])); }
|
||||
{ settings.plugins.comment.enable = true;
|
||||
config = [
|
||||
# ((REQ "Comment").setup { })
|
||||
{ plugin = ps.comment-nvim;
|
||||
config = compile "comment_nvim" [
|
||||
((REQ "Comment").setup { })
|
||||
(kmSetNs {
|
||||
"<space>/" = {
|
||||
# metatables......
|
||||
|
@ -234,8 +319,7 @@
|
|||
})
|
||||
]; }
|
||||
{ plugin = ps.nvim-lspconfig;
|
||||
settings.plugins.lsp.enable = false;
|
||||
config = (
|
||||
config = compile "nvim_lspconfig" (
|
||||
let lsp = name: builtins.seq
|
||||
# ensure an lsp exists (otherwise lspconfig will still create an empty config for some reason)
|
||||
(REQ "lspconfig.server_configurations.${name}")
|
||||
|
@ -353,9 +437,9 @@
|
|||
clangd = { };
|
||||
# https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md
|
||||
pylsp = {
|
||||
settings.pylsp = {
|
||||
plugins.pylsp_mypy.enabled = true;
|
||||
plugins.black.enabled = true;
|
||||
settings = {
|
||||
pylsp.plugins.pylsp_mypy.enabled = true;
|
||||
pylsp.plugins.black.enabled = true;
|
||||
};
|
||||
};
|
||||
svelte = { };
|
||||
|
@ -363,11 +447,7 @@
|
|||
cssls = { };
|
||||
tsserver = { };
|
||||
jsonls = { };
|
||||
nil_ls = {
|
||||
settings.nil = {
|
||||
formatting.command = ["nixfmt"];
|
||||
};
|
||||
};
|
||||
nil_ls = { };
|
||||
taplo = { };
|
||||
marksman = { };
|
||||
rust_analyzer = {
|
||||
|
@ -378,163 +458,12 @@
|
|||
]) # END
|
||||
)) # END
|
||||
]); }
|
||||
{ settings.plugins.which-key.enable = true;
|
||||
settings.globalOpts.timeout = true;
|
||||
settings.globalOpts.timeoutlen = 500; }
|
||||
{ settings.plugins.treesitter = {
|
||||
enable = true;
|
||||
grammarPackages = with pkgs.tree-sitter-grammars; [
|
||||
tree-sitter-norg
|
||||
tree-sitter-norg-meta
|
||||
];
|
||||
settings.highlight.enable = true;
|
||||
}; }
|
||||
{ settings.plugins.image = {
|
||||
enable = true;
|
||||
backend = "kitty";
|
||||
integrations = {
|
||||
markdown = {
|
||||
enabled = true;
|
||||
downloadRemoteImages = false;
|
||||
};
|
||||
neorg = {
|
||||
enabled = true;
|
||||
downloadRemoteImages = true;
|
||||
};
|
||||
};
|
||||
}; }
|
||||
{ settings.plugins.telescope.enable = true; }
|
||||
{ plugin = ps.neorg;
|
||||
# TODO: remove when bumping inputs https://github.com/nix-community/nixvim/issues/1395
|
||||
settings.extraLuaPackages = (x: with x; [
|
||||
lua-utils-nvim
|
||||
pathlib-nvim
|
||||
nvim-nio
|
||||
]);
|
||||
config = (REQ "neorg").setup {
|
||||
load = {
|
||||
"core.defaults" = { };
|
||||
"core.completion".config = {
|
||||
engine = "nvim-cmp";
|
||||
};
|
||||
"core.concealer" = { };
|
||||
"core.dirman".config = {
|
||||
workspaces.ws = "~/notes";
|
||||
default_workspace = "ws";
|
||||
};
|
||||
"core.esupports.metagen".config = {
|
||||
author = "chayleaf";
|
||||
timezone = "utc";
|
||||
type = "empty";
|
||||
};
|
||||
"core.integrations.nvim-cmp" = { };
|
||||
"core.integrations.image" = { };
|
||||
"core.integrations.treesitter".config = {
|
||||
# install_parsers = false;
|
||||
};
|
||||
"core.journal".config = {
|
||||
workspace = "ws";
|
||||
};
|
||||
"core.keybinds" = { };
|
||||
"core.latex.renderer" = { };
|
||||
};
|
||||
}; }
|
||||
{ plugin = ps.neorg-telescope; }
|
||||
{ plugin = ps.which-key-nvim;
|
||||
config = compile "which_key_nvim" [
|
||||
(SET vim.o.timeout true)
|
||||
(SET vim.o.timeoutlen 500)
|
||||
(which-key.setup { })
|
||||
]; }
|
||||
];
|
||||
in lib.mkMerge ((builtins.concatLists (map (x: lib.toList (x.settings or [ ])) plugins)) ++ lib.toList {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
extraPackages = with pkgs; [
|
||||
rust-analyzer
|
||||
nodePackages_latest.bash-language-server shellcheck
|
||||
nodePackages_latest.typescript-language-server
|
||||
# nodePackages_latest.svelte-language-server
|
||||
clang-tools_latest
|
||||
nodePackages_latest.vscode-langservers-extracted
|
||||
nil
|
||||
marksman
|
||||
nixfmt-rfc-style
|
||||
taplo
|
||||
ripgrep
|
||||
(python3.withPackages (p: with p; [
|
||||
python-lsp-server
|
||||
python-lsp-black
|
||||
pylsp-mypy
|
||||
python-lsp-server.optional-dependencies.pyflakes
|
||||
python-lsp-server.optional-dependencies.mccabe
|
||||
python-lsp-server.optional-dependencies.pycodestyle
|
||||
]))
|
||||
];
|
||||
# extraPython3Packages = pyPkgs: with pyPkgs; [
|
||||
# ];
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
|
||||
extraConfigLua = compile "main" (
|
||||
builtins.concatLists (map (x: lib.toList (x.config or [ ])) plugins) ++ [
|
||||
(kmSetNs {
|
||||
"<C-X>" = {
|
||||
rhs = DEFUN (vim.fn.system [ "chmod" "+x" (vim.fn.expand "%") ]);
|
||||
desc = "chmod +x %";
|
||||
};
|
||||
})
|
||||
(SET (vimg "vimsyn_embed") "l")
|
||||
(LET (vim.api.nvim_create_augroup "nvimrc" { clear = true; }) (group:
|
||||
lib.mapAttrsToList (k: v: vim.api.nvim_create_autocmd k { inherit group; callback = v; }) {
|
||||
BufReadPre = DEFUN (SET vim.o.foldmethod "syntax");
|
||||
BufEnter = { buf, ... }:
|
||||
LET (vim.filetype.match { inherit buf; }) (filetype: [
|
||||
(IF (APPLY OR (map (EQ filetype) [ "gitcommit" "markdown" "mail" ])) (
|
||||
LET vim.o.colorcolumn (old_colorcolumn: [
|
||||
(SET vim.o.colorcolumn "73")
|
||||
(vim.api.nvim_create_autocmd "BufLeave" {
|
||||
buffer = buf;
|
||||
callback = DEFUN [
|
||||
(SET vim.o.colorcolumn old_colorcolumn)
|
||||
# return true = delete autocommand
|
||||
(RETURN true)
|
||||
];
|
||||
})
|
||||
])
|
||||
))
|
||||
(IF (APPLY OR (map (EQ filetype) [ "markdown" "mail" ])) (
|
||||
(SET (IDX vim.bo buf).textwidth 72)
|
||||
))
|
||||
]);
|
||||
BufWinEnter = { buf, ... }:
|
||||
LET (vim.filetype.match { inherit buf; }) (filetype: [
|
||||
(CALL (PROP vim.cmd "folddoc") "foldopen!")
|
||||
(IF (EQ filetype "gitcommit") (
|
||||
vim.cmd {
|
||||
cmd = "normal"; bang = true;
|
||||
args = [ "gg" ];
|
||||
}
|
||||
) ELSE (LET
|
||||
(IDX (vim.api.nvim_buf_get_mark buf "\"") 1)
|
||||
(vim.api.nvim_buf_line_count buf)
|
||||
(pos: cnt:
|
||||
IF (AND (GE pos 1) (LE pos cnt))
|
||||
(vim.cmd {
|
||||
cmd = "normal"; bang = true;
|
||||
args = [ "g`\"" ];
|
||||
})
|
||||
/*ELIF*/ (GE pos 1)
|
||||
(vim.cmd {
|
||||
cmd = "normal"; bang = true;
|
||||
args = [ "g$" ];
|
||||
})
|
||||
ELSE
|
||||
(vim.cmd {
|
||||
cmd = "normal"; bang = true;
|
||||
args = [ "gg" ];
|
||||
})
|
||||
)))
|
||||
]);
|
||||
}
|
||||
))
|
||||
]);
|
||||
extraPlugins = builtins.filter (x: x != null) (map (x: x.plugin or null) plugins);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,10 +10,6 @@ with lib; {
|
|||
default = false;
|
||||
description = "whether this is a phone";
|
||||
};
|
||||
suspend = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
options.rustAnalyzerAndroidSettings = mkOption {
|
||||
type = with types; attrs;
|
||||
|
|
|
@ -6,7 +6,7 @@ let
|
|||
foot = "${pkgs.foot}/bin/footclient";
|
||||
kitty = "${pkgs.kitty}/bin/kitty";
|
||||
urxvt = "${pkgs.rxvt-unicode-emoji}/bin/urxvt";
|
||||
}.${term} or (throw "Terminal not found");
|
||||
}.${term};
|
||||
color = builtins.elemAt config.colors.base;
|
||||
hex = x: if builtins.isFunction x then (y: "#" + (x y)) else ("#" + x);
|
||||
shell = lib.mkIf config.termShell.enable (lib.mkDefault config.termShell.path);
|
||||
|
@ -198,22 +198,21 @@ in {
|
|||
enabled_layouts = "all";
|
||||
};
|
||||
};
|
||||
xdg.configFile."fontconfig/conf.d/10-kitty-fonts.conf" =
|
||||
xdg.configFile."fontconfig/conf.d/10-kitty-fonts.conf".text =
|
||||
lib.mkIf
|
||||
(supportTerminal "kitty" && config.programs.kitty.font.name == "Noto Sans Mono") {
|
||||
text = ''
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<match target="scan">
|
||||
<test name="family">
|
||||
<string>Noto Sans Mono</string>
|
||||
</test>
|
||||
<edit name="spacing">
|
||||
<int>90</int>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
||||
'';
|
||||
};
|
||||
(supportTerminal "kitty" && config.programs.kitty.font.name == "Noto Sans Mono")
|
||||
''
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<match target="scan">
|
||||
<test name="family">
|
||||
<string>Noto Sans Mono</string>
|
||||
</test>
|
||||
<edit name="spacing">
|
||||
<int>90</int>
|
||||
</edit>
|
||||
</match>
|
||||
</fontconfig>
|
||||
'';
|
||||
}
|
||||
|
|
104
nixos-rebuild.py
104
nixos-rebuild.py
|
@ -1,104 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
# because nixos-rebuild --target-host is too flaky
|
||||
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
with open(os.path.expanduser("~/var/addresses.json"), "rt") as f:
|
||||
opts = json.loads(f.read())
|
||||
|
||||
|
||||
def main():
|
||||
args = sys.argv
|
||||
cfg = args[1]
|
||||
if "@" in cfg:
|
||||
cfg, addr = cfg.split("@")
|
||||
else:
|
||||
addr = opts["addresses"][cfg]
|
||||
build_host = opts["build_host"].get(cfg)
|
||||
act = args[2]
|
||||
assert act in ["boot", "switch", "test", "build"]
|
||||
args = args[3:]
|
||||
args.extend(
|
||||
[
|
||||
"--option",
|
||||
"extra-builtins-file",
|
||||
os.path.dirname(__file__) + "/extra-builtins.nix",
|
||||
]
|
||||
)
|
||||
attr_path = f".#nixosConfigurations.{cfg}.config.system.build.toplevel"
|
||||
copy_args = []
|
||||
do_copy = True
|
||||
if build_host is not None:
|
||||
build_host = addr if cfg == build_host else opts["addresses"][build_host]
|
||||
cmd = ["nix", "eval", "--json", attr_path + ".drvPath"] + args
|
||||
ret = subprocess.run(cmd, check=True, encoding="utf-8", stdout=subprocess.PIPE)
|
||||
drv = json.loads(ret.stdout)
|
||||
print('copying', drv, 'to build host')
|
||||
cmd = [
|
||||
"nix",
|
||||
"copy",
|
||||
drv,
|
||||
"--derivation",
|
||||
"--to",
|
||||
"ssh-ng://root@" + build_host,
|
||||
] + args
|
||||
subprocess.run(cmd, check=True)
|
||||
print('building', drv)
|
||||
cmd = ["nix", "build", f"'{drv}^*'", "--no-link", "--json"] + args
|
||||
ret = subprocess.run(
|
||||
["ssh", "root@" + build_host],
|
||||
input=" ".join(cmd) + "\n",
|
||||
check=True,
|
||||
encoding="utf-8",
|
||||
stdout=subprocess.PIPE,
|
||||
)
|
||||
if cfg == build_host:
|
||||
do_copy = False
|
||||
else:
|
||||
copy_args.extend(["--from", "ssh-ng://root@" + build_host])
|
||||
else:
|
||||
print('building', attr_path)
|
||||
cmd = ["nix", "build", attr_path, "--no-link", "--json"] + args
|
||||
ret = subprocess.run(cmd, check=True, encoding="utf-8", stdout=subprocess.PIPE)
|
||||
ret = json.loads(ret.stdout)[0]["outputs"]["out"]
|
||||
print('output', ret)
|
||||
cmds = []
|
||||
if act in ["build"]:
|
||||
return
|
||||
if act in ["boot", "switch"]:
|
||||
cmds.append(["nix-env", "-p", "/nix/var/nix/profiles/system", "--set", ret])
|
||||
cmds.append(
|
||||
["env", "NIXOS_INSTALL_BOOTLOADER=", ret + "/bin/switch-to-configuration", act]
|
||||
)
|
||||
if addr is None:
|
||||
for cmd in cmds:
|
||||
print('running', *cmd)
|
||||
cmd = ["sudo", "-A"] + cmd
|
||||
subprocess.run(cmd, check=True)
|
||||
else:
|
||||
if do_copy:
|
||||
print('copying', ret, 'to', addr)
|
||||
print(*(["nix", "copy", ret, "--no-check-sigs", "--to", "ssh-ng://root@" + addr] + copy_args + args))
|
||||
subprocess.run(
|
||||
["nix", "copy", ret, "--no-check-sigs", "--to", "ssh-ng://root@" + addr]
|
||||
+ copy_args
|
||||
+ args,
|
||||
check=True,
|
||||
)
|
||||
print('running', *cmd)
|
||||
subprocess.run(
|
||||
["ssh", "root@" + addr],
|
||||
input="\n".join(" ".join(cmd) for cmd in cmds) + "\n",
|
||||
check=True,
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
main()
|
||||
except subprocess.CalledProcessError:
|
||||
sys.exit(1)
|
|
@ -22,24 +22,24 @@
|
|||
"pinned": false,
|
||||
"src": {
|
||||
"name": null,
|
||||
"sha256": "sha256-jDWZ4m5aUALhs/EhGwrFa/3dbrLE3Lrn2BAnGC7TbIk=",
|
||||
"sha256": "sha256-vpr4DVWI7TZWb+roijpX5kJRPOJT4wZhT/ZnRrkgZKI=",
|
||||
"type": "url",
|
||||
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-20/GE-Proton9-20.tar.gz"
|
||||
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-11/GE-Proton9-11.tar.gz"
|
||||
},
|
||||
"version": "GE-Proton9-20"
|
||||
"version": "GE-Proton9-11"
|
||||
},
|
||||
"searxng": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-11-17",
|
||||
"date": "2024-08-09",
|
||||
"extract": null,
|
||||
"name": "searxng",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
"sha256": "sha256-dXALuiPCzK0Az64Fj9ygsNFoPKf0oJ2LyZDeg00Bfyo=",
|
||||
"sha256": "sha256-2QetT4xLlyKAC/eiIhShYRMRwFU9dJm6Ah5wS84Rgf8=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/searxng/searxng/archive/10d3af84b833ab2f2d1095efa3a7ba240ffb32fc.tar.gz"
|
||||
"url": "https://github.com/searxng/searxng/archive/f1c05e7c16e59a8d5d98640bc057958ea268cddf.tar.gz"
|
||||
},
|
||||
"version": "10d3af84b833ab2f2d1095efa3a7ba240ffb32fc"
|
||||
"version": "f1c05e7c16e59a8d5d98640bc057958ea268cddf"
|
||||
}
|
||||
}
|
|
@ -12,19 +12,19 @@
|
|||
};
|
||||
proton-ge = {
|
||||
pname = "proton-ge";
|
||||
version = "GE-Proton9-20";
|
||||
version = "GE-Proton9-11";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-20/GE-Proton9-20.tar.gz";
|
||||
sha256 = "sha256-jDWZ4m5aUALhs/EhGwrFa/3dbrLE3Lrn2BAnGC7TbIk=";
|
||||
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-11/GE-Proton9-11.tar.gz";
|
||||
sha256 = "sha256-vpr4DVWI7TZWb+roijpX5kJRPOJT4wZhT/ZnRrkgZKI=";
|
||||
};
|
||||
};
|
||||
searxng = {
|
||||
pname = "searxng";
|
||||
version = "10d3af84b833ab2f2d1095efa3a7ba240ffb32fc";
|
||||
version = "f1c05e7c16e59a8d5d98640bc057958ea268cddf";
|
||||
src = fetchTarball {
|
||||
url = "https://github.com/searxng/searxng/archive/10d3af84b833ab2f2d1095efa3a7ba240ffb32fc.tar.gz";
|
||||
sha256 = "sha256-dXALuiPCzK0Az64Fj9ygsNFoPKf0oJ2LyZDeg00Bfyo=";
|
||||
url = "https://github.com/searxng/searxng/archive/f1c05e7c16e59a8d5d98640bc057958ea268cddf.tar.gz";
|
||||
sha256 = "sha256-2QetT4xLlyKAC/eiIhShYRMRwFU9dJm6Ah5wS84Rgf8=";
|
||||
};
|
||||
date = "2024-11-17";
|
||||
date = "2024-08-09";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -116,7 +116,4 @@ in
|
|||
# hardware stuff
|
||||
hw.bpi-r3 = import ../system/hardware/bpi-r3/pkgs.nix { inherit pkgs pkgs' lib sources; };
|
||||
hw.oneplus-enchilada = import ../system/hardware/oneplus-enchilada/pkgs.nix { inherit inputs pkgs pkgs' lib sources; };
|
||||
hw.kobo-clara = import ../system/hardware/kobo-clara/pkgs.nix { inherit pkgs pkgs' lib sources; };
|
||||
# wlroots = throw "a";
|
||||
# sway-unwrapped = throw "a";
|
||||
}
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
};
|
||||
"rikaitan" = buildFirefoxXpiAddon {
|
||||
pname = "rikaitan";
|
||||
version = "24.11.4.1";
|
||||
version = "24.7.31.0";
|
||||
addonId = "tatsu@autistici.org";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4387983/rikaitan-24.11.4.1.xpi";
|
||||
sha256 = "583ce8ff3fc39e7bed139540a2c1b00871f429dd6c165fe9b181a5b095347549";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4337076/rikaitan-24.7.31.0.xpi";
|
||||
sha256 = "be4b8484221aa8eb4348d1880de988d6f19f3b9ca53deda3fca657dfa2ce3108";
|
||||
meta = with lib;
|
||||
{
|
||||
homepage = "https://rikaitan.github.io/";
|
||||
homepage = "https://github.com/Ajatt-Tools/rikaitan";
|
||||
description = "Japanese dictionary with Anki integration and flashcard creation support.";
|
||||
license = licenses.gpl3;
|
||||
mozPermissions = [
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
, xorg
|
||||
, xvfb-run
|
||||
, dbus
|
||||
, adwaita-icon-theme
|
||||
, gnome
|
||||
, alsa-lib
|
||||
, glib
|
||||
, glib-networking
|
||||
|
@ -89,7 +89,7 @@ in gimp.overrideAttrs (old: rec {
|
|||
json-glib
|
||||
python
|
||||
xorg.libXmu
|
||||
adwaita-icon-theme
|
||||
gnome.adwaita-icon-theme
|
||||
(luajit.withPackages (ps: [ ps.lgi ]))
|
||||
alsa-lib
|
||||
gjs
|
||||
|
@ -130,7 +130,7 @@ in gimp.overrideAttrs (old: rec {
|
|||
preFixup = ''
|
||||
gappsWrapperArgs+=(\
|
||||
--prefix PATH : "${lib.makeBinPath [ graphviz ]}:$out/bin" \
|
||||
--suffix XDG_DATA_DIRS : "${adwaita-icon-theme}/share" \
|
||||
--suffix XDG_DATA_DIRS : "${gnome.adwaita-icon-theme}/share" \
|
||||
)
|
||||
'';
|
||||
postFixup = ''
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
./fix-painting-api-crashes.patch
|
||||
./painting-api-options.patch
|
||||
./painting-api-pressure.patch
|
||||
./line-painting-api-qpointf.patch
|
||||
]; });
|
||||
}).overrideAttrs (old: {
|
||||
patched = true;
|
||||
buildInputs = old.buildInputs ++ [ python3Packages.requests ];
|
||||
})
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/plugins/extensions/pykrita/sip/krita/Node.sip b/plugins/extensions/pykrita/sip/krita/Node.sip
|
||||
index 986cc54169..04499fa38f 100644
|
||||
--- a/plugins/extensions/pykrita/sip/krita/Node.sip
|
||||
+++ b/plugins/extensions/pykrita/sip/krita/Node.sip
|
||||
@@ -82,7 +82,7 @@ public Q_SLOTS:
|
||||
int index() const;
|
||||
QUuid uniqueId() const;
|
||||
|
||||
- void paintLine(const QPoint pointOne, const QPoint pointTwo, double pressureOne = 1.0, double pressureTwo = 1.0, const QString strokeStyle = "ForegroundColor");
|
||||
+ void paintLine(const QPointF pointOne, const QPointF pointTwo, double pressureOne = 1.0, double pressureTwo = 1.0, const QString strokeStyle = "ForegroundColor");
|
||||
void paintRectangle(const QRectF &rect, const QString strokeStyle = "ForegroundColor", const QString fillStyle = "None");
|
||||
void paintPolygon(const QList<QPointF> points, const QString strokeStyle = "ForegroundColor", const QString fillStyle = "None");
|
||||
void paintEllipse(const QRectF &rect, const QString strokeStyle = "ForegroundColor", const QString fillStyle = "None");
|
|
@ -1,210 +0,0 @@
|
|||
From 85bbcf7e18136f788cf76bb6f345ade84a5e536e Mon Sep 17 00:00:00 2001
|
||||
From: chayleaf <chayleaf-git@pavluk.org>
|
||||
Date: Sat, 24 Aug 2024 10:49:21 +0700
|
||||
Subject: [PATCH 1/5] add on-long-touch option
|
||||
|
||||
---
|
||||
config.c | 21 +++++++++++++++++++++
|
||||
doc/mako.5.scd | 15 ++++++++++++++-
|
||||
include/config.h | 7 ++++---
|
||||
include/notification.h | 2 +-
|
||||
include/wayland.h | 1 +
|
||||
notification.c | 8 ++++++--
|
||||
wayland.c | 3 ++-
|
||||
7 files changed, 49 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/config.c b/config.c
|
||||
index 70be717..87db932 100644
|
||||
--- a/config.c
|
||||
+++ b/config.c
|
||||
@@ -129,6 +129,9 @@ void init_default_style(struct mako_style *style) {
|
||||
style->button_bindings.right.action = MAKO_BINDING_DISMISS;
|
||||
style->button_bindings.middle.action = MAKO_BINDING_NONE;
|
||||
style->touch_binding.action = MAKO_BINDING_DISMISS;
|
||||
+ style->long_touch_binding.action = MAKO_BINDING_INVOKE_ACTION;
|
||||
+ style->long_touch_binding.action_name = strdup(DEFAULT_ACTION_KEY);
|
||||
+ style->long_press_duration = 500;
|
||||
|
||||
// Everything in the default config is explicitly specified.
|
||||
memset(&style->spec, true, sizeof(struct mako_style_spec));
|
||||
@@ -148,6 +151,7 @@ void finish_style(struct mako_style *style) {
|
||||
finish_binding(&style->button_bindings.middle);
|
||||
finish_binding(&style->button_bindings.right);
|
||||
finish_binding(&style->touch_binding);
|
||||
+ finish_binding(&style->long_touch_binding);
|
||||
finish_binding(&style->notify_binding);
|
||||
free(style->icon_path);
|
||||
free(style->font);
|
||||
@@ -385,6 +389,16 @@ bool apply_style(struct mako_style *target, const struct mako_style *style) {
|
||||
target->spec.touch_binding = true;
|
||||
}
|
||||
|
||||
+ if (style->spec.long_touch_binding) {
|
||||
+ copy_binding(&target->long_touch_binding, &style->long_touch_binding);
|
||||
+ target->spec.long_touch_binding = true;
|
||||
+ }
|
||||
+
|
||||
+ if (style->spec.long_press_duration) {
|
||||
+ target->long_press_duration = style->long_press_duration;
|
||||
+ target->spec.long_press_duration = true;
|
||||
+ }
|
||||
+
|
||||
if (style->spec.notify_binding) {
|
||||
copy_binding(&target->notify_binding, &style->notify_binding);
|
||||
target->spec.notify_binding = true;
|
||||
@@ -660,6 +674,8 @@ static bool apply_style_option(struct mako_style *style, const char *name,
|
||||
return true;
|
||||
} else if (strcmp(name, "anchor") == 0) {
|
||||
return spec->anchor = parse_anchor(value, &style->anchor);
|
||||
+ } else if (strcmp(name, "long-press-duration") == 0) {
|
||||
+ return spec->long_press_duration = parse_int_ge(value, &style->long_press_duration, 0);
|
||||
} else if (has_prefix(name, "on-")) {
|
||||
struct mako_binding binding = {0};
|
||||
if (strcmp(value, "none") == 0) {
|
||||
@@ -697,6 +713,9 @@ static bool apply_style_option(struct mako_style *style, const char *name,
|
||||
} else if (strcmp(name, "on-touch") == 0) {
|
||||
copy_binding(&style->touch_binding, &binding);
|
||||
style->spec.touch_binding = true;
|
||||
+ } else if (strcmp(name, "on-long-touch") == 0) {
|
||||
+ copy_binding(&style->long_touch_binding, &binding);
|
||||
+ style->spec.long_touch_binding = true;
|
||||
} else if (strcmp(name, "on-notify") == 0) {
|
||||
copy_binding(&style->notify_binding, &binding);
|
||||
style->spec.notify_binding = true;
|
||||
@@ -886,6 +905,8 @@ int parse_config_arguments(struct mako_config *config, int argc, char **argv) {
|
||||
{"on-button-right", required_argument, 0, 0},
|
||||
{"on-button-middle", required_argument, 0, 0},
|
||||
{"on-touch", required_argument, 0, 0},
|
||||
+ {"on-long-touch", required_argument, 0, 0},
|
||||
+ {"long-press-duration", required_argument, 0, 0},
|
||||
{0},
|
||||
};
|
||||
|
||||
diff --git a/doc/mako.5.scd b/doc/mako.5.scd
|
||||
index 91378ba..fff19ed 100644
|
||||
--- a/doc/mako.5.scd
|
||||
+++ b/doc/mako.5.scd
|
||||
@@ -57,10 +57,23 @@ Supported options:
|
||||
Default: dismiss
|
||||
|
||||
*on-touch*=_action_
|
||||
- Performs the action when tapped via a touch device.
|
||||
+ Performs the action when tapped via a touch device if the tap
|
||||
+ duration is less than *long-press-duration*.
|
||||
|
||||
Default: dismiss
|
||||
|
||||
+*on-long-touch*=_action_
|
||||
+ Performs the action when tapped via a touch device if the press
|
||||
+ duration is greater or equal to *long-press-duration*.
|
||||
+
|
||||
+ Default: invoke-default-action
|
||||
+
|
||||
+*long-press-duration*=_time_
|
||||
+ Specifies the cutoff time (in milliseconds) for a press to be
|
||||
+ considered a long press.
|
||||
+
|
||||
+ Default: 500
|
||||
+
|
||||
*on-notify*=_action_
|
||||
Performs the action when the notification is opened.
|
||||
|
||||
diff --git a/include/config.h b/include/config.h
|
||||
index 013923a..5ff541c 100644
|
||||
--- a/include/config.h
|
||||
+++ b/include/config.h
|
||||
@@ -42,14 +42,14 @@ struct mako_style_spec {
|
||||
bool width, height, outer_margin, margin, padding, border_size, border_radius, font,
|
||||
markup, format, text_alignment, actions, default_timeout, ignore_timeout,
|
||||
icons, max_icon_size, icon_path, group_criteria_spec, invisible, history,
|
||||
- icon_location, max_visible, layer, output, anchor;
|
||||
+ icon_location, max_visible, layer, output, anchor, long_press_duration;
|
||||
struct {
|
||||
bool background, text, border, progress;
|
||||
} colors;
|
||||
struct {
|
||||
bool left, right, middle;
|
||||
} button_bindings;
|
||||
- bool touch_binding, notify_binding;
|
||||
+ bool touch_binding, long_touch_binding, notify_binding;
|
||||
};
|
||||
|
||||
|
||||
@@ -98,7 +98,8 @@ struct mako_style {
|
||||
struct {
|
||||
struct mako_binding left, right, middle;
|
||||
} button_bindings;
|
||||
- struct mako_binding touch_binding, notify_binding;
|
||||
+ struct mako_binding touch_binding, long_touch_binding, notify_binding;
|
||||
+ int32_t long_press_duration;
|
||||
};
|
||||
|
||||
struct mako_config {
|
||||
diff --git a/include/notification.h b/include/notification.h
|
||||
index 9a395ba..a02d855 100644
|
||||
--- a/include/notification.h
|
||||
+++ b/include/notification.h
|
||||
@@ -101,7 +101,7 @@ size_t format_notification(struct mako_notification *notif, const char *format,
|
||||
void notification_handle_button(struct mako_notification *notif, uint32_t button,
|
||||
enum wl_pointer_button_state state, const struct mako_binding_context *ctx);
|
||||
void notification_handle_touch(struct mako_notification *notif,
|
||||
- const struct mako_binding_context *ctx);
|
||||
+ const struct mako_binding_context *ctx, int32_t duration_ms);
|
||||
void notification_execute_binding(struct mako_notification *notif,
|
||||
const struct mako_binding *binding, const struct mako_binding_context *ctx);
|
||||
void insert_notification(struct mako_state *state, struct mako_notification *notif);
|
||||
diff --git a/include/wayland.h b/include/wayland.h
|
||||
index cc00500..c8767be 100644
|
||||
--- a/include/wayland.h
|
||||
+++ b/include/wayland.h
|
||||
@@ -35,6 +35,7 @@ struct mako_seat {
|
||||
struct wl_touch *wl_touch;
|
||||
struct {
|
||||
int32_t x, y;
|
||||
+ uint32_t time;
|
||||
struct mako_surface *surface;
|
||||
} pts[MAX_TOUCHPOINTS];
|
||||
} touch;
|
||||
diff --git a/notification.c b/notification.c
|
||||
index 8c0c8a7..7d3db2f 100644
|
||||
--- a/notification.c
|
||||
+++ b/notification.c
|
||||
@@ -446,8 +446,12 @@ void notification_handle_button(struct mako_notification *notif, uint32_t button
|
||||
}
|
||||
|
||||
void notification_handle_touch(struct mako_notification *notif,
|
||||
- const struct mako_binding_context *ctx) {
|
||||
- notification_execute_binding(notif, ¬if->style.touch_binding, ctx);
|
||||
+ const struct mako_binding_context *ctx, int32_t duration_ms) {
|
||||
+ if (duration_ms >= notif->style.long_press_duration) {
|
||||
+ notification_execute_binding(notif, ¬if->style.long_touch_binding, ctx);
|
||||
+ } else {
|
||||
+ notification_execute_binding(notif, ¬if->style.touch_binding, ctx);
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/wayland.c b/wayland.c
|
||||
index eeefb30..d247779 100644
|
||||
--- a/wayland.c
|
||||
+++ b/wayland.c
|
||||
@@ -122,6 +122,7 @@ static void touch_handle_down(void *data, struct wl_touch *wl_touch,
|
||||
}
|
||||
seat->touch.pts[id].x = wl_fixed_to_int(surface_x);
|
||||
seat->touch.pts[id].y = wl_fixed_to_int(surface_y);
|
||||
+ seat->touch.pts[id].time = time;
|
||||
seat->touch.pts[id].surface = get_surface(seat->state, wl_surface);
|
||||
}
|
||||
|
||||
@@ -144,7 +145,7 @@ static void touch_handle_up(void *data, struct wl_touch *wl_touch,
|
||||
wl_list_for_each(notif, &state->notifications, link) {
|
||||
if (hotspot_at(¬if->hotspot, seat->touch.pts[id].x, seat->touch.pts[id].y)) {
|
||||
struct mako_surface *surface = notif->surface;
|
||||
- notification_handle_touch(notif, &ctx);
|
||||
+ notification_handle_touch(notif, &ctx, time - seat->touch.pts[id].time);
|
||||
set_dirty(surface);
|
||||
break;
|
||||
}
|
||||
--
|
||||
2.45.2
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
From 7365261e130016e884371d2e288b83e16a9dcb48 Mon Sep 17 00:00:00 2001
|
||||
From: chayleaf <chayleaf-git@pavluk.org>
|
||||
Date: Sat, 24 Aug 2024 13:50:38 +0700
|
||||
Subject: [PATCH 2/5] consider long press done even before release
|
||||
|
||||
---
|
||||
include/notification.h | 16 ++++++++++------
|
||||
include/wayland.h | 1 +
|
||||
notification.c | 22 ++++++++++++++++++++++
|
||||
wayland.c | 15 ++++++++++++++-
|
||||
4 files changed, 47 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/include/notification.h b/include/notification.h
|
||||
index a02d855..b1482ec 100644
|
||||
--- a/include/notification.h
|
||||
+++ b/include/notification.h
|
||||
@@ -19,6 +19,12 @@ struct mako_hotspot {
|
||||
int32_t width, height;
|
||||
};
|
||||
|
||||
+struct mako_binding_context {
|
||||
+ struct mako_surface *surface;
|
||||
+ struct mako_seat *seat;
|
||||
+ uint32_t serial;
|
||||
+};
|
||||
+
|
||||
struct mako_notification {
|
||||
struct mako_state *state;
|
||||
struct mako_surface *surface;
|
||||
@@ -38,6 +44,8 @@ struct mako_notification {
|
||||
char *body;
|
||||
int32_t requested_timeout;
|
||||
struct wl_list actions; // mako_action::link
|
||||
+ struct mako_timer *long_press_timer;
|
||||
+ struct mako_binding_context long_press_ctx;
|
||||
|
||||
enum mako_notification_urgency urgency;
|
||||
char *category;
|
||||
@@ -70,12 +78,6 @@ struct mako_hidden_format_data {
|
||||
size_t count;
|
||||
};
|
||||
|
||||
-struct mako_binding_context {
|
||||
- struct mako_surface *surface;
|
||||
- struct mako_seat *seat;
|
||||
- uint32_t serial;
|
||||
-};
|
||||
-
|
||||
typedef char *(*mako_format_func_t)(char variable, bool *markup, void *data);
|
||||
|
||||
bool hotspot_at(struct mako_hotspot *hotspot, int32_t x, int32_t y);
|
||||
@@ -100,6 +102,8 @@ size_t format_notification(struct mako_notification *notif, const char *format,
|
||||
char *buf);
|
||||
void notification_handle_button(struct mako_notification *notif, uint32_t button,
|
||||
enum wl_pointer_button_state state, const struct mako_binding_context *ctx);
|
||||
+void notification_handle_touch_start(struct mako_notification *notif,
|
||||
+ const struct mako_binding_context *ctx);
|
||||
void notification_handle_touch(struct mako_notification *notif,
|
||||
const struct mako_binding_context *ctx, int32_t duration_ms);
|
||||
void notification_execute_binding(struct mako_notification *notif,
|
||||
diff --git a/include/wayland.h b/include/wayland.h
|
||||
index c8767be..d4d39c4 100644
|
||||
--- a/include/wayland.h
|
||||
+++ b/include/wayland.h
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <wayland-client-protocol.h>
|
||||
+#include "mako.h"
|
||||
|
||||
#define MAX_TOUCHPOINTS 10
|
||||
|
||||
diff --git a/notification.c b/notification.c
|
||||
index 7d3db2f..32e7f7b 100644
|
||||
--- a/notification.c
|
||||
+++ b/notification.c
|
||||
@@ -41,6 +41,8 @@ void reset_notification(struct mako_notification *notif) {
|
||||
|
||||
destroy_timer(notif->timer);
|
||||
notif->timer = NULL;
|
||||
+ destroy_timer(notif->long_press_timer);
|
||||
+ notif->long_press_timer = NULL;
|
||||
|
||||
free(notif->app_name);
|
||||
free(notif->app_icon);
|
||||
@@ -447,6 +449,8 @@ void notification_handle_button(struct mako_notification *notif, uint32_t button
|
||||
|
||||
void notification_handle_touch(struct mako_notification *notif,
|
||||
const struct mako_binding_context *ctx, int32_t duration_ms) {
|
||||
+ destroy_timer(notif->long_press_timer);
|
||||
+ notif->long_press_timer = NULL;
|
||||
if (duration_ms >= notif->style.long_press_duration) {
|
||||
notification_execute_binding(notif, ¬if->style.long_touch_binding, ctx);
|
||||
} else {
|
||||
@@ -454,6 +458,24 @@ void notification_handle_touch(struct mako_notification *notif,
|
||||
}
|
||||
}
|
||||
|
||||
+void handle_notification_touch_timer(void *data) {
|
||||
+ struct mako_notification *notif = data;
|
||||
+ notif->long_press_timer = NULL;
|
||||
+ struct mako_binding_context ctx = notif->long_press_ctx;
|
||||
+ notification_execute_binding(notif, ¬if->style.long_touch_binding, &ctx);
|
||||
+ set_dirty(ctx.surface);
|
||||
+}
|
||||
+
|
||||
+void notification_handle_touch_start(struct mako_notification *notif,
|
||||
+ const struct mako_binding_context *ctx) {
|
||||
+ if (notif->long_press_timer) {
|
||||
+ return;
|
||||
+ }
|
||||
+ notif->long_press_ctx = *ctx;
|
||||
+ notif->long_press_timer = add_event_loop_timer(¬if->state->event_loop, 500,
|
||||
+ handle_notification_touch_timer, notif);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Searches through the notifications list and returns the next position at
|
||||
* which to insert. If no results for the specified urgency are found,
|
||||
diff --git a/wayland.c b/wayland.c
|
||||
index d247779..6d8b6ff 100644
|
||||
--- a/wayland.c
|
||||
+++ b/wayland.c
|
||||
@@ -120,10 +120,23 @@ static void touch_handle_down(void *data, struct wl_touch *wl_touch,
|
||||
if (id >= MAX_TOUCHPOINTS) {
|
||||
return;
|
||||
}
|
||||
+ struct mako_state *state = seat->state;
|
||||
seat->touch.pts[id].x = wl_fixed_to_int(surface_x);
|
||||
seat->touch.pts[id].y = wl_fixed_to_int(surface_y);
|
||||
seat->touch.pts[id].time = time;
|
||||
- seat->touch.pts[id].surface = get_surface(seat->state, wl_surface);
|
||||
+ seat->touch.pts[id].surface = get_surface(state, wl_surface);
|
||||
+
|
||||
+ struct mako_notification *notif;
|
||||
+ const struct mako_binding_context ctx = {
|
||||
+ .surface = seat->touch.pts[id].surface,
|
||||
+ .seat = seat,
|
||||
+ .serial = serial,
|
||||
+ };
|
||||
+ wl_list_for_each(notif, &state->notifications, link) {
|
||||
+ if (hotspot_at(¬if->hotspot, seat->touch.pts[id].x, seat->touch.pts[id].y)) {
|
||||
+ notification_handle_touch_start(notif, &ctx);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
static void touch_handle_up(void *data, struct wl_touch *wl_touch,
|
||||
--
|
||||
2.45.2
|
||||
|
|
@ -1,284 +0,0 @@
|
|||
From 0b53bc7fb9494bc7a804a1d088c6b4137d6eef6d Mon Sep 17 00:00:00 2001
|
||||
From: chayleaf <chayleaf-git@pavluk.org>
|
||||
Date: Sat, 24 Aug 2024 08:47:49 +0700
|
||||
Subject: [PATCH 3/5] dynamic timeouts
|
||||
|
||||
Compute notification timeouts on every config change, rather than only
|
||||
on notification creation.
|
||||
---
|
||||
criteria.c | 50 ++++++++++++++++++++++++++++++++++++++----
|
||||
dbus/mako.c | 2 +-
|
||||
dbus/xdg.c | 21 +-----------------
|
||||
event-loop.c | 22 +++----------------
|
||||
include/criteria.h | 4 ++--
|
||||
include/event-loop.h | 2 +-
|
||||
include/notification.h | 1 +
|
||||
notification.c | 2 ++
|
||||
render.c | 4 ++--
|
||||
9 files changed, 59 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/criteria.c b/criteria.c
|
||||
index 9db3966..3108a38 100644
|
||||
--- a/criteria.c
|
||||
+++ b/criteria.c
|
||||
@@ -418,15 +418,38 @@ struct mako_criteria *global_criteria(struct mako_config *config) {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
-// Iterate through `criteria_list`, applying the style from each matching
|
||||
+static void timespec_add(struct timespec *t, int delta_ms) {
|
||||
+ static const long ms = 1000000, s = 1000000000;
|
||||
+
|
||||
+ int delta_ms_low = delta_ms % 1000;
|
||||
+ int delta_s_high = delta_ms / 1000;
|
||||
+
|
||||
+ t->tv_sec += delta_s_high;
|
||||
+
|
||||
+ t->tv_nsec += (long)delta_ms_low * ms;
|
||||
+ if (t->tv_nsec >= s) {
|
||||
+ t->tv_nsec -= s;
|
||||
+ ++t->tv_sec;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void handle_notification_timer(void *data) {
|
||||
+ struct mako_notification *notif = data;
|
||||
+ struct mako_surface *surface = notif->surface;
|
||||
+ notif->timer = NULL;
|
||||
+
|
||||
+ close_notification(notif, MAKO_NOTIFICATION_CLOSE_EXPIRED, true);
|
||||
+ set_dirty(surface);
|
||||
+}
|
||||
+
|
||||
+// Iterate through the criteria list, applying the style from each matching
|
||||
// criteria to `notif`. Returns the number of criteria that matched, or -1 if
|
||||
// a failure occurs.
|
||||
-ssize_t apply_each_criteria(struct wl_list *criteria_list,
|
||||
- struct mako_notification *notif) {
|
||||
+ssize_t apply_each_criteria(struct mako_state *state, struct mako_notification *notif) {
|
||||
ssize_t match_count = 0;
|
||||
|
||||
struct mako_criteria *criteria;
|
||||
- wl_list_for_each(criteria, criteria_list, link) {
|
||||
+ wl_list_for_each(criteria, &state->config.criteria, link) {
|
||||
if (!match_criteria(criteria, notif)) {
|
||||
continue;
|
||||
}
|
||||
@@ -447,6 +470,25 @@ ssize_t apply_each_criteria(struct wl_list *criteria_list,
|
||||
}
|
||||
}
|
||||
|
||||
+ int32_t expire_timeout = notif->requested_timeout;
|
||||
+ if (expire_timeout < 0 || notif->style.ignore_timeout) {
|
||||
+ expire_timeout = notif->style.default_timeout;
|
||||
+ }
|
||||
+
|
||||
+ if (expire_timeout > 0) {
|
||||
+ struct timespec at = notif->at;
|
||||
+ timespec_add(&at, expire_timeout);
|
||||
+ if (notif->timer) {
|
||||
+ notif->timer->at = at;
|
||||
+ } else {
|
||||
+ notif->timer = add_event_loop_timer(&state->event_loop, &at,
|
||||
+ handle_notification_timer, notif);
|
||||
+ }
|
||||
+ } else if (notif->timer) {
|
||||
+ destroy_timer(notif->timer);
|
||||
+ notif->timer = NULL;
|
||||
+ }
|
||||
+
|
||||
if (!notif->surface) {
|
||||
notif->surface = create_surface(notif->state, notif->style.output,
|
||||
notif->style.layer, notif->style.anchor);
|
||||
diff --git a/dbus/mako.c b/dbus/mako.c
|
||||
index 4c95881..8f3c874 100644
|
||||
--- a/dbus/mako.c
|
||||
+++ b/dbus/mako.c
|
||||
@@ -305,7 +305,7 @@ static void reapply_config(struct mako_state *state) {
|
||||
|
||||
finish_style(¬if->style);
|
||||
init_empty_style(¬if->style);
|
||||
- apply_each_criteria(&state->config.criteria, notif);
|
||||
+ apply_each_criteria(state, notif);
|
||||
|
||||
// Having to do this for every single notification really hurts... but
|
||||
// it does do The Right Thing (tm).
|
||||
diff --git a/dbus/xdg.c b/dbus/xdg.c
|
||||
index 1f91431..650dff7 100644
|
||||
--- a/dbus/xdg.c
|
||||
+++ b/dbus/xdg.c
|
||||
@@ -81,15 +81,6 @@ static int handle_get_capabilities(sd_bus_message *msg, void *data,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void handle_notification_timer(void *data) {
|
||||
- struct mako_notification *notif = data;
|
||||
- struct mako_surface *surface = notif->surface;
|
||||
- notif->timer = NULL;
|
||||
-
|
||||
- close_notification(notif, MAKO_NOTIFICATION_CLOSE_EXPIRED, true);
|
||||
- set_dirty(surface);
|
||||
-}
|
||||
-
|
||||
static int handle_notify(sd_bus_message *msg, void *data,
|
||||
sd_bus_error *ret_error) {
|
||||
struct mako_state *state = data;
|
||||
@@ -382,7 +373,7 @@ static int handle_notify(sd_bus_message *msg, void *data,
|
||||
insert_notification(state, notif);
|
||||
}
|
||||
|
||||
- int match_count = apply_each_criteria(&state->config.criteria, notif);
|
||||
+ int match_count = apply_each_criteria(state, notif);
|
||||
if (match_count == -1) {
|
||||
// We encountered an allocation failure or similar while applying
|
||||
// criteria. The notification may be partially matched, but the worst
|
||||
@@ -398,16 +389,6 @@ static int handle_notify(sd_bus_message *msg, void *data,
|
||||
return -1;
|
||||
}
|
||||
|
||||
- int32_t expire_timeout = notif->requested_timeout;
|
||||
- if (expire_timeout < 0 || notif->style.ignore_timeout) {
|
||||
- expire_timeout = notif->style.default_timeout;
|
||||
- }
|
||||
-
|
||||
- if (expire_timeout > 0) {
|
||||
- notif->timer = add_event_loop_timer(&state->event_loop, expire_timeout,
|
||||
- handle_notification_timer, notif);
|
||||
- }
|
||||
-
|
||||
if (notif->style.icons) {
|
||||
notif->icon = create_icon(notif);
|
||||
}
|
||||
diff --git a/event-loop.c b/event-loop.c
|
||||
index 99c1f4a..92c627a 100644
|
||||
--- a/event-loop.c
|
||||
+++ b/event-loop.c
|
||||
@@ -74,21 +74,6 @@ void finish_event_loop(struct mako_event_loop *loop) {
|
||||
}
|
||||
}
|
||||
|
||||
-static void timespec_add(struct timespec *t, int delta_ms) {
|
||||
- static const long ms = 1000000, s = 1000000000;
|
||||
-
|
||||
- int delta_ms_low = delta_ms % 1000;
|
||||
- int delta_s_high = delta_ms / 1000;
|
||||
-
|
||||
- t->tv_sec += delta_s_high;
|
||||
-
|
||||
- t->tv_nsec += (long)delta_ms_low * ms;
|
||||
- if (t->tv_nsec >= s) {
|
||||
- t->tv_nsec -= s;
|
||||
- ++t->tv_sec;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
static bool timespec_less(struct timespec *t1, struct timespec *t2) {
|
||||
if (t1->tv_sec != t2->tv_sec) {
|
||||
return t1->tv_sec < t2->tv_sec;
|
||||
@@ -124,7 +109,7 @@ static void update_event_loop_timer(struct mako_event_loop *loop) {
|
||||
}
|
||||
|
||||
struct mako_timer *add_event_loop_timer(struct mako_event_loop *loop,
|
||||
- int delay_ms, mako_event_loop_timer_func_t func, void *data) {
|
||||
+ struct timespec *at, mako_event_loop_timer_func_t func, void *data) {
|
||||
struct mako_timer *timer = calloc(1, sizeof(struct mako_timer));
|
||||
if (timer == NULL) {
|
||||
fprintf(stderr, "allocation failed\n");
|
||||
@@ -133,10 +118,9 @@ struct mako_timer *add_event_loop_timer(struct mako_event_loop *loop,
|
||||
timer->event_loop = loop;
|
||||
timer->func = func;
|
||||
timer->user_data = data;
|
||||
- wl_list_insert(&loop->timers, &timer->link);
|
||||
+ timer->at = *at;
|
||||
|
||||
- clock_gettime(CLOCK_MONOTONIC, &timer->at);
|
||||
- timespec_add(&timer->at, delay_ms);
|
||||
+ wl_list_insert(&loop->timers, &timer->link);
|
||||
|
||||
update_event_loop_timer(loop);
|
||||
return timer;
|
||||
diff --git a/include/criteria.h b/include/criteria.h
|
||||
index 2f03514..58c36ef 100644
|
||||
--- a/include/criteria.h
|
||||
+++ b/include/criteria.h
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <wayland-client.h>
|
||||
#include "config.h"
|
||||
#include "types.h"
|
||||
+#include "mako.h"
|
||||
|
||||
struct mako_config;
|
||||
struct mako_notification;
|
||||
@@ -53,8 +54,7 @@ bool parse_criteria(const char *string, struct mako_criteria *criteria);
|
||||
bool apply_criteria_field(struct mako_criteria *criteria, char *token);
|
||||
|
||||
struct mako_criteria *global_criteria(struct mako_config *config);
|
||||
-ssize_t apply_each_criteria(struct wl_list *criteria_list,
|
||||
- struct mako_notification *notif);
|
||||
+ssize_t apply_each_criteria(struct mako_state *state, struct mako_notification *notif);
|
||||
struct mako_criteria *create_criteria_from_notification(
|
||||
struct mako_notification *notif, struct mako_criteria_spec *spec);
|
||||
|
||||
diff --git a/include/event-loop.h b/include/event-loop.h
|
||||
index 95c8d36..cd63e98 100644
|
||||
--- a/include/event-loop.h
|
||||
+++ b/include/event-loop.h
|
||||
@@ -47,7 +47,7 @@ bool init_event_loop(struct mako_event_loop *loop, sd_bus *bus,
|
||||
void finish_event_loop(struct mako_event_loop *loop);
|
||||
int run_event_loop(struct mako_event_loop *loop);
|
||||
struct mako_timer *add_event_loop_timer(struct mako_event_loop *loop,
|
||||
- int delay_ms, mako_event_loop_timer_func_t func, void *data);
|
||||
+ struct timespec *at, mako_event_loop_timer_func_t func, void *data);
|
||||
|
||||
void destroy_timer(struct mako_timer *timer);
|
||||
|
||||
diff --git a/include/notification.h b/include/notification.h
|
||||
index b1482ec..2775d88 100644
|
||||
--- a/include/notification.h
|
||||
+++ b/include/notification.h
|
||||
@@ -56,6 +56,7 @@ struct mako_notification {
|
||||
|
||||
struct mako_hotspot hotspot;
|
||||
struct mako_timer *timer;
|
||||
+ struct timespec at;
|
||||
};
|
||||
|
||||
struct mako_action {
|
||||
diff --git a/notification.c b/notification.c
|
||||
index 32e7f7b..b78bd09 100644
|
||||
--- a/notification.c
|
||||
+++ b/notification.c
|
||||
@@ -68,6 +68,8 @@ void reset_notification(struct mako_notification *notif) {
|
||||
|
||||
destroy_icon(notif->icon);
|
||||
notif->icon = NULL;
|
||||
+
|
||||
+ clock_gettime(CLOCK_MONOTONIC, ¬if->at);
|
||||
}
|
||||
|
||||
struct mako_notification *create_notification(struct mako_state *state) {
|
||||
diff --git a/render.c b/render.c
|
||||
index 5b68632..44b78a0 100644
|
||||
--- a/render.c
|
||||
+++ b/render.c
|
||||
@@ -355,7 +355,7 @@ void render(struct mako_surface *surface, struct pool_buffer *buffer, int scale,
|
||||
// Immediately before rendering we need to re-match all of the criteria
|
||||
// so that matches against the anchor and output work even if the
|
||||
// output was automatically assigned by the compositor.
|
||||
- int rematch_count = apply_each_criteria(&state->config.criteria, notif);
|
||||
+ int rematch_count = apply_each_criteria(state, notif);
|
||||
if (rematch_count == -1) {
|
||||
// We encountered an allocation failure or similar while applying
|
||||
// criteria. The notification may be partially matched, but the
|
||||
@@ -427,7 +427,7 @@ void render(struct mako_surface *surface, struct pool_buffer *buffer, int scale,
|
||||
struct mako_notification *hidden_notif = create_notification(state);
|
||||
hidden_notif->surface = surface;
|
||||
hidden_notif->hidden = true;
|
||||
- apply_each_criteria(&state->config.criteria, hidden_notif);
|
||||
+ apply_each_criteria(state, hidden_notif);
|
||||
|
||||
struct mako_style *style = &hidden_notif->style;
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
|
@ -1,192 +0,0 @@
|
|||
From e2cb0d80c643b03a61f69f85454c9ed06eda5c3e Mon Sep 17 00:00:00 2001
|
||||
From: chayleaf <chayleaf-git@pavluk.org>
|
||||
Date: Sat, 24 Aug 2024 09:19:34 +0700
|
||||
Subject: [PATCH 4/5] implement notification time freezing
|
||||
|
||||
---
|
||||
config.c | 8 +++++++
|
||||
criteria.c | 49 +++++++++++++++++++++++++++++++++++-------
|
||||
doc/mako.5.scd | 6 ++++++
|
||||
include/config.h | 4 +++-
|
||||
include/notification.h | 2 ++
|
||||
notification.c | 1 +
|
||||
6 files changed, 61 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/config.c b/config.c
|
||||
index 87db932..79dc58a 100644
|
||||
--- a/config.c
|
||||
+++ b/config.c
|
||||
@@ -105,6 +105,7 @@ void init_default_style(struct mako_style *style) {
|
||||
style->actions = true;
|
||||
style->default_timeout = 0;
|
||||
style->ignore_timeout = false;
|
||||
+ style->freeze = false;
|
||||
|
||||
style->colors.background = 0x285577FF;
|
||||
style->colors.text = 0xFFFFFFFF;
|
||||
@@ -305,6 +306,11 @@ bool apply_style(struct mako_style *target, const struct mako_style *style) {
|
||||
target->spec.ignore_timeout = true;
|
||||
}
|
||||
|
||||
+ if (style->spec.freeze) {
|
||||
+ target->freeze = style->freeze;
|
||||
+ target->spec.freeze = true;
|
||||
+ }
|
||||
+
|
||||
if (style->spec.colors.background) {
|
||||
target->colors.background = style->colors.background;
|
||||
target->spec.colors.background = true;
|
||||
@@ -637,6 +643,8 @@ static bool apply_style_option(struct mako_style *style, const char *name,
|
||||
} else if (strcmp(name, "ignore-timeout") == 0) {
|
||||
return spec->ignore_timeout =
|
||||
parse_boolean(value, &style->ignore_timeout);
|
||||
+ } else if (strcmp(name, "freeze") == 0) {
|
||||
+ return spec->freeze = parse_boolean(value, &style->freeze);
|
||||
} else if (strcmp(name, "group-by") == 0) {
|
||||
return spec->group_criteria_spec =
|
||||
parse_criteria_spec(value, &style->group_criteria_spec);
|
||||
diff --git a/criteria.c b/criteria.c
|
||||
index 3108a38..523a467 100644
|
||||
--- a/criteria.c
|
||||
+++ b/criteria.c
|
||||
@@ -418,21 +418,39 @@ struct mako_criteria *global_criteria(struct mako_config *config) {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
-static void timespec_add(struct timespec *t, int delta_ms) {
|
||||
- static const long ms = 1000000, s = 1000000000;
|
||||
+static void timespec_from_ms(struct timespec *t, long time_ms) {
|
||||
+ static const long ms = 1000000;
|
||||
|
||||
- int delta_ms_low = delta_ms % 1000;
|
||||
- int delta_s_high = delta_ms / 1000;
|
||||
+ t->tv_sec = time_ms / 1000;
|
||||
+ t->tv_nsec = (time_ms % 1000) * ms;
|
||||
+}
|
||||
+
|
||||
+static void timespec_add(struct timespec *t, struct timespec *u) {
|
||||
+ static const long s = 1000000000;
|
||||
|
||||
- t->tv_sec += delta_s_high;
|
||||
+ t->tv_sec += u->tv_sec;
|
||||
+ t->tv_nsec += u->tv_nsec;
|
||||
|
||||
- t->tv_nsec += (long)delta_ms_low * ms;
|
||||
if (t->tv_nsec >= s) {
|
||||
t->tv_nsec -= s;
|
||||
++t->tv_sec;
|
||||
}
|
||||
}
|
||||
|
||||
+static void timespec_sub(struct timespec *t, struct timespec *u) {
|
||||
+ static const long s = 1000000000;
|
||||
+
|
||||
+ t->tv_sec -= u->tv_sec;
|
||||
+ t->tv_nsec += s;
|
||||
+ t->tv_nsec -= u->tv_nsec;
|
||||
+
|
||||
+ if (t->tv_nsec >= s) {
|
||||
+ t->tv_nsec -= s;
|
||||
+ } else {
|
||||
+ --t->tv_sec;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void handle_notification_timer(void *data) {
|
||||
struct mako_notification *notif = data;
|
||||
struct mako_surface *surface = notif->surface;
|
||||
@@ -474,10 +492,25 @@ ssize_t apply_each_criteria(struct mako_state *state, struct mako_notification *
|
||||
if (expire_timeout < 0 || notif->style.ignore_timeout) {
|
||||
expire_timeout = notif->style.default_timeout;
|
||||
}
|
||||
+ if (notif->frozen != notif->style.freeze) {
|
||||
+ struct timespec now;
|
||||
+ clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
+ if (notif->style.freeze) {
|
||||
+ notif->froze_at = now;
|
||||
+ } else {
|
||||
+ timespec_sub(&now, ¬if->froze_at);
|
||||
+ timespec_add(¬if->at, &now);
|
||||
+ }
|
||||
+ notif->frozen = notif->style.freeze;
|
||||
+ }
|
||||
+ if (notif->frozen) {
|
||||
+ expire_timeout = 0;
|
||||
+ }
|
||||
|
||||
if (expire_timeout > 0) {
|
||||
- struct timespec at = notif->at;
|
||||
- timespec_add(&at, expire_timeout);
|
||||
+ struct timespec at = notif->at, delta;
|
||||
+ timespec_from_ms(&delta, expire_timeout);
|
||||
+ timespec_add(&at, &delta);
|
||||
if (notif->timer) {
|
||||
notif->timer->at = at;
|
||||
} else {
|
||||
diff --git a/doc/mako.5.scd b/doc/mako.5.scd
|
||||
index fff19ed..c0be528 100644
|
||||
--- a/doc/mako.5.scd
|
||||
+++ b/doc/mako.5.scd
|
||||
@@ -421,6 +421,12 @@ associated command-line option.
|
||||
|
||||
Default: 0
|
||||
|
||||
+*freeze*=0|1
|
||||
+ Whether to freeze this notification's active timeout, stopping it from
|
||||
+ progressing. This can be used for pausing notifications while you're away.
|
||||
+
|
||||
+ Default: 0
|
||||
+
|
||||
# COLORS
|
||||
|
||||
Colors can be specified as _#RRGGBB_ or _#RRGGBBAA_.
|
||||
diff --git a/include/config.h b/include/config.h
|
||||
index 5ff541c..53116e1 100644
|
||||
--- a/include/config.h
|
||||
+++ b/include/config.h
|
||||
@@ -42,7 +42,8 @@ struct mako_style_spec {
|
||||
bool width, height, outer_margin, margin, padding, border_size, border_radius, font,
|
||||
markup, format, text_alignment, actions, default_timeout, ignore_timeout,
|
||||
icons, max_icon_size, icon_path, group_criteria_spec, invisible, history,
|
||||
- icon_location, max_visible, layer, output, anchor, long_press_duration;
|
||||
+ icon_location, max_visible, layer, output, anchor, long_press_duration,
|
||||
+ freeze;
|
||||
struct {
|
||||
bool background, text, border, progress;
|
||||
} colors;
|
||||
@@ -76,6 +77,7 @@ struct mako_style {
|
||||
bool actions;
|
||||
int default_timeout; // in ms
|
||||
bool ignore_timeout;
|
||||
+ bool freeze;
|
||||
|
||||
struct {
|
||||
uint32_t background;
|
||||
diff --git a/include/notification.h b/include/notification.h
|
||||
index 2775d88..a631b49 100644
|
||||
--- a/include/notification.h
|
||||
+++ b/include/notification.h
|
||||
@@ -57,6 +57,8 @@ struct mako_notification {
|
||||
struct mako_hotspot hotspot;
|
||||
struct mako_timer *timer;
|
||||
struct timespec at;
|
||||
+ struct timespec froze_at;
|
||||
+ bool frozen;
|
||||
};
|
||||
|
||||
struct mako_action {
|
||||
diff --git a/notification.c b/notification.c
|
||||
index b78bd09..ce0bafd 100644
|
||||
--- a/notification.c
|
||||
+++ b/notification.c
|
||||
@@ -70,6 +70,7 @@ void reset_notification(struct mako_notification *notif) {
|
||||
notif->icon = NULL;
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, ¬if->at);
|
||||
+ notif->frozen = false;
|
||||
}
|
||||
|
||||
struct mako_notification *create_notification(struct mako_state *state) {
|
||||
--
|
||||
2.45.2
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
From cf4c99d9fa92e397b3860a71d293957741abc7c2 Mon Sep 17 00:00:00 2001
|
||||
From: chayleaf <chayleaf-git@pavluk.org>
|
||||
Date: Sat, 24 Aug 2024 14:22:23 +0700
|
||||
Subject: [PATCH 5/5] cherry-pick fixup
|
||||
|
||||
---
|
||||
criteria.c | 4 ++--
|
||||
include/criteria.h | 3 +++
|
||||
notification.c | 6 +++++-
|
||||
3 files changed, 10 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/criteria.c b/criteria.c
|
||||
index 523a467..2514da9 100644
|
||||
--- a/criteria.c
|
||||
+++ b/criteria.c
|
||||
@@ -418,14 +418,14 @@ struct mako_criteria *global_criteria(struct mako_config *config) {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
-static void timespec_from_ms(struct timespec *t, long time_ms) {
|
||||
+void timespec_from_ms(struct timespec *t, long time_ms) {
|
||||
static const long ms = 1000000;
|
||||
|
||||
t->tv_sec = time_ms / 1000;
|
||||
t->tv_nsec = (time_ms % 1000) * ms;
|
||||
}
|
||||
|
||||
-static void timespec_add(struct timespec *t, struct timespec *u) {
|
||||
+void timespec_add(struct timespec *t, struct timespec *u) {
|
||||
static const long s = 1000000000;
|
||||
|
||||
t->tv_sec += u->tv_sec;
|
||||
diff --git a/include/criteria.h b/include/criteria.h
|
||||
index 58c36ef..48f256d 100644
|
||||
--- a/include/criteria.h
|
||||
+++ b/include/criteria.h
|
||||
@@ -60,4 +60,7 @@ struct mako_criteria *create_criteria_from_notification(
|
||||
|
||||
bool validate_criteria(struct mako_criteria *criteria);
|
||||
|
||||
+void timespec_add(struct timespec *t, struct timespec *u);
|
||||
+void timespec_from_ms(struct timespec *t, long time_ms);
|
||||
+
|
||||
#endif
|
||||
diff --git a/notification.c b/notification.c
|
||||
index ce0bafd..730176f 100644
|
||||
--- a/notification.c
|
||||
+++ b/notification.c
|
||||
@@ -475,7 +475,11 @@ void notification_handle_touch_start(struct mako_notification *notif,
|
||||
return;
|
||||
}
|
||||
notif->long_press_ctx = *ctx;
|
||||
- notif->long_press_timer = add_event_loop_timer(¬if->state->event_loop, 500,
|
||||
+ struct timespec at, delta;
|
||||
+ clock_gettime(CLOCK_MONOTONIC, &at);
|
||||
+ timespec_from_ms(&delta, 500);
|
||||
+ timespec_add(&at, &delta);
|
||||
+ notif->long_press_timer = add_event_loop_timer(¬if->state->event_loop, &at,
|
||||
handle_notification_touch_timer, notif);
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, pkgs', ... }:
|
||||
|
||||
let
|
||||
unpatchedNixForNixPlugins = pkgs.nixVersions.nix_2_18;
|
||||
nixForNixPlugins = unpatchedNixForNixPlugins.overrideAttrs (old: {
|
||||
patches = (old.patches or [ ]) ++ [ ./rename-nix-plugin-files.patch ];
|
||||
# some tests fail on bcachefs due to insufficient permissions
|
||||
doInstallCheck = false;
|
||||
});
|
||||
nixForNixPlugins = pkgs.nixVersions.nix_2_18;
|
||||
in {
|
||||
inherit unpatchedNixForNixPlugins nixForNixPlugins;
|
||||
inherit nixForNixPlugins;
|
||||
nix = nixForNixPlugins;
|
||||
nixVersions = pkgs.nixVersions // {
|
||||
stable = nixForNixPlugins;
|
||||
unstable = nixForNixPlugins;
|
||||
};
|
||||
# Various patches to change Nix version of existing packages so they don't error out because of nix-plugins in nix.conf
|
||||
/*nix-plugins = (pkgs.nix-plugins.override { nix = nixForNixPlugins; }).overrideAttrs (old: {
|
||||
version = "13.0.0";
|
||||
|
@ -20,6 +20,17 @@ in {
|
|||
})
|
||||
];
|
||||
});*/
|
||||
harmonia = (pkgs.harmonia.override { nixVersions.nix_2_21 = nixForNixPlugins; }).overrideAttrs (old: rec {
|
||||
version = "0.7.3";
|
||||
src = old.src.override {
|
||||
rev = "refs/tags/${old.pname}-v${version}";
|
||||
hash = "sha256-XtnK54HvZMKZGSCrVD0FO5PQLMo3Vkj8ezUlsfqStq0=";
|
||||
};
|
||||
cargoDeps = pkgs'.rustPlatform.importCargoLock { lockFile = "${src}/Cargo.lock"; };
|
||||
});
|
||||
nix-init = pkgs.nix-init.override { nix = nixForNixPlugins; };
|
||||
nix-serve = pkgs.nix-serve.override { nix = nixForNixPlugins; };
|
||||
nix-serve-ng = pkgs.nix-serve-ng.override { nix = nixForNixPlugins; };
|
||||
hydra_unstable = (pkgs.hydra_unstable.override {
|
||||
nix = nixForNixPlugins;
|
||||
}).overrideAttrs (old: {
|
||||
|
@ -31,4 +42,5 @@ in {
|
|||
hash = "sha256-vXTuE83GL15mgZHegbllVAsVdDFcWWSayPfZxTJN5ys=";
|
||||
};
|
||||
});
|
||||
nurl = pkgs.nurl.override { nix = nixForNixPlugins; };
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
|
||||
index dba7d78ef..f102f08f9 100644
|
||||
--- a/src/libstore/globals.hh
|
||||
+++ b/src/libstore/globals.hh
|
||||
@@ -959,7 +959,7 @@ public:
|
||||
"Number of seconds between checking free disk space."};
|
||||
|
||||
PluginFilesSetting pluginFiles{
|
||||
- this, {}, "plugin-files",
|
||||
+ this, {}, "plugin-files-2",
|
||||
R"(
|
||||
A list of plugin files to be loaded by Nix. Each of these files will
|
||||
be dlopened by Nix, allowing them to affect execution through static
|
|
@ -1,181 +0,0 @@
|
|||
From 637fe90e0c69d77d2ad24576d924b041525fd941 Mon Sep 17 00:00:00 2001
|
||||
From: chayleaf <chayleaf-git@pavluk.org>
|
||||
Date: Sat, 24 Aug 2024 12:10:16 +0700
|
||||
Subject: [PATCH 1/3] wip touch support
|
||||
|
||||
---
|
||||
include/wayland-internal.h | 7 +++
|
||||
source/wayland/display.c | 115 +++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 122 insertions(+)
|
||||
|
||||
diff --git a/include/wayland-internal.h b/include/wayland-internal.h
|
||||
index e6d248ce..77aaaf9d 100644
|
||||
--- a/include/wayland-internal.h
|
||||
+++ b/include/wayland-internal.h
|
||||
@@ -84,6 +84,8 @@ typedef struct {
|
||||
uint32_t layer_height;
|
||||
} wayland_stuff;
|
||||
|
||||
+#define MAX_TOUCHPOINTS 10
|
||||
+
|
||||
struct _wayland_seat {
|
||||
wayland_stuff *context;
|
||||
uint32_t global_name;
|
||||
@@ -99,6 +101,11 @@ struct _wayland_seat {
|
||||
uint32_t pointer_serial;
|
||||
struct wl_keyboard *keyboard;
|
||||
struct wl_pointer *pointer;
|
||||
+ struct wl_touch *touch;
|
||||
+ struct {
|
||||
+ int32_t x, start_y, move_y;
|
||||
+ uint32_t start_time, move_time;
|
||||
+ } touches[MAX_TOUCHPOINTS];
|
||||
|
||||
#ifdef HAVE_WAYLAND_CURSOR_SHAPE
|
||||
struct wp_cursor_shape_device_v1 *cursor_shape_device;
|
||||
diff --git a/source/wayland/display.c b/source/wayland/display.c
|
||||
index 6cdc7d2f..381c402d 100644
|
||||
--- a/source/wayland/display.c
|
||||
+++ b/source/wayland/display.c
|
||||
@@ -526,6 +526,101 @@ static const struct wl_keyboard_listener wayland_keyboard_listener = {
|
||||
.repeat_info = wayland_keyboard_repeat_info,
|
||||
};
|
||||
|
||||
+static void wayland_touch_down(void *data, struct wl_touch *wl_touch,
|
||||
+ uint32_t serial, uint32_t time, struct wl_surface *wl_surface,
|
||||
+ int32_t id, wl_fixed_t surface_x, wl_fixed_t surface_y) {
|
||||
+ wayland_seat *self = data;
|
||||
+ if (id >= MAX_TOUCHPOINTS) {
|
||||
+ return;
|
||||
+ }
|
||||
+ self->touches[id].x = wl_fixed_to_int(surface_x);
|
||||
+ self->touches[id].start_y = self->touches[id].move_y = wl_fixed_to_int(surface_y);
|
||||
+ self->touches[id].start_time = self->touches[id].move_time = time;
|
||||
+ RofiViewState *state = rofi_view_get_active();
|
||||
+
|
||||
+ if (state == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+ rofi_view_handle_mouse_motion(state, self->touches[id].x, self->touches[id].start_y,
|
||||
+ FALSE);
|
||||
+}
|
||||
+
|
||||
+static void wayland_touch_up(void *data, struct wl_touch *wl_touch,
|
||||
+ uint32_t serial, uint32_t time, int32_t id) {
|
||||
+ wayland_seat *self = data;
|
||||
+ if (id >= MAX_TOUCHPOINTS) {
|
||||
+ return;
|
||||
+ }
|
||||
+ gboolean is_move =
|
||||
+ time - self->touches[id].start_time > 500
|
||||
+ || self->touches[id].start_time != self->touches[id].move_time;
|
||||
+ if (is_move) {
|
||||
+ return;
|
||||
+ }
|
||||
+ RofiViewState *state = rofi_view_get_active();
|
||||
+
|
||||
+ if (state == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+ //rofi_view_handle_mouse_motion(state, self->touches[id].x, self->touches[id].start_y,
|
||||
+ // FALSE);
|
||||
+ nk_bindings_seat_handle_key(wayland->bindings_seat, NULL,
|
||||
+ KEY_ENTER + 8,
|
||||
+ NK_BINDINGS_KEY_STATE_PRESS);
|
||||
+ rofi_view_maybe_update(state);
|
||||
+}
|
||||
+
|
||||
+static int32_t y_offset_to_line_offset(int32_t y_offset) {
|
||||
+ static const int32_t line_height = 20;
|
||||
+ return -(y_offset / line_height);
|
||||
+}
|
||||
+
|
||||
+static void wayland_touch_motion(void *data, struct wl_touch *wl_touch,
|
||||
+ uint32_t time, int32_t id, wl_fixed_t surface_x, wl_fixed_t surface_y) {
|
||||
+ wayland_seat *self = data;
|
||||
+ if (id >= MAX_TOUCHPOINTS) {
|
||||
+ return;
|
||||
+ }
|
||||
+ RofiViewState *state = rofi_view_get_active();
|
||||
+
|
||||
+ if (state == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+ int32_t x = wl_fixed_to_int(surface_x);
|
||||
+ int32_t y = wl_fixed_to_int(surface_y);
|
||||
+
|
||||
+ int last_pos = y_offset_to_line_offset(self->touches[id].move_y - self->touches[id].start_y);
|
||||
+ int cur_pos = y_offset_to_line_offset(y - self->touches[id].start_y);
|
||||
+
|
||||
+ if (cur_pos != last_pos) {
|
||||
+ rofi_view_handle_mouse_motion(state, x, y, FALSE);
|
||||
+ nk_bindings_seat_handle_scroll(wayland->bindings_seat, NULL,
|
||||
+ NK_BINDINGS_SCROLL_AXIS_VERTICAL,
|
||||
+ cur_pos - last_pos);
|
||||
+ self->touches[id].x = x;
|
||||
+ self->touches[id].move_y = y;
|
||||
+ self->touches[id].move_time = time;
|
||||
+ rofi_view_maybe_update(state);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void wayland_touch_frame(void *data, struct wl_touch *wl_touch) { }
|
||||
+static void wayland_touch_cancel(void *data, struct wl_touch *wl_touch) { }
|
||||
+static void wayland_touch_shape(void *data, struct wl_touch *wl_touch,
|
||||
+ int32_t id, wl_fixed_t major, wl_fixed_t minor) { }
|
||||
+static void wayland_touch_orientation(void *data, struct wl_touch *wl_touch,
|
||||
+ int32_t id, wl_fixed_t orientation) { }
|
||||
+
|
||||
+static const struct wl_touch_listener wayland_touch_listener = {
|
||||
+ .down = wayland_touch_down,
|
||||
+ .up = wayland_touch_up,
|
||||
+ .motion = wayland_touch_motion,
|
||||
+ .frame = wayland_touch_frame,
|
||||
+ .cancel = wayland_touch_cancel,
|
||||
+ .shape = wayland_touch_shape,
|
||||
+ .orientation = wayland_touch_orientation,
|
||||
+};
|
||||
+
|
||||
static gboolean wayland_cursor_reload_theme(guint scale);
|
||||
|
||||
static void wayland_cursor_set_image(int i) {
|
||||
@@ -1081,9 +1176,20 @@ static void wayland_pointer_release(wayland_seat *self) {
|
||||
self->pointer = NULL;
|
||||
}
|
||||
|
||||
+static void wayland_touch_release(wayland_seat *self) {
|
||||
+ if (self->touch == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ wl_touch_release(self->touch);
|
||||
+
|
||||
+ self->touch = NULL;
|
||||
+}
|
||||
+
|
||||
static void wayland_seat_release(wayland_seat *self) {
|
||||
wayland_keyboard_release(self);
|
||||
wayland_pointer_release(self);
|
||||
+ wayland_touch_release(self);
|
||||
|
||||
wl_seat_release(self->seat);
|
||||
|
||||
@@ -1113,6 +1219,15 @@ static void wayland_seat_capabilities(void *data, struct wl_seat *seat,
|
||||
wayland_pointer_release(self);
|
||||
}
|
||||
|
||||
+ if ((capabilities & WL_SEAT_CAPABILITY_TOUCH) &&
|
||||
+ (self->touch == NULL)) {
|
||||
+ self->touch = wl_seat_get_touch(self->seat);
|
||||
+ wl_touch_add_listener(self->touch, &wayland_touch_listener, self);
|
||||
+ } else if ((!(capabilities & WL_SEAT_CAPABILITY_TOUCH)) &&
|
||||
+ (self->touch != NULL)) {
|
||||
+ wayland_touch_release(self);
|
||||
+ }
|
||||
+
|
||||
if (wayland->data_device_manager != NULL) {
|
||||
self->data_device = wl_data_device_manager_get_data_device(
|
||||
wayland->data_device_manager, seat);
|
||||
--
|
||||
2.45.2
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
From 3d02857ec8ab68ae243e651874203e88e6788ae7 Mon Sep 17 00:00:00 2001
|
||||
From: chayleaf <chayleaf-git@pavluk.org>
|
||||
Date: Sat, 24 Aug 2024 13:22:34 +0700
|
||||
Subject: [PATCH 2/3] still scroll after the tap moves outside the rofi window
|
||||
|
||||
---
|
||||
source/wayland/display.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/source/wayland/display.c b/source/wayland/display.c
|
||||
index 381c402d..5154589a 100644
|
||||
--- a/source/wayland/display.c
|
||||
+++ b/source/wayland/display.c
|
||||
@@ -593,7 +593,6 @@ static void wayland_touch_motion(void *data, struct wl_touch *wl_touch,
|
||||
int cur_pos = y_offset_to_line_offset(y - self->touches[id].start_y);
|
||||
|
||||
if (cur_pos != last_pos) {
|
||||
- rofi_view_handle_mouse_motion(state, x, y, FALSE);
|
||||
nk_bindings_seat_handle_scroll(wayland->bindings_seat, NULL,
|
||||
NK_BINDINGS_SCROLL_AXIS_VERTICAL,
|
||||
cur_pos - last_pos);
|
||||
--
|
||||
2.45.2
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
From 8b417bc6304c30bafb56113b868ecac2ffc0ed08 Mon Sep 17 00:00:00 2001
|
||||
From: chayleaf <chayleaf-git@pavluk.org>
|
||||
Date: Sat, 24 Aug 2024 13:29:32 +0700
|
||||
Subject: [PATCH 3/3] exit on long tap
|
||||
|
||||
---
|
||||
source/wayland/display.c | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/source/wayland/display.c b/source/wayland/display.c
|
||||
index 5154589a..cfd883b3 100644
|
||||
--- a/source/wayland/display.c
|
||||
+++ b/source/wayland/display.c
|
||||
@@ -551,10 +551,8 @@ static void wayland_touch_up(void *data, struct wl_touch *wl_touch,
|
||||
if (id >= MAX_TOUCHPOINTS) {
|
||||
return;
|
||||
}
|
||||
- gboolean is_move =
|
||||
- time - self->touches[id].start_time > 500
|
||||
- || self->touches[id].start_time != self->touches[id].move_time;
|
||||
- if (is_move) {
|
||||
+ gboolean has_moved = self->touches[id].start_time != self->touches[id].move_time;
|
||||
+ if (has_moved) {
|
||||
return;
|
||||
}
|
||||
RofiViewState *state = rofi_view_get_active();
|
||||
@@ -562,10 +560,12 @@ static void wayland_touch_up(void *data, struct wl_touch *wl_touch,
|
||||
if (state == NULL) {
|
||||
return;
|
||||
}
|
||||
- //rofi_view_handle_mouse_motion(state, self->touches[id].x, self->touches[id].start_y,
|
||||
- // FALSE);
|
||||
+ int key = KEY_ENTER;
|
||||
+ if (time - self->touches[id].start_time > 200) {
|
||||
+ key = KEY_ESC;
|
||||
+ }
|
||||
nk_bindings_seat_handle_key(wayland->bindings_seat, NULL,
|
||||
- KEY_ENTER + 8,
|
||||
+ key + 8,
|
||||
NK_BINDINGS_KEY_STATE_PRESS);
|
||||
rofi_view_maybe_update(state);
|
||||
}
|
||||
--
|
||||
2.45.2
|
||||
|
|
@ -29,7 +29,6 @@ stdenv.mkDerivation {
|
|||
ninja
|
||||
pkg-config
|
||||
scdoc
|
||||
wayland
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
@ -37,8 +36,8 @@ stdenv.mkDerivation {
|
|||
gdk-pixbuf
|
||||
libsodium
|
||||
libxkbcommon
|
||||
wayland-protocols
|
||||
wayland
|
||||
wayland-protocols
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -1,148 +0,0 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, inputs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
# uuids.enc = "e2abdea5-71dc-4a9e-aff3-242117342d60";
|
||||
uuids.boot = "49b5ab26-a8f4-4873-a235-da2b3608e870";
|
||||
uuids.swap = "b7eb326b-69d8-4347-a2dc-549ec6201e7f";
|
||||
uuids.root = "99cda95f-f866-42a0-883f-343ad3662920";
|
||||
parts = builtins.mapAttrs (k: v: "/dev/disk/by-uuid/${v}") uuids;
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
../hardware/kobo-clara
|
||||
../hosts/ereader
|
||||
];
|
||||
|
||||
fonts.enableDefaultPackages = false;
|
||||
# defaults without noto-fonts-color-emoji
|
||||
fonts.packages = with pkgs; [
|
||||
dejavu_fonts
|
||||
freefont_ttf
|
||||
gyre-fonts # TrueType substitutes for standard PostScript fonts
|
||||
liberation_ttf
|
||||
unifont
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: let
|
||||
overrideFfmpeg = ffmpeg: ffmpeg.override {
|
||||
withAlsa = false;
|
||||
withJack = false;
|
||||
withMp3lame = false;
|
||||
withOgg = false;
|
||||
withOpus = false;
|
||||
withPulse = false;
|
||||
withSpeex = false;
|
||||
withVaapi = false;
|
||||
withVdpau = false;
|
||||
withVorbis = false;
|
||||
};
|
||||
in {
|
||||
ffmpeg = overrideFfmpeg super.ffmpeg;
|
||||
waybar = super.waybar.override {
|
||||
hyprlandSupport = false;
|
||||
jackSupport = false;
|
||||
mpdSupport = false;
|
||||
mprisSupport = false;
|
||||
pipewireSupport = false;
|
||||
pulseSupport = false;
|
||||
sndioSupport = false;
|
||||
cavaSupport = false;
|
||||
wireplumberSupport = false;
|
||||
};
|
||||
awesome = super.awesome.overrideAttrs (old: {
|
||||
# broken cross tests
|
||||
doCheck = false;
|
||||
});
|
||||
# ffmpeg isnt actually used in wlroots anymore, remove the useless dependency
|
||||
wlroots_0_17 = super.wlroots_0_17.overrideAttrs (old: {
|
||||
buildInputs = builtins.filter (x: x.pname != "ffmpeg") old.buildInputs;
|
||||
});
|
||||
# heif/avif support isnt worth an extra rust dependency
|
||||
imagemagick = super.imagemagick.override {
|
||||
libheifSupport = false;
|
||||
};
|
||||
jasper = super.jasper.override {
|
||||
enableHEIFCodec = false;
|
||||
};
|
||||
# no audio, so no need to bring in the audio libs
|
||||
SDL2 = super.SDL2.override {
|
||||
alsaSupport = false;
|
||||
pipewireSupport = false;
|
||||
pulseaudioSupport = false;
|
||||
};
|
||||
openalSoft = super.openalSoft.override {
|
||||
alsaSupport = false;
|
||||
pipewireSupport = false;
|
||||
pulseSupport = false;
|
||||
};
|
||||
openal = super.openal.override {
|
||||
alsaSupport = false;
|
||||
pipewireSupport = false;
|
||||
pulseSupport = false;
|
||||
};
|
||||
# luajit has to be built on a system with 32-bit pointer width when targeting 32-bit systems
|
||||
luajit = (import inputs.nixpkgs { system = "i686-linux"; }).pkgsCross.armv7l-hf-multiplatform.luajit;
|
||||
# fix cross https://github.com/NixOS/nixpkgs/pull/328919/
|
||||
texinfo = super.texinfo.overrideAttrs (old: {
|
||||
configureFlags = old.configureFlags
|
||||
++ lib.optional
|
||||
(self.stdenv.hostPlatform != self.stdenv.buildPlatform)
|
||||
"texinfo_cv_sys_iconv_converts_euc_cn=yes";
|
||||
});
|
||||
koreader = super.koreader.overrideAttrs (old: {
|
||||
src = self.fetchurl {
|
||||
url = "https://github.com/koreader/koreader/releases/download/v${old.version}/koreader-${old.version}-armhf.deb";
|
||||
hash = "sha256-LgeWQcHm5Qq/7MUuidjily0WsOFZAWGWeO52jNHWKMw=";
|
||||
};
|
||||
meta = old.meta // {
|
||||
platforms = [ "armv7l-linux" ];
|
||||
};
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
networking.wireless.iwd.enable = true;
|
||||
|
||||
fileSystems = let
|
||||
neededForBoot = true;
|
||||
in {
|
||||
"/" = { device = "none"; fsType = "tmpfs"; inherit neededForBoot;
|
||||
options = [ "defaults" "size=2G" "mode=755" ]; };
|
||||
"/persist" =
|
||||
{ device = parts.root; fsType = "btrfs"; inherit neededForBoot;
|
||||
options = [ "discard=async" "compress=zstd:15" ]; };
|
||||
"/boot" = { device = parts.boot; fsType = "ext4"; };
|
||||
};
|
||||
|
||||
swapDevices = [ { device = parts.swap; } ];
|
||||
boot.resumeDevice = parts.swap;
|
||||
|
||||
system.build.rootfsImage = pkgs.callPackage "${pkgs.path}/nixos/lib/make-btrfs-fs.nix" {
|
||||
storePaths = config.system.build.toplevel;
|
||||
compressImage = true;
|
||||
volumeLabel = "NIX_ROOTFS";
|
||||
uuid = uuids.root;
|
||||
};
|
||||
system.build.bootFiles = pkgs.runCommand "kobo-clara-boot-files" {} ''
|
||||
mkdir -p "$out"
|
||||
${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d $out -g 0
|
||||
'';
|
||||
|
||||
impermanence = {
|
||||
enable = true;
|
||||
path = /persist;
|
||||
directories = [
|
||||
{ directory = /home/${config.common.mainUsername}; user = config.common.mainUsername; group = "users"; mode = "0700"; }
|
||||
{ directory = /root; mode = "0700"; }
|
||||
{ directory = /nix; }
|
||||
{ directory = /secrets; mode = "0000"; }
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
# device-specific non-portable config
|
||||
{ ...
|
||||
{ pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -34,6 +35,7 @@ in
|
|||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_testing;
|
||||
boot.kernelParams = [ "boot.shell_on_fail" ];
|
||||
|
||||
fileSystems = {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
let
|
||||
uuids.enc = "e2abdea5-71dc-4a9e-aff3-242117342d60";
|
||||
uuids.boot = "9DA3-28AC";
|
||||
uuids.root = "5fadc23c-f374-442d-8b05-fb76611c9eb7";
|
||||
uuids.bch = "ac343ffb-407c-4966-87bf-a0ef1075e93d";
|
||||
parts = builtins.mapAttrs (k: v: "/dev/disk/by-uuid/${v}") uuids;
|
||||
in
|
||||
|
||||
|
@ -30,22 +30,18 @@ in
|
|||
device = parts.enc;
|
||||
allowDiscards = true;
|
||||
};
|
||||
network.ssh = {
|
||||
enable = true;
|
||||
port = 22;
|
||||
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
|
||||
hostKeys = [ "/secrets/initrd/ssh_host_ed25519_key" "/secrets/initrd/ssh_host_rsa_key" ];
|
||||
};
|
||||
};
|
||||
|
||||
boot.supportedFilesystems = [ "bcachefs" ];
|
||||
|
||||
fileSystems = let
|
||||
neededForBoot = true;
|
||||
in {
|
||||
"/" = { device = "none"; fsType = "tmpfs"; inherit neededForBoot;
|
||||
options = [ "defaults" "size=2G" "mode=755" ]; };
|
||||
"/persist" =
|
||||
{ device = parts.root; fsType = "btrfs"; inherit neededForBoot;
|
||||
options = [ "discard=async" "compress=zstd:15" ]; };
|
||||
{ device = "UUID=${uuids.bch}"; fsType = "bcachefs"; inherit neededForBoot;
|
||||
options = [ "errors=ro" ]; };
|
||||
"/boot" = { device = parts.boot; fsType = "vfat"; inherit neededForBoot; };
|
||||
};
|
||||
|
||||
|
|
|
@ -39,11 +39,6 @@ in
|
|||
|
||||
networking.useDHCP = false;
|
||||
networking.useNetworkd = true;
|
||||
networking.resolvconf.extraConfig = let
|
||||
ip = cidr: builtins.head (lib.splitString "/" cidr);
|
||||
in ''
|
||||
name_servers='${ip router-config.router-settings.network} ${ip router-config.router-settings.network6}'
|
||||
'';
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
links."10-mac" = {
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
Note: **the dtb depends on board revision** (and may brick your device
|
||||
if you use the wrong dtb)
|
||||
|
||||
https://gitlab.com/postmarketOS/pmaports/-/blob/master/device/testing/firmware-kobo-clara
|
||||
|
||||
https://gitlab.com/postmarketOS/pmaports/-/blob/master/device/testing/device-kobo-clara
|
||||
|
||||
https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/linux-kobo-clara-mainline
|
||||
|
||||
https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/testing/u-boot-kobo-clara
|
||||
|
||||
https://github.com/jwrdegoede/rtl8189ES_linux
|
|
@ -1,78 +0,0 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
pkgs' = pkgs.hw.kobo-clara;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
ereader.epdc-firmware = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
};
|
||||
};
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
boot.loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackagesFor pkgs'.linux;
|
||||
|
||||
boot.initrd.preLVMCommands = ''
|
||||
echo 0 > /sys/class/graphics/fbcon/cursor_blink
|
||||
(cd /sys/bus/platform/devices && echo *epdc >/sys/bus/platform/drivers/mxc_epdc/bind)
|
||||
'';
|
||||
boot.consoleLogLevel = 7;
|
||||
hardware.deviceTree.enable = true;
|
||||
hardware.deviceTree.filter = "imx6sll-kobo-clarahd.dtb";
|
||||
hardware.firmware = [
|
||||
(pkgs.runCommand "epdc-firmware" { } ''
|
||||
mkdir -p $out/lib/firmware/imx/epdc
|
||||
cp ${config.ereader.epdc-firmware} $out/lib/firmware/imx/epdc/epdc.fw
|
||||
'')
|
||||
];
|
||||
# boot.initrd.extraFiles."lib/firmware/imx/epdc/epdc.fw".source = pkgs.copyPathToStore config.ereader.epdc-firmware;
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
makeModulesClosure = args: (super.makeModulesClosure args).overrideAttrs (old: {
|
||||
builder = pkgs.writeShellScript "builder.sh" ''
|
||||
source ${old.builder}
|
||||
cd "$firmware"
|
||||
mkdir -p "$out/lib/firmware/imx"
|
||||
cp --no-preserve=mode -vrL lib/firmware/imx/* "$out/lib/firmware/imx/"
|
||||
'';
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
boot.initrd.kernelModules = [ "tps6518x_hwmon" "tps6518x_regulator" "mxc_epdc_drm" ];
|
||||
boot.initrd.availableKernelModules = [ "mmc_block" "dm_mod" ];
|
||||
boot.kernelParams = [ "console=ttymxc0,115200" "detect_clara_rev" ];
|
||||
# "dtb=/${config.hardware.deviceTree.name}"
|
||||
|
||||
boot.initrd.compressor = "zstd";
|
||||
|
||||
boot.postBootCommands = ''
|
||||
if [ -f ${toString config.impermanence.path}/nix-path-registration ]; then
|
||||
${config.nix.package.out}/bin/nix-store --load-db < ${toString config.impermanence.path}/nix-path-registration
|
||||
mkdir -p /etc
|
||||
touch /etc/NIXOS
|
||||
${config.nix.package.out}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
|
||||
rm -f ${toString config.impermanence.path}/nix-path-registration
|
||||
fi
|
||||
'';
|
||||
|
||||
system.build.uboot = pkgs'.uboot;
|
||||
boot.initrd.includeDefaultModules = false;
|
||||
}
|
||||
(lib.mkIf config.phone.buffyboard.enable {
|
||||
common.gettyAutologin = true;
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
uboot = pkgs.buildUBoot {
|
||||
defconfig = "mx6sllclarahd_defconfig";
|
||||
extraConfig = ''
|
||||
CONFIG_FASTBOOT_OEM_RUN=y
|
||||
CONFIG_ENV_IS_IN_EXT4=y
|
||||
CONFIG_ENV_IS_IN_MMC=n
|
||||
CONFIG_ENV_EXT4_INTERFACE=mmc
|
||||
CONFIG_ENV_EXT4_DEVICE_AND_PART=0:1
|
||||
CONFIG_ENV_EXT4_FILE=/uboot.env
|
||||
CONFIG_BOOTCOMMAND="${builtins.replaceStrings [ "\n" ] [ "; " ] ''
|
||||
detect_clara_rev
|
||||
run distro_bootcmd
|
||||
setenv stdin usbacm
|
||||
setenv stdout usbacm
|
||||
setenv stderr usbacm
|
||||
''};"
|
||||
'';
|
||||
# fastboot 0
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "akemnade";
|
||||
repo = "u-boot-fslc";
|
||||
hash = "sha256-MUAiiXTfxt/o/6rnoI7A76IMRPDUhXodjnguKwQKrVs=";
|
||||
rev = "3247fa27aed27bb5ac24bd9966fd7dadd9c4c373";
|
||||
};
|
||||
version = "2023.10";
|
||||
extraMeta.platforms = [ "armv7l-linux" ];
|
||||
filesToInstall = [ "u-boot-dtb.imx" ];
|
||||
};
|
||||
linux = (pkgs.buildLinux rec {
|
||||
version = "6.9.0";
|
||||
modDirVersion = lib.versions.pad 3 version;
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "akemnade";
|
||||
repo = "linux";
|
||||
rev = "4b0c49001732b93f6787c44e090b8e8f72e6fe6a";
|
||||
hash = "sha256-rCiznEHDqrOW+CEI1I9HdHNSsVYCb7iJGE+7PKJ8H6A=";
|
||||
};
|
||||
|
||||
defconfig = "kobo_defconfig";
|
||||
}).overrideAttrs (old: {
|
||||
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.lzop ];
|
||||
});
|
||||
}
|
|
@ -19,6 +19,13 @@ in
|
|||
|
||||
options.phone = {
|
||||
adb.enable = lib.mkEnableOption "adb";
|
||||
rndis.enable = lib.mkEnableOption "rndis" // {
|
||||
default = true;
|
||||
};
|
||||
buffyboard.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
|
@ -48,11 +55,11 @@ in
|
|||
# https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/community/soc-qcom-sdm845/
|
||||
/*systemd.user.services.wireplumber.environment.WIREPLUMBER_CONFIG_DIR = pkgs.runCommand "wireplumber-config" {} ''
|
||||
cp -a "${pkgs.wireplumber}/share/wireplumber" "$out"
|
||||
chmod +w "$out" "$out/wireplumber.conf.d"
|
||||
chmod +w "$out" "$out/main.lua.d"
|
||||
ln -s ${pkgs.fetchurl {
|
||||
url = "https://gitlab.com/postmarketOS/pmaports/-/raw/a82d8636562805d71e16e93f7571cc1f6ddbeb45/device/community/soc-qcom-sdm845/51-qcom-sdm845.conf";
|
||||
hash = "sha256-EM2I9hwTYnK5FepB4RBI5t8sIFQ/uqN5AuTwGepzjB0=";
|
||||
}} "$out/wireplumber.conf.d/51-qcom-sdm845.conf"
|
||||
url = "https://gitlab.com/postmarketOS/pmaports/-/raw/0aa9524204e9c9c002c860b87c972bc2ebf025f3/device/community/soc-qcom-sdm845/51-qcom-sdm845.lua";
|
||||
hash = "sha256-56oNJJyuZZe1Iig1xskDuyazw3PbRZtmU/YRFUTqjwk=";
|
||||
}} "$out/main.lua.d/51-qcom-sdm845.lua"
|
||||
'';
|
||||
systemd.services.wireplumber.environment.WIREPLUMBER_CONFIG_DIR = config.systemd.user.services.wireplumber.environment.WIREPLUMBER_CONFIG_DIR;*/
|
||||
networking.modemmanager.enable = !config.networking.networkmanager.enable;
|
||||
|
@ -71,7 +78,6 @@ in
|
|||
boot.kernelPackages = lib.mkForce (pkgs-kernel.linuxPackagesFor hw-kernel.linux);
|
||||
hardware.deviceTree.enable = true;
|
||||
hardware.deviceTree.name = "qcom/sdm845-oneplus-enchilada.dtb";
|
||||
systemd.services.ModemManager.serviceConfig.ExecStart = [ "" "${pkgs.modemmanager}/bin/ModemManager --test-quick-suspend-resume" ];
|
||||
# loglevel=7 console=ttyMSM0,115200 is a way to delay boot
|
||||
# see https://gitlab.freedesktop.org/drm/msm/-/issues/46
|
||||
boot.consoleLogLevel = 7;
|
||||
|
@ -104,7 +110,82 @@ in
|
|||
];
|
||||
}
|
||||
(lib.mkIf cfg.buffyboard.enable {
|
||||
boot.initrd.kernelModules = [ "uinput" "evdev" ];
|
||||
boot.initrd.extraUtilsCommands = ''
|
||||
copy_bin_and_libs ${pkgs.buffyboard}/bin/buffyboard
|
||||
cp -a ${pkgs.libinput.out}/share $out/
|
||||
'';
|
||||
boot.initrd.extraUdevRulesCommands = ''
|
||||
cp -v ${config.systemd.package}/lib/udev/rules.d/60-input-id.rules $out/
|
||||
cp -v ${config.systemd.package}/lib/udev/rules.d/60-persistent-input.rules $out/
|
||||
cp -v ${config.systemd.package}/lib/udev/rules.d/70-touchpad.rules $out/
|
||||
'';
|
||||
boot.initrd.preLVMCommands = ''
|
||||
mkdir -p /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.libinput.name}/
|
||||
ln -s "$(dirname "$(dirname "$(which buffyboard)")")"/share /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.libinput.name}/
|
||||
buffyboard 2>/dev/null &
|
||||
'';
|
||||
boot.initrd.postMountCommands = ''
|
||||
pkill -x buffyboard
|
||||
'';
|
||||
common.gettyAutologin = true;
|
||||
systemd.services.buffyboard = {
|
||||
description = "buffyboard";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.buffyboard}/bin/buffyboard";
|
||||
Restart = "always";
|
||||
RestartSec = "1";
|
||||
};
|
||||
};
|
||||
security.sudo.extraRules = [
|
||||
{ groups = [ "users" ];
|
||||
commands = [
|
||||
{ command = "/run/current-system/sw/bin/systemctl stop buffyboard"; options = [ "SETENV" "NOPASSWD" ]; }
|
||||
{ command = "/run/current-system/sw/bin/systemctl start buffyboard"; options = [ "SETENV" "NOPASSWD" ]; }
|
||||
]; }
|
||||
];
|
||||
})
|
||||
(lib.mkIf cfg.rndis.enable {
|
||||
boot.initrd.kernelModules = [ "configfs" "libcomposite" ];
|
||||
|
||||
boot.specialFileSystems = {
|
||||
"/sys/kernel/config" = {
|
||||
device = "configfs";
|
||||
fsType = "configfs";
|
||||
options = [ "nosuid" "noexec" "nodev" ];
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.preLVMCommands = ''
|
||||
mkdir -p /sys/kernel/config/usb_gadget/g1/strings/0x409
|
||||
cd /sys/kernel/config/usb_gadget/g1
|
||||
echo 0x18D1 > idVendor
|
||||
echo 0xD001 > idProduct
|
||||
echo oneplus-enchilada > strings/0x409/product
|
||||
echo NixOS > strings/0x409/manufacturer
|
||||
echo 0123456789 > strings/0x409/serialnumber
|
||||
|
||||
mkdir -p configs/c.1/strings/0x409
|
||||
echo "USB network" > configs/c.1/strings/0x409/configuration
|
||||
|
||||
mkdir -p functions/ncm.usb0 || mkdir -p functions/rndis.usb0
|
||||
ln -s functions/ncm.usb0 configs/c.1/ || ln -s functions/rndis.usb0 configs/c.1/
|
||||
|
||||
ls /sys/class/udc/ | head -n1 > UDC
|
||||
cd /
|
||||
|
||||
ifconfig rndis0 172.16.42.1 || ifconfig usb0 172.16.42.1 || ifconfig eth0 172.16.42.1
|
||||
'';
|
||||
|
||||
boot.initrd.network.enable = true;
|
||||
boot.initrd.network.udhcpc.enable = false;
|
||||
boot.initrd.network.ssh = {
|
||||
enable = true;
|
||||
port = 22;
|
||||
authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys;
|
||||
hostKeys = [ "/secrets/initrd/ssh_host_ed25519_key" "/secrets/initrd/ssh_host_rsa_key" ];
|
||||
};
|
||||
})
|
||||
(lib.mkIf cfg.adb.enable {
|
||||
boot.initrd.kernelModules = [ "configfs" "libcomposite" "g_ffs" ];
|
||||
|
|
|
@ -7,10 +7,142 @@
|
|||
let
|
||||
inherit (inputs) mobile-nixos;
|
||||
mobile-pkgs = import "${mobile-nixos}/overlay/overlay.nix" pkgs' pkgs;
|
||||
mkLinux = { linux, kernelPatches, structuredExtraConfig }: linux.override {
|
||||
in {
|
||||
inherit (mobile-pkgs) mkbootimg qrtr;
|
||||
pd-mapper = pkgs'.callPackage "${mobile-nixos}/overlay/qrtr/pd-mapper.nix" { };
|
||||
tqftpserv = pkgs'.callPackage "${mobile-nixos}/overlay/qrtr/tqftpserv.nix" { };
|
||||
rmtfs = pkgs'.callPackage "${mobile-nixos}/overlay/qrtr/rmtfs.nix" {
|
||||
inherit (mobile-pkgs) qmic;
|
||||
};
|
||||
adbd = pkgs'.callPackage "${mobile-nixos}/overlay/adbd" {
|
||||
libhybris = pkgs'.callPackage "${mobile-nixos}/overlay/libhybris" {
|
||||
inherit (mobile-pkgs) android-headers;
|
||||
};
|
||||
};
|
||||
q6voiced = pkgs.stdenv.mkDerivation {
|
||||
pname = "q6voiced";
|
||||
version = "unstable-2022-07-08";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "postmarketOS";
|
||||
repo = "q6voiced";
|
||||
rev = "736138bfc9f7b455a96679e2d67fd922a8f16464";
|
||||
hash = "sha256-7k5saedIALHlsFHalStqzKrqAyFKx0ZN9FhLTdxAmf4=";
|
||||
};
|
||||
buildInputs = with pkgs; [ dbus tinyalsa ];
|
||||
nativeBuildInputs = with pkgs; [ pkg-config ];
|
||||
buildPhase = ''cc $(pkg-config --cflags --libs dbus-1) -ltinyalsa -o q6voiced q6voiced.c'';
|
||||
installPhase = ''install -m555 -Dt "$out/bin" q6voiced'';
|
||||
meta.license = lib.licenses.mit;
|
||||
};
|
||||
|
||||
alsa-ucm-conf = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "alsa-ucm-conf-enchilada";
|
||||
version = "unstable-2022-12-08";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "sdm845-mainline";
|
||||
repo = "alsa-ucm-conf";
|
||||
rev = "aaa7889f7a6de640b4d78300e118457335ad16c0";
|
||||
hash = "sha256-2P5ZTrI1vCJ99BcZVPlkH4sv1M6IfAlaXR6ZjAdy4HQ=";
|
||||
};
|
||||
installPhase = ''
|
||||
substituteInPlace ucm2/lib/card-init.conf --replace '"/bin' '"/run/current-system/sw/bin'
|
||||
mkdir -p "$out"/share/alsa/ucm2/{OnePlus,conf.d/sdm845,lib}
|
||||
mv ucm2/lib/card-init.conf "$out/share/alsa/ucm2/lib/"
|
||||
mv ucm2/OnePlus/enchilada "$out/share/alsa/ucm2/OnePlus/"
|
||||
ln -s ../../OnePlus/enchilada/enchilada.conf "$out/share/alsa/ucm2/conf.d/sdm845/oneplus-OnePlus6-Unknown.conf"
|
||||
'';
|
||||
# to overwrite card-init.conf
|
||||
meta.priority = -10;
|
||||
};
|
||||
|
||||
uboot = pkgs.buildUBoot {
|
||||
defconfig = "qcom_defconfig";
|
||||
version = "unstable-2023-12-11";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "sdm845-mainline";
|
||||
repo = "u-boot";
|
||||
rev = "977b9279c610b862f9ef84fb3addbebb7c42166a";
|
||||
hash = "sha256-ksI7qxozIjJ5E8uAJkX8ZuaaOHdv76XOzITaA8Vp/QA=";
|
||||
};
|
||||
makeFlags = [ "DEVICE_TREE=sdm845-oneplus-enchilada" ];
|
||||
extraConfig = ''
|
||||
CONFIG_BOOTDELAY=5
|
||||
'';
|
||||
extraMeta.platforms = [ "aarch64-linux" ];
|
||||
patches = [ ];
|
||||
filesToInstall = [ "u-boot-nodtb.bin" "u-boot-dtb.bin" "u-boot.dtb" ];
|
||||
};
|
||||
|
||||
ubootImage = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "u-boot-enchilada.img";
|
||||
nativeBuildInputs = [
|
||||
# available from mobile-nixos's overlay
|
||||
pkgs'.mkbootimg
|
||||
pkgs'.gzip
|
||||
];
|
||||
src = pkgs'.ubootEnchilada;
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
installPhase = ''
|
||||
gzip u-boot-nodtb.bin
|
||||
cat u-boot.dtb >> u-boot-nodtb.bin.gz
|
||||
mkbootimg \
|
||||
--base 0x0 \
|
||||
--kernel_offset 0x8000 \
|
||||
--ramdisk_offset 0x01000000 \
|
||||
--tags_offset 0x100 \
|
||||
--pagesize 4096 \
|
||||
--kernel u-boot-nodtb.bin.gz \
|
||||
-o "$out"
|
||||
'';
|
||||
};
|
||||
|
||||
firmware = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "firmware-oneplus-sdm845";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "sdm845-mainline";
|
||||
repo = "firmware-oneplus-sdm845";
|
||||
rev = "176ca713448c5237a983fb1f158cf3a5c251d775";
|
||||
hash = "sha256-ZrBvYO+MY0tlamJngdwhCsI1qpA/2FXoyEys5FAYLj4=";
|
||||
};
|
||||
installPhase = ''
|
||||
cp -a . "$out"
|
||||
cd "$out/lib/firmware/postmarketos"
|
||||
find . -type f,l | xargs -i bash -c 'mkdir -p "$(dirname "../$1")" && mv "$1" "../$1"' -- {}
|
||||
cd "$out/usr"
|
||||
find . -type f,l | xargs -i bash -c 'mkdir -p "$(dirname "../$1")" && mv "$1" "../$1"' -- {}
|
||||
cd ..
|
||||
find "$out/lib/firmware/postmarketos" "$out/usr" | tac | xargs rmdir
|
||||
'';
|
||||
dontStrip = true;
|
||||
# not actually redistributable, but who cares
|
||||
meta.license = lib.licenses.unfreeRedistributableFirmware;
|
||||
};
|
||||
|
||||
linux = pkgs.linux_6_9.override {
|
||||
# TODO: uncomment
|
||||
# ignoreConfigErrors = false;
|
||||
inherit kernelPatches;
|
||||
kernelPatches = [
|
||||
# {
|
||||
# name = "linux_6_11";
|
||||
# patch = pkgs.fetchpatch {
|
||||
# url = "https://github.com/chayleaf/linux-sdm845/compare/v6.11-rc2...8914f1483d0784bf1133577f3c161a3f83a12653.diff";
|
||||
# hash = "sha256-orBQDGHAXOAy1PVLwNIBk3FgiMslziW1xddQyIwbnCs=";
|
||||
# };
|
||||
# }
|
||||
{
|
||||
name = "linux_6_9";
|
||||
patch = pkgs.fetchpatch {
|
||||
url = "https://github.com/chayleaf/linux-sdm845/compare/v6.9.12...1ffe541f384cdfee347bf92773a740677de1b824.diff";
|
||||
hash = "sha256-6TMiXaZy8YEB2vmrpXwAKklHYhvlA/TklCQv95iyMNY=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "config_fixes";
|
||||
patch = ./config_fixes.patch;
|
||||
# patch = ./config_fixes_611.patch;
|
||||
}
|
||||
];
|
||||
|
||||
stdenv = lib.recursiveUpdate pkgs.stdenv {
|
||||
hostPlatform.linux-kernel.extraConfig = "";
|
||||
|
@ -20,6 +152,8 @@ let
|
|||
# fix build
|
||||
LENOVO_YOGA_C630_EC = no;
|
||||
RPMSG_QCOM_GLINK_SMEM = yes;
|
||||
# TOUCHSCREEN_STM_FTS_DOWNSTREAM = no;
|
||||
# TOUCHSCREEN_FTM4 = no;
|
||||
# for adb and stuff (doesn't have to be built-in, but it's easier that way)
|
||||
USB_FUNCTIONFS = yes;
|
||||
USB_LIBCOMPOSITE = yes;
|
||||
|
@ -494,148 +628,7 @@ let
|
|||
XEN_BALLOON_MEMORY_HOTPLUG.tristate = lib.mkForce null; XEN_DOM0.tristate = lib.mkForce null; XEN_EFI.tristate = lib.mkForce null;
|
||||
XEN_HAVE_PVMMU.tristate = lib.mkForce null; XEN_MCE_LOG.tristate = lib.mkForce null; XEN_PVH.tristate = lib.mkForce null;
|
||||
XEN_PVHVM.tristate = lib.mkForce null; XEN_SAVE_RESTORE.tristate = lib.mkForce null; XEN_SYS_HYPERVISOR.tristate = lib.mkForce null;
|
||||
} // structuredExtraConfig;
|
||||
};
|
||||
in {
|
||||
inherit (mobile-pkgs) mkbootimg qrtr;
|
||||
pd-mapper = pkgs'.callPackage "${mobile-nixos}/overlay/qrtr/pd-mapper.nix" { };
|
||||
tqftpserv = pkgs'.callPackage "${mobile-nixos}/overlay/qrtr/tqftpserv.nix" { };
|
||||
rmtfs = pkgs'.callPackage "${mobile-nixos}/overlay/qrtr/rmtfs.nix" {
|
||||
inherit (mobile-pkgs) qmic;
|
||||
};
|
||||
adbd = pkgs'.callPackage "${mobile-nixos}/overlay/adbd" {
|
||||
libhybris = pkgs'.callPackage "${mobile-nixos}/overlay/libhybris" {
|
||||
inherit (mobile-pkgs) android-headers;
|
||||
};
|
||||
};
|
||||
q6voiced = pkgs.stdenv.mkDerivation {
|
||||
pname = "q6voiced";
|
||||
version = "unstable-2022-07-08";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "postmarketOS";
|
||||
repo = "q6voiced";
|
||||
rev = "736138bfc9f7b455a96679e2d67fd922a8f16464";
|
||||
hash = "sha256-7k5saedIALHlsFHalStqzKrqAyFKx0ZN9FhLTdxAmf4=";
|
||||
};
|
||||
buildInputs = with pkgs; [ dbus tinyalsa ];
|
||||
nativeBuildInputs = with pkgs; [ pkg-config ];
|
||||
buildPhase = ''cc $(pkg-config --cflags --libs dbus-1) -ltinyalsa -o q6voiced q6voiced.c'';
|
||||
installPhase = ''install -m555 -Dt "$out/bin" q6voiced'';
|
||||
meta.license = lib.licenses.mit;
|
||||
};
|
||||
|
||||
alsa-ucm-conf = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "alsa-ucm-conf-enchilada";
|
||||
version = "unstable-2022-12-08";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "sdm845-mainline";
|
||||
repo = "alsa-ucm-conf";
|
||||
rev = "aaa7889f7a6de640b4d78300e118457335ad16c0";
|
||||
hash = "sha256-2P5ZTrI1vCJ99BcZVPlkH4sv1M6IfAlaXR6ZjAdy4HQ=";
|
||||
};
|
||||
installPhase = ''
|
||||
substituteInPlace ucm2/lib/card-init.conf --replace '"/bin' '"/run/current-system/sw/bin'
|
||||
mkdir -p "$out"/share/alsa/ucm2/{OnePlus,conf.d/sdm845,lib}
|
||||
mv ucm2/lib/card-init.conf "$out/share/alsa/ucm2/lib/"
|
||||
mv ucm2/OnePlus/enchilada "$out/share/alsa/ucm2/OnePlus/"
|
||||
ln -s ../../OnePlus/enchilada/enchilada.conf "$out/share/alsa/ucm2/conf.d/sdm845/oneplus-OnePlus6-Unknown.conf"
|
||||
'';
|
||||
# to overwrite card-init.conf
|
||||
meta.priority = -10;
|
||||
};
|
||||
|
||||
uboot = pkgs.buildUBoot {
|
||||
defconfig = "qcom_defconfig";
|
||||
version = "unstable-2023-12-11";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "sdm845-mainline";
|
||||
repo = "u-boot";
|
||||
rev = "977b9279c610b862f9ef84fb3addbebb7c42166a";
|
||||
hash = "sha256-ksI7qxozIjJ5E8uAJkX8ZuaaOHdv76XOzITaA8Vp/QA=";
|
||||
};
|
||||
makeFlags = [ "DEVICE_TREE=sdm845-oneplus-enchilada" ];
|
||||
extraConfig = ''
|
||||
CONFIG_BOOTDELAY=5
|
||||
'';
|
||||
extraMeta.platforms = [ "aarch64-linux" ];
|
||||
patches = [ ];
|
||||
filesToInstall = [ "u-boot-nodtb.bin" "u-boot-dtb.bin" "u-boot.dtb" ];
|
||||
};
|
||||
|
||||
ubootImage = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "u-boot-enchilada.img";
|
||||
nativeBuildInputs = [
|
||||
# available from mobile-nixos's overlay
|
||||
pkgs'.mkbootimg
|
||||
pkgs'.gzip
|
||||
];
|
||||
src = pkgs'.ubootEnchilada;
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
installPhase = ''
|
||||
gzip u-boot-nodtb.bin
|
||||
cat u-boot.dtb >> u-boot-nodtb.bin.gz
|
||||
mkbootimg \
|
||||
--base 0x0 \
|
||||
--kernel_offset 0x8000 \
|
||||
--ramdisk_offset 0x01000000 \
|
||||
--tags_offset 0x100 \
|
||||
--pagesize 4096 \
|
||||
--kernel u-boot-nodtb.bin.gz \
|
||||
-o "$out"
|
||||
'';
|
||||
};
|
||||
|
||||
firmware = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "firmware-oneplus-sdm845";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "sdm845-mainline";
|
||||
repo = "firmware-oneplus-sdm845";
|
||||
rev = "176ca713448c5237a983fb1f158cf3a5c251d775";
|
||||
hash = "sha256-ZrBvYO+MY0tlamJngdwhCsI1qpA/2FXoyEys5FAYLj4=";
|
||||
};
|
||||
installPhase = ''
|
||||
cp -a . "$out"
|
||||
cd "$out/lib/firmware/postmarketos"
|
||||
find . -type f,l | xargs -i bash -c 'mkdir -p "$(dirname "../$1")" && mv "$1" "../$1"' -- {}
|
||||
cd "$out/usr"
|
||||
find . -type f,l | xargs -i bash -c 'mkdir -p "$(dirname "../$1")" && mv "$1" "../$1"' -- {}
|
||||
cd ..
|
||||
find "$out/lib/firmware/postmarketos" "$out/usr" | tac | xargs rmdir
|
||||
'';
|
||||
dontStrip = true;
|
||||
# not actually redistributable, but who cares
|
||||
meta.license = lib.licenses.unfreeRedistributableFirmware;
|
||||
};
|
||||
|
||||
linux = mkLinux {
|
||||
linux = pkgs.linux_testing;
|
||||
kernelPatches = [
|
||||
{ name = "linux_6_11";
|
||||
patch = pkgs.fetchpatch {
|
||||
url = "https://github.com/chayleaf/linux-sdm845/compare/v6.11-rc2...7223c2b9c8917c0e315ee7ec53cee27cc1054b16.diff";
|
||||
hash = "sha256-BxRBmB89wxXXD09FP6dZi1bsn7/fCihQRbnAUOJwEvc=";
|
||||
}; }
|
||||
{ name = "config_fixes";
|
||||
patch = ./config_fixes_611.patch; }
|
||||
];
|
||||
structuredExtraConfig = with lib.kernel; {
|
||||
TOUCHSCREEN_STM_FTS_DOWNSTREAM = no;
|
||||
TOUCHSCREEN_FTM4 = no;
|
||||
};
|
||||
};
|
||||
linux_6_9 = mkLinux {
|
||||
linux = pkgs.linux_6_9;
|
||||
kernelPatches = [
|
||||
{ name = "linux_6_9";
|
||||
patch = pkgs.fetchpatch {
|
||||
url = "https://github.com/chayleaf/linux-sdm845/compare/v6.9.12...1ffe541f384cdfee347bf92773a740677de1b824.diff";
|
||||
hash = "sha256-6TMiXaZy8YEB2vmrpXwAKklHYhvlA/TklCQv95iyMNY=";
|
||||
}; }
|
||||
{ name = "config_fixes";
|
||||
patch = ./config_fixes.patch; }
|
||||
];
|
||||
structuredExtraConfig = { };
|
||||
};
|
||||
linux_ccache = pkgs'.ccachePkgs.buildLinuxWithCcache pkgs'.hw.oneplus-enchilada.linux;
|
||||
}
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
services.logind.powerKey = "ignore";
|
||||
services.logind.powerKeyLongPress = "poweroff";
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if ((action.id.indexOf("org.freedesktop.login1.suspend" == 0)
|
||||
|| action.id.indexOf("org.freedesktop.login1.reboot" == 0)
|
||||
|| action.id.indexOf("org.freedesktop.login1.power-off" == 0)
|
||||
|| action.id.indexOf("org.freedesktop.inhibit") == 0)
|
||||
&& subject.user == "${config.common.mainUsername}")
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
'';
|
||||
|
||||
systemd.services.disable-fbcon-blink = {
|
||||
script = "echo 0 > /sys/class/graphics/fbcon/cursor_blink";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
phone.buffyboard.enable = true;
|
||||
phone.rndis.enable = true;
|
||||
common.minimal = true;
|
||||
common.binaryCache.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.sshd.enable = true;
|
||||
services.tlp.enable = true;
|
||||
users.defaultUserShell = pkgs.bash;
|
||||
|
||||
# kde connect
|
||||
networking.firewall.allowedTCPPortRanges = [
|
||||
{ from = 1714; to = 1764; }
|
||||
];
|
||||
networking.firewall.allowedUDPPortRanges = [
|
||||
{ from = 1714; to = 1764; }
|
||||
];
|
||||
|
||||
# services.xserver.displayManager.startx.enable = true;
|
||||
# services.xserver.windowManager.awesome.enable = true;
|
||||
programs.sway.enable = true;
|
||||
xdg.portal.enable = lib.mkForce false;
|
||||
xdg.portal.wlr.enable = lib.mkForce false;
|
||||
|
||||
services.upower.enable = true;
|
||||
}
|
|
@ -40,7 +40,7 @@
|
|||
"vm.swappiness" = 40;
|
||||
};
|
||||
# TODO: switch back to latest
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_testing;
|
||||
/*kernelPackages = zenKernelPackages "6.1.9" "0fsmcjsawxr32fxhpp6sgwfwwj8kqymy0rc6vh4qli42fqmwdjgv";*/
|
||||
};
|
||||
|
||||
|
@ -55,9 +55,9 @@
|
|||
hardware = {
|
||||
opentabletdriver.enable = true;
|
||||
steam-hardware.enable = true;
|
||||
graphics.enable32Bit = true;
|
||||
opengl.driSupport32Bit = true;
|
||||
# needed for sway WLR_RENDERER=vulkan
|
||||
graphics.extraPackages = with pkgs; [ vulkan-validation-layers ];
|
||||
opengl.extraPackages = with pkgs; [ vulkan-validation-layers ];
|
||||
};
|
||||
|
||||
# see modules/vfio.nix
|
||||
|
@ -81,7 +81,6 @@
|
|||
7777
|
||||
9887
|
||||
];
|
||||
networking.firewall.allowedUDPPorts = [ 27015 ];
|
||||
# kde connect
|
||||
networking.firewall.allowedTCPPortRanges = [
|
||||
{ from = 1714; to = 1764; }
|
||||
|
@ -129,7 +128,7 @@
|
|||
services.printing.drivers = [ pkgs.hplip ];
|
||||
# from nix-gaming
|
||||
services.pipewire.lowLatency = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
# 96 is mostly fine but has some xruns
|
||||
# 128 has xruns every now and then too
|
||||
quantum = 128;
|
||||
|
|
|
@ -40,8 +40,6 @@
|
|||
});
|
||||
'';
|
||||
|
||||
phone.buffyboard.enable = true;
|
||||
phone.rndis.enable = true;
|
||||
common.minimal = false;
|
||||
services.sshd.enable = true;
|
||||
services.tlp.enable = true;
|
||||
|
|
|
@ -62,24 +62,9 @@ in {
|
|||
DISABLE_REGISTRATION = true;
|
||||
REGISTER_EMAIL_CONFIRM = true;
|
||||
};
|
||||
cache = {
|
||||
ADAPTER = "redis";
|
||||
HOST = "redis+socket://${config.services.redis.servers.forgejo.unixSocket}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.forgejo = {
|
||||
wants = [ "redis-forgejo.service" ];
|
||||
after = [ "redis-forgejo.service" ];
|
||||
};
|
||||
|
||||
users.users.forgejo.extraGroups = [ config.services.redis.servers.forgejo.user ];
|
||||
|
||||
services.redis.servers.forgejo = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."cloud.${cfg.domainName}" = {
|
||||
quic = true;
|
||||
enableACME = true;
|
||||
|
@ -97,7 +82,6 @@ in {
|
|||
dbtype = "pgsql";
|
||||
dbhost = "/run/postgresql";
|
||||
};
|
||||
phpOptions."opcache.interned_strings_buffer" = "16";
|
||||
settings.overwriteprotocol = "https";
|
||||
hostName = "cloud.${cfg.domainName}";
|
||||
https = true;
|
||||
|
|
|
@ -106,7 +106,6 @@ in {
|
|||
nix.settings.allowed-users = [ "nix-serve" "harmonia" ] ++ lib.optionals config.services.hydra.enable [ "hydra" "hydra-www" ];
|
||||
# make sure only hydra has access to this file
|
||||
# so normal nix evals don't have access to builtins
|
||||
# nix.checkConfig = false;
|
||||
nix.settings.extra-builtins-file = "/secrets/nixos/extra-builtins.nix";
|
||||
# required for hydra which uses restricted mode
|
||||
nix.settings.allowed-uris = [
|
||||
|
@ -168,7 +167,7 @@ in {
|
|||
maxJobs = 2;
|
||||
# TODO: switch to ssh-ng https://github.com/NixOS/hydra/issues/688
|
||||
protocol = "ssh";
|
||||
systems = [ "x86_64-linux" "i686-linux" ];
|
||||
systems = [ "x86_64-linux" ];
|
||||
supportedFeatures = [ "benchmark" "big-parallel" "ca-derivations" "kvm" "nixos-test" ];
|
||||
# hydra-queue-runner must have read access to this
|
||||
sshKey = "/secrets/hydra-builder-key";
|
||||
|
@ -182,7 +181,6 @@ in {
|
|||
systemd.services.nix-daemon.serviceConfig.Nice = "19";
|
||||
nix.daemonCPUSchedPolicy = "idle";
|
||||
nix.daemonIOSchedClass = "idle";
|
||||
common.useNixPlugins = true;
|
||||
systemd.services.hydra-evaluator = lib.mkIf config.services.hydra.enable {
|
||||
# https://github.com/NixOS/hydra/issues/1186
|
||||
environment.GC_DONT_GC = "1";
|
||||
|
@ -283,13 +281,7 @@ in {
|
|||
job_name = "local_medium_freq";
|
||||
scrape_interval = "15m";
|
||||
static_configs = [ {
|
||||
targets = [
|
||||
"127.0.0.1:9548"
|
||||
"127.0.0.1:9198"
|
||||
(let cfg = config.services.matrix-appservice-discord.settings.metrics;
|
||||
in "${lib.quoteListenAddr cfg.host}:${toString cfg.port}")
|
||||
config.services.matrix-sliding-sync.settings.SYNCV3_PROM
|
||||
];
|
||||
targets = [ "127.0.0.1:9548" "127.0.0.1:9198" "127.0.0.1:9173" ];
|
||||
labels.machine = "server";
|
||||
} ];
|
||||
}
|
||||
|
@ -365,17 +357,12 @@ in {
|
|||
}
|
||||
];
|
||||
};
|
||||
# don't mess with my dns god damn it
|
||||
services.resolved.enable = false;
|
||||
# TODO: enable
|
||||
services.matrix-appservice-discord.settings.metrics = {
|
||||
enable = true;
|
||||
host = "127.0.0.1";
|
||||
port = 9173;
|
||||
};
|
||||
services.matrix-sliding-sync = {
|
||||
settings.SYNCV3_PROM = "[::]:8011";
|
||||
};
|
||||
services.matrix-synapse.settings = {
|
||||
enable_metrics = true;
|
||||
federation_metrics_domains = [ "matrix.org" ];
|
||||
|
|
|
@ -27,11 +27,6 @@ in {
|
|||
hostName = "mail.${cfg.domainName}";
|
||||
maxAttachmentSize = 100;
|
||||
plugins = [ "persistent_login" ];
|
||||
extraConfig = ''
|
||||
$config['smtp_server'] = "tls://${config.mailserver.fqdn}";
|
||||
$config['smtp_user'] = "%u";
|
||||
$config['smtp_pass'] = "%p";
|
||||
'';
|
||||
};
|
||||
mailserver = {
|
||||
enable = true;
|
||||
|
|
|
@ -11,7 +11,6 @@ let
|
|||
matrixClientJson = {
|
||||
"m.homeserver".base_url = "https://matrix.${cfg.domainName}";
|
||||
"m.identity_server".base_url = "https://vector.im";
|
||||
"org.matrix.msc3575.proxy".url = "https://matrix.${cfg.domainName}";
|
||||
};
|
||||
matrixServerConfigResponse = ''
|
||||
add_header Content-Type application/json;
|
||||
|
@ -42,8 +41,7 @@ in {
|
|||
locations = {
|
||||
"= /.well-known/matrix/server".extraConfig = matrixServerConfigResponse;
|
||||
"= /.well-known/matrix/client".extraConfig = matrixClientConfigResponse;
|
||||
"~ ^/(_matrix(?!/maubot)|_synapse/client|$)".proxyPass = "http://${lib.quoteListenAddr matrixAddr}:${toString matrixPort}";
|
||||
"~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/)".proxyPass = "http://${config.services.matrix-sliding-sync.settings.SYNCV3_BINDADDR}";
|
||||
"/".proxyPass = "http://${lib.quoteListenAddr matrixAddr}:${toString matrixPort}";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -73,12 +71,9 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ matrix-synapse-tools.rust-synapse-compress-state ];
|
||||
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
extraConfigFiles = [ "/var/lib/matrix-synapse/config.yaml" ];
|
||||
log.root.level = "WARNING";
|
||||
settings = {
|
||||
app_service_config_files = [
|
||||
"/var/lib/heisenbridge/registration.yml"
|
||||
|
@ -114,13 +109,4 @@ in {
|
|||
}];
|
||||
};
|
||||
};
|
||||
|
||||
services.matrix-sliding-sync = {
|
||||
enable = true;
|
||||
environmentFile = "/secrets/sliding-sync/env";
|
||||
settings = {
|
||||
SYNCV3_BINDADDR = "[::]:8010";
|
||||
SYNCV3_SERVER = "https://matrix.pavluk.org";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ in {
|
|||
services.nginx.virtualHosts."matrix.${cfg.domainName}".locations = let
|
||||
inherit (config.services.maubot) settings;
|
||||
in {
|
||||
"^~ /_matrix/maubot/" = {
|
||||
"/_matrix/maubot/" = {
|
||||
proxyPass = "http://${lib.quoteListenAddr settings.server.hostname}:${toString settings.server.port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.phone;
|
||||
in
|
||||
{
|
||||
options.phone.buffyboard = {
|
||||
enable = lib.mkEnableOption "buffyboard";
|
||||
};
|
||||
config = lib.mkIf cfg.buffyboard.enable {
|
||||
boot.initrd.kernelModules = [ "uinput" "evdev" ];
|
||||
boot.initrd.extraUtilsCommands = ''
|
||||
copy_bin_and_libs ${pkgs.buffyboard}/bin/buffyboard
|
||||
cp -a ${pkgs.libinput.out}/share $out/
|
||||
'';
|
||||
boot.initrd.extraUdevRulesCommands = ''
|
||||
cp -v ${config.systemd.package}/lib/udev/rules.d/60-input-id.rules $out/
|
||||
cp -v ${config.systemd.package}/lib/udev/rules.d/60-persistent-input.rules $out/
|
||||
cp -v ${config.systemd.package}/lib/udev/rules.d/70-touchpad.rules $out/
|
||||
'';
|
||||
boot.initrd.preLVMCommands = ''
|
||||
mkdir -p /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.libinput.name}/
|
||||
ln -s "$(dirname "$(dirname "$(which buffyboard)")")"/share /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-${pkgs.libinput.name}/
|
||||
buffyboard 2>/dev/null &
|
||||
'';
|
||||
boot.initrd.postMountCommands = ''
|
||||
pkill -x buffyboard
|
||||
'';
|
||||
systemd.services.buffyboard = {
|
||||
description = "buffyboard";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.buffyboard}/bin/buffyboard";
|
||||
Restart = "always";
|
||||
RestartSec = "1";
|
||||
};
|
||||
};
|
||||
security.sudo.extraRules = [
|
||||
{ groups = [ "users" ];
|
||||
commands = [
|
||||
{ command = "/run/current-system/sw/bin/systemctl stop buffyboard"; options = [ "SETENV" "NOPASSWD" ]; }
|
||||
{ command = "/run/current-system/sw/bin/systemctl start buffyboard"; options = [ "SETENV" "NOPASSWD" ]; }
|
||||
]; }
|
||||
];
|
||||
};
|
||||
}
|
|
@ -17,15 +17,6 @@ in {
|
|||
default = true;
|
||||
description = "whether this is a minimal (no DE/WM) system";
|
||||
};
|
||||
useNixPlugins = mkOption {
|
||||
type = types.bool;
|
||||
default = !cfg.minimal;
|
||||
};
|
||||
binaryCache.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = !cfg.minimal;
|
||||
description = "enable binary cache";
|
||||
};
|
||||
mainUsername = mkOption {
|
||||
type = types.str;
|
||||
default = "user";
|
||||
|
@ -67,11 +58,31 @@ in {
|
|||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
package = pkgs.nixForNixPlugins;
|
||||
extraOptions = ''
|
||||
plugin-files = ${pkgs.nix-plugins.override { nix = config.nix.package; }}/lib/nix/plugins/libnix-extra-builtins.so
|
||||
'';
|
||||
};
|
||||
systemd.services.nix-daemon.serviceConfig.LimitSTACKSoft = "infinity";
|
||||
nix.daemonCPUSchedPolicy = lib.mkDefault "idle";
|
||||
nix.daemonIOSchedClass = lib.mkDefault "idle";
|
||||
|
||||
# registry is used for the new flaky nix command
|
||||
nix.registry =
|
||||
builtins.mapAttrs
|
||||
(_: v: { flake = v; })
|
||||
(lib.filterAttrs (_: v: v?outputs) inputs);
|
||||
|
||||
# add import'able flake inputs (like nixpkgs) to nix path
|
||||
# nix path is used for old nix commands (like nix-build, nix-shell)
|
||||
environment.etc = lib.mapAttrs'
|
||||
(name: value: {
|
||||
name = "nix/inputs/${name}";
|
||||
value.source = value.outPath or "${value}";
|
||||
})
|
||||
(lib.filterAttrs (_: v: builtins.pathExists "${v}/default.nix") inputs);
|
||||
nix.nixPath = [ "/etc/nix/inputs" ];
|
||||
|
||||
boot.kernelParams = lib.optionals (cfg.resolution != null) [
|
||||
"consoleblank=60"
|
||||
] ++ lib.optionals (cfg.resolution == "1920x1080") [
|
||||
|
@ -110,7 +121,7 @@ in {
|
|||
rsync
|
||||
tmux
|
||||
wget
|
||||
] ++ lib.optionals (!builtins.elem pkgs.system ["armv7l-linux"]) [
|
||||
|
||||
kitty.terminfo
|
||||
foot.terminfo
|
||||
# rxvt-unicode-unwrapped.terminfo
|
||||
|
@ -124,30 +135,11 @@ in {
|
|||
# nixos-hardware uses mkDefault here, so we use slightly higher priority
|
||||
services.libinput.enable = mkForceDefault (!cfg.minimal);
|
||||
programs.fuse.userAllowOther = true;
|
||||
|
||||
# registry is used for the new flaky nix command
|
||||
nix.registry =
|
||||
builtins.mapAttrs
|
||||
(_: v: { flake = v; })
|
||||
(lib.filterAttrs (k: v: (k != "self" || !cfg.minimal) && v?outputs) inputs);
|
||||
|
||||
# add import'able flake inputs (like nixpkgs) to nix path
|
||||
# nix path is used for old nix commands (like nix-build, nix-shell)
|
||||
environment.etc = lib.mapAttrs'
|
||||
(name: value: {
|
||||
name = "nix/inputs/${name}";
|
||||
value.source = value.outPath or "${value}";
|
||||
})
|
||||
(lib.filterAttrs (k: v: (k != "self" || !cfg.minimal) && builtins.pathExists "${v}/default.nix") inputs);
|
||||
|
||||
}
|
||||
|
||||
(lib.mkIf cfg.gettyAutologin {
|
||||
# autologin once after boot
|
||||
# --skip-login means directly call login instead of first asking for username
|
||||
# (normally login asks for username too, but getty prefers to do it by itself for whatever reason)
|
||||
services.getty.extraArgs = [ "--skip-login" ];
|
||||
services.getty.loginProgram = let
|
||||
services.getty.extraArgs = lib.mkIf cfg.gettyAutologin [ "--skip-login" ];
|
||||
services.getty.loginProgram = lib.mkIf cfg.gettyAutologin (let
|
||||
lockfile = "/tmp/login-once.lock";
|
||||
in with pkgs; writeShellScript "login-once" ''
|
||||
if [ -f '${lockfile}' ]; then
|
||||
|
@ -156,8 +148,8 @@ in {
|
|||
${coreutils}/bin/touch '${lockfile}'
|
||||
exec ${shadow}/bin/login -f user
|
||||
fi
|
||||
'';
|
||||
})
|
||||
'');
|
||||
}
|
||||
|
||||
(lib.mkIf cfg.minimal {
|
||||
programs.fish.interactiveShellInit = ''
|
||||
|
@ -177,7 +169,7 @@ in {
|
|||
# conflicts with bash module's mkDefault
|
||||
# only override on minimal systems because on non-minimal systems
|
||||
# my fish config doesn't work well in fb/drm console
|
||||
users.defaultUserShell = mkForceDefault pkgs.fish;
|
||||
users.defaultUserShell = lib.mkIf cfg.minimal (mkForceDefault pkgs.fish);
|
||||
|
||||
programs.vim = {
|
||||
enable = lib.mkDefault true;
|
||||
|
@ -199,7 +191,9 @@ in {
|
|||
})
|
||||
|
||||
(lib.mkIf (!cfg.minimal) {
|
||||
nix.nixPath = [ "/etc/nix/inputs" ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
unixtools.xxd
|
||||
];
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = lib.mkDefault true;
|
||||
|
@ -212,20 +206,7 @@ in {
|
|||
security.rtkit.enable = true;
|
||||
services.dbus.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
})
|
||||
|
||||
(lib.mkIf (!cfg.useNixPlugins) {
|
||||
nix.package = pkgs.unpatchedNixForNixPlugins;
|
||||
})
|
||||
(lib.mkIf cfg.useNixPlugins {
|
||||
nix.package = pkgs.nixForNixPlugins;
|
||||
nix.settings.plugin-files-2 = "${pkgs.nix-plugins.override { nix = config.nix.package; }}/lib/nix/plugins/libnix-extra-builtins.so";
|
||||
environment.systemPackages = with pkgs; [
|
||||
unixtools.xxd
|
||||
];
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.binaryCache.enable {
|
||||
nix.settings = {
|
||||
netrc-file = "/secrets/netrc";
|
||||
substituters = [
|
||||
|
|
|
@ -133,12 +133,9 @@ in {
|
|||
{ directory = /var/lib/${config.services.prometheus.stateDir}; user = "prometheus"; group = "prometheus"; mode = "0755"; }
|
||||
] ++ lib.optionals (config.services.qbittorrent-nox.enable or false) [
|
||||
{ directory = /var/lib/qbittorrent-nox; mode = "0755"; }
|
||||
] ++ (lib.mapAttrsToList
|
||||
(k: v: let
|
||||
name = if k == "" then "redis" else "redis-${k}";
|
||||
in { directory = /var/lib/${name}; inherit (v) user; group = v.user; mode = "0700"; })
|
||||
(lib.filterAttrs (k: v: v.enable or false) config.services.redis.servers))
|
||||
++ lib.optionals config.services.roundcube.enable [
|
||||
] ++ lib.optionals (config.services.redis.servers.rspamd.enable or false) [
|
||||
{ directory = /var/lib/redis-rspamd; user = "redis-rspamd"; group = "redis-rspamd"; mode = "0700"; }
|
||||
] ++ lib.optionals config.services.roundcube.enable [
|
||||
{ directory = /var/lib/roundcube; user = "roundcube"; group = "roundcube"; mode = "0700"; }
|
||||
] ++ lib.optionals config.services.rspamd.enable [
|
||||
{ directory = /var/lib/rspamd; user = "rspamd"; group = "rspamd"; mode = "0700"; }
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.phone;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
phone.rndis.enable = lib.mkEnableOption "rndis";
|
||||
};
|
||||
config = lib.mkIf cfg.rndis.enable {
|
||||
boot.initrd.kernelModules = [ "configfs" "libcomposite" ];
|
||||
boot.initrd.availableKernelModules = [ "usb_f_rndis" "usb_f_ncm" ];
|
||||
|
||||
boot.specialFileSystems = {
|
||||
"/sys/kernel/config" = {
|
||||
device = "configfs";
|
||||
fsType = "configfs";
|
||||
options = [ "nosuid" "noexec" "nodev" ];
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.preLVMCommands = ''
|
||||
if ! mountpoint /sys/kernel/config; then
|
||||
specialMount configfs /sys/kernel/config nosuid,noexec,nodev configfs
|
||||
fi
|
||||
mkdir -p /sys/kernel/config/usb_gadget/g1/strings/0x409
|
||||
cd /sys/kernel/config/usb_gadget/g1
|
||||
echo 0x18D1 > idVendor
|
||||
echo 0xD001 > idProduct
|
||||
echo nixos-device > strings/0x409/product
|
||||
echo NixOS > strings/0x409/manufacturer
|
||||
echo 0123456789 > strings/0x409/serialnumber
|
||||
|
||||
mkdir -p configs/c.1/strings/0x409
|
||||
echo "USB network" > configs/c.1/strings/0x409/configuration
|
||||
|
||||
mkdir -p functions/ncm.usb0 || mkdir -p functions/rndis.usb0
|
||||
ln -s functions/ncm.usb0 configs/c.1/ || ln -s functions/rndis.usb0 configs/c.1/
|
||||
|
||||
ls /sys/class/udc/ | head -n1 > UDC
|
||||
cd /
|
||||
|
||||
ifconfig rndis0 172.16.42.1 || ifconfig usb0 172.16.42.1 || ifconfig eth0 172.16.42.1
|
||||
'';
|
||||
|
||||
boot.initrd.network.enable = true;
|
||||
boot.initrd.network.udhcpc.enable = false;
|
||||
};
|
||||
}
|
|
@ -151,7 +151,7 @@ in {
|
|||
'')
|
||||
cfg.lookingGlass.ivshmem));
|
||||
hardware = {
|
||||
graphics.enable = true;
|
||||
opengl.enable = true;
|
||||
} // lib.optionalAttrs (cfg.enable && !cfg.nvidiaGpu && options?hardware.amdgpu.loadInInitrd) {
|
||||
# disable early KMS so GPU can be properly unbound
|
||||
# can't use mkif because the option may not even exist
|
||||
|
|
Loading…
Reference in a new issue