Compare commits
No commits in common. "0e2da1abc73e523f78a269273a8a5e600f0e7f55" and "f0c596aaf14b3d4884f1ede8667afacb412122af" have entirely different histories.
0e2da1abc7
...
f0c596aaf1
96
flake.lock
96
flake.lock
|
@ -25,16 +25,17 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718207749,
|
||||
"narHash": "sha256-eay4Vw1V8HDOJvWw9V4wPp97j3EYIHmUFcB3tCkejX4=",
|
||||
"lastModified": 1715922722,
|
||||
"narHash": "sha256-OhV4fwcVNHpztKPML03mGmOFkYQnkctEr/ckOI8uKzc=",
|
||||
"owner": "chayleaf",
|
||||
"repo": "coop-fd",
|
||||
"rev": "8a8d6d2ae8583d5ee302ded5e3604726718125d2",
|
||||
"rev": "442f5d91bebffbf3e7c83723e9bcda87d0adee52",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "chayleaf",
|
||||
"repo": "coop-fd",
|
||||
"rev": "442f5d91bebffbf3e7c83723e9bcda87d0adee52",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
@ -112,11 +113,11 @@
|
|||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717285511,
|
||||
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
|
||||
"lastModified": 1712014858,
|
||||
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
|
||||
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -204,11 +205,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717896375,
|
||||
"narHash": "sha256-qI8f1XSFo1X29+RSVmYo5hDAMKKULnpmIZbRl77u21A=",
|
||||
"lastModified": 1712452624,
|
||||
"narHash": "sha256-R35K+4krhK5B2fcV6W2HFe/uhXmP8YGTb35uZ+nDAxw=",
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"rev": "6ed58348c20bab127555a3645e832591d2611f0c",
|
||||
"rev": "06314bbf8fedd83c7253442994a2f0c81d47988e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -224,11 +225,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717919703,
|
||||
"narHash": "sha256-4i/c31+dnpv6KdUA3BhbMDS9Lvg/CDin78caYJlq0bY=",
|
||||
"lastModified": 1712459390,
|
||||
"narHash": "sha256-e12bNDottaGoBgd0AdH/bQvk854xunlWAdZwr/oHO1c=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "a157a81d0a4bc909b2b6666dd71909bcdc8cd0d6",
|
||||
"rev": "4676d72d872459e1e3a248d049609f110c570e9a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -239,11 +240,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1717828156,
|
||||
"narHash": "sha256-YvstO0lobf3JWQuAfZCLYRTROC2ZDEgtWeQtWbO49p4=",
|
||||
"lastModified": 1712760404,
|
||||
"narHash": "sha256-4zhaEW1nB+nGbCNMjOggWeY5nXs/H0Y71q0+h+jdxoU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "057a7996d012f342a38a26261ee529cebb1755ef",
|
||||
"rev": "e1c4bac14beb8c409d0534382cf967171706b9d9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -262,11 +263,11 @@
|
|||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717515088,
|
||||
"narHash": "sha256-nWOLpPA7+k7V1OjXTuxdsVd5jeeI0b13Di57wvnqkic=",
|
||||
"lastModified": 1710449465,
|
||||
"narHash": "sha256-2orO8nfplp6uQJBFqKkj1iyNMC6TysmwbWwbb4osTag=",
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"repo": "nixos-mailserver",
|
||||
"rev": "0d51a32e4799d081f260eb4db37145f5f4ee7456",
|
||||
"rev": "79c8cfcd5873a85559da6201b116fb38b490d030",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
|
@ -297,11 +298,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1717922286,
|
||||
"narHash": "sha256-RsV7rNWYceglPDVgVukwYfoYK2fuAgyvyvSE/Gyah+Y=",
|
||||
"lastModified": 1717670519,
|
||||
"narHash": "sha256-4p8B6Iv55BUG+d4ZJRUBhx70yWnqYlJ2EGSxx3dk4nc=",
|
||||
"owner": "chayleaf",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "47c40a60d0952cd6b86c171898870142b0747602",
|
||||
"rev": "411826c44e54583b30f767d76489e37dabf1707c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -310,32 +311,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-kernel": {
|
||||
"locked": {
|
||||
"lastModified": 1717974879,
|
||||
"narHash": "sha256-GTO3C88+5DX171F/gVS3Qga/hOs/eRMxPFpiHq2t+D8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c7b821ba2e1e635ba5a76d299af62821cbcb09f3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1717284937,
|
||||
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
|
||||
"dir": "lib",
|
||||
"lastModified": 1711703276,
|
||||
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
|
||||
"dir": "lib",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"notlua": {
|
||||
|
@ -345,11 +336,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718058511,
|
||||
"narHash": "sha256-OjkGD9v9hfgIkToZXoXFzvBlXQg5Dp4+dmpZUATGYdA=",
|
||||
"lastModified": 1697413333,
|
||||
"narHash": "sha256-2nmu/+QhR/VhxFFr54l0Ok/yVhLCrrYVuTgeD4LHEhE=",
|
||||
"owner": "chayleaf",
|
||||
"repo": "notlua",
|
||||
"rev": "a8e09538d284f35aad88e1adc9c044f4163eadf8",
|
||||
"rev": "ef7cdb7a883fe87238c9fff13bc14ad1fd06f4ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -380,11 +371,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1717921035,
|
||||
"narHash": "sha256-TxZv3M3M2EromaaJCbRKWWjrnk9DSeJ139K4DkJlhAg=",
|
||||
"lastModified": 1712785619,
|
||||
"narHash": "sha256-1RCStMZUGqus3DAl7jivw7XM5jpbecfqWtA1r45Ts90=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "02f829e2432d4204370445272084ce22761ba4bc",
|
||||
"rev": "a0471f14e0499a66898fc1c7d5aff259a9fa58b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -406,7 +397,6 @@
|
|||
"nixos-mailserver": "nixos-mailserver",
|
||||
"nixos-router": "nixos-router",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-kernel": "nixpkgs-kernel",
|
||||
"notlua": "notlua",
|
||||
"notnft": "notnft",
|
||||
"nur": "nur",
|
||||
|
@ -421,11 +411,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717899611,
|
||||
"narHash": "sha256-9Z95F8lnY/5sOf7Z4IdABKz1ulB0ueNrZU864rQj280=",
|
||||
"lastModified": 1712715149,
|
||||
"narHash": "sha256-uOx7GaLV+5hekAYtm/CBr627Pi7+d1Yh70hwKmVjYYo=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "1f536afad5c18ea4ae6bb592c3fef038e1e33568",
|
||||
"rev": "9ef1eca23bee5fb8080863909af3802130b2ee57",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
37
flake.nix
37
flake.nix
|
@ -4,7 +4,6 @@
|
|||
inputs = {
|
||||
#nixpkgs.url = "github:NixOS/nixpkgs/3dc2b4f8166f744c3b3e9ff8224e7c5d74a5424f";
|
||||
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-kernel.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:chayleaf/nixpkgs";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
nix-index-database = {
|
||||
|
@ -23,7 +22,7 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
coop-fd = {
|
||||
url = "github:chayleaf/coop-fd";
|
||||
url = "github:chayleaf/coop-fd/442f5d91bebffbf3e7c83723e9bcda87d0adee52";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
|
@ -95,32 +94,30 @@
|
|||
# extended 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) ({
|
||||
overlay' = args: self: super: import ./pkgs ({
|
||||
pkgs = super;
|
||||
pkgs' = self;
|
||||
lib = super.lib;
|
||||
inherit inputs;
|
||||
} // args);
|
||||
overlay = overlay' { };
|
||||
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 nixpkgs (config // {
|
||||
overlays = config.overlays or [ ] ++ all-overlays;
|
||||
overlays = config.overlays or [ ] ++ [ overlay ];
|
||||
});
|
||||
# this is actual config, it gets processed below
|
||||
config = let
|
||||
mkBpiR3 = args: config: config // {
|
||||
system = "aarch64-linux";
|
||||
modules = config.modules or [ ] ++ [
|
||||
(import ./system/devices/bpi-r3-router.nix args)
|
||||
];
|
||||
modules = config.modules or [ ] ++ [ (import ./system/devices/bpi-r3-router.nix args) ];
|
||||
};
|
||||
routerConfig = rec {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
{ _module.args.server-config = self.nixosConfigurations.server.config;
|
||||
_module.args.notnft = inputs.notnft.lib.${system}; }
|
||||
{
|
||||
_module.args.server-config = self.nixosConfigurations.server.config;
|
||||
_module.args.notnft = inputs.notnft.lib.${system};
|
||||
}
|
||||
inputs.nixos-router.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
@ -153,10 +150,7 @@
|
|||
};
|
||||
|
||||
in {
|
||||
overlays = {
|
||||
default = overlay;
|
||||
nix-plugins = nix-plugins-overlay;
|
||||
};
|
||||
overlays.default = overlay;
|
||||
packages = lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
|
@ -193,16 +187,13 @@
|
|||
inherit inputs lib;
|
||||
hardware = inputs.nixos-hardware.nixosModules;
|
||||
} // args.specialArgs or { };
|
||||
modules = [
|
||||
{ _module.args = {
|
||||
pkgs-kernel = import inputs.nixpkgs-kernel { inherit (args) system; overlays = all-overlays; };
|
||||
}; }
|
||||
modules = args.modules or [ ]
|
||||
++ [
|
||||
(getPrivSys hostname)
|
||||
{ networking.hostName = lib.mkDefault hostname;
|
||||
nixpkgs.overlays = all-overlays; }
|
||||
nixpkgs.overlays = [ overlay ]; }
|
||||
inputs.impermanence.nixosModule
|
||||
]
|
||||
++ args.modules or [ ]
|
||||
++ map (x: ./system/modules/${x}) (builtins.attrNames (builtins.readDir ./system/modules))
|
||||
# the following is NixOS home-manager module configuration. Currently unused, but I might start using it for some hosts later.
|
||||
++ lib.optionals (home != { } && home.common.enableNixosModule or false) [
|
||||
|
@ -216,7 +207,7 @@
|
|||
{ nixpkgs = home.common.nixpkgs or { };
|
||||
nix = home.common.nix or { }; }
|
||||
({ config, pkgs, lib, ...}: {
|
||||
nixpkgs.overlays = all-overlays;
|
||||
nixpkgs.overlays = [ overlay ];
|
||||
nix.package = lib.mkDefault pkgs.nixForNixPlugins; })
|
||||
(getPrivUser hostname username)
|
||||
];
|
||||
|
@ -245,7 +236,7 @@
|
|||
++ [
|
||||
(getPrivUser hostname user)
|
||||
({ pkgs, lib, ... }: {
|
||||
nixpkgs.overlays = all-overlays;
|
||||
nixpkgs.overlays = [ overlay ];
|
||||
nix.package = lib.mkDefault pkgs.nixForNixPlugins;
|
||||
})
|
||||
];
|
||||
|
|
|
@ -62,9 +62,9 @@
|
|||
openrgb piper
|
||||
steam-run steam
|
||||
# faf-client
|
||||
#(osu-lazer-bin.override {
|
||||
#command_prefix = "env SDL_VIDEODRIVER=wayland ${obs-studio-plugins.obs-vkcapture}/bin/obs-gamecapture";
|
||||
#})
|
||||
(osu-lazer-bin.override {
|
||||
command_prefix = "env SDL_VIDEODRIVER=wayland ${obs-studio-plugins.obs-vkcapture}/bin/obs-gamecapture";
|
||||
})
|
||||
taisei
|
||||
techmino
|
||||
(wrapOBS {
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
text/html; ${pkgs.w3m}/bin/w3m -dump -o document_charset=%{charset} -o display_link_number=1 '%s'; nametemplate=%s.html; copiousoutput
|
||||
'';
|
||||
|
||||
home.file.".cache/nix-index/files".source = assert config.xdg.cacheHome == "${config.home.homeDirectory}/.cache"; inputs.nix-index-database.packages.${pkgs.system}.nix-index-database;
|
||||
home.file.".cache/nix-index/files".source = assert config.xdg.cacheHome == "${config.home.homeDirectory}/.cache"; inputs.nix-index-database.legacyPackages.${pkgs.system}.database;
|
||||
|
||||
systemd.user.tmpfiles.rules = builtins.map (file: "r! \"/home/${config.home.username}/${file}\"") [
|
||||
".local/share/clipman.json"
|
||||
|
|
|
@ -80,7 +80,6 @@
|
|||
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
|
||||
|
@ -434,7 +433,6 @@
|
|||
pylsp = {
|
||||
settings = {
|
||||
pylsp.plugins.pylsp_mypy.enabled = true;
|
||||
pylsp.plugins.black.enabled = true;
|
||||
};
|
||||
};
|
||||
svelte = { };
|
||||
|
|
|
@ -22,24 +22,24 @@
|
|||
"pinned": false,
|
||||
"src": {
|
||||
"name": null,
|
||||
"sha256": "sha256-4jh3mDm1GpR9tQBkzx9BRsJ5awNrBgRzylyRB04LqIE=",
|
||||
"sha256": "sha256-wCIffeayOy3kEwmIKB7e+NrliuSpKXoVYC334fxVB3U=",
|
||||
"type": "url",
|
||||
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-7/GE-Proton9-7.tar.gz"
|
||||
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-1/GE-Proton9-1.tar.gz"
|
||||
},
|
||||
"version": "GE-Proton9-7"
|
||||
"version": "GE-Proton9-1"
|
||||
},
|
||||
"searxng": {
|
||||
"cargoLocks": null,
|
||||
"date": "2024-06-07",
|
||||
"date": "2024-03-15",
|
||||
"extract": null,
|
||||
"name": "searxng",
|
||||
"passthru": null,
|
||||
"pinned": false,
|
||||
"src": {
|
||||
"sha256": "sha256-WWbpfZZei3kOdN607/J2M1oSzbPZKaLbsU5gO2kIc90=",
|
||||
"sha256": "sha256-BqVnp/lByAMr/LOCGkuXCYsomu9hRBGXK3DbBQX10TA=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/searxng/searxng/archive/f5eb56b63f250c7804e5e1cf4426e550bc933906.tar.gz"
|
||||
"url": "https://github.com/searxng/searxng/archive/e2af3e49702f6fb40e1614f826544dc3b03bca2f.tar.gz"
|
||||
},
|
||||
"version": "f5eb56b63f250c7804e5e1cf4426e550bc933906"
|
||||
"version": "e2af3e49702f6fb40e1614f826544dc3b03bca2f"
|
||||
}
|
||||
}
|
|
@ -12,19 +12,19 @@
|
|||
};
|
||||
proton-ge = {
|
||||
pname = "proton-ge";
|
||||
version = "GE-Proton9-7";
|
||||
version = "GE-Proton9-1";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-7/GE-Proton9-7.tar.gz";
|
||||
sha256 = "sha256-4jh3mDm1GpR9tQBkzx9BRsJ5awNrBgRzylyRB04LqIE=";
|
||||
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton9-1/GE-Proton9-1.tar.gz";
|
||||
sha256 = "sha256-wCIffeayOy3kEwmIKB7e+NrliuSpKXoVYC334fxVB3U=";
|
||||
};
|
||||
};
|
||||
searxng = {
|
||||
pname = "searxng";
|
||||
version = "f5eb56b63f250c7804e5e1cf4426e550bc933906";
|
||||
version = "e2af3e49702f6fb40e1614f826544dc3b03bca2f";
|
||||
src = fetchTarball {
|
||||
url = "https://github.com/searxng/searxng/archive/f5eb56b63f250c7804e5e1cf4426e550bc933906.tar.gz";
|
||||
sha256 = "sha256-WWbpfZZei3kOdN607/J2M1oSzbPZKaLbsU5gO2kIc90=";
|
||||
url = "https://github.com/searxng/searxng/archive/e2af3e49702f6fb40e1614f826544dc3b03bca2f.tar.gz";
|
||||
sha256 = "sha256-BqVnp/lByAMr/LOCGkuXCYsomu9hRBGXK3DbBQX10TA=";
|
||||
};
|
||||
date = "2024-06-07";
|
||||
date = "2024-03-15";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ let
|
|||
sources = import ./_sources/generated.nix {
|
||||
inherit (pkgs) fetchgit fetchurl fetchFromGitHub dockerTools;
|
||||
};
|
||||
nixForNixPlugins = pkgs.nixVersions.nix_2_18;
|
||||
nur = import inputs.nur {
|
||||
inherit pkgs;
|
||||
nurpkgs = pkgs;
|
||||
|
@ -19,7 +20,91 @@ in
|
|||
|
||||
{
|
||||
inherit (inputs.nix-gaming.packages.${pkgs.system}) faf-client osu-lazer-bin;
|
||||
matrix-appservice-discord = pkgs.callPackage ./matrix-appservice-discord { inherit (pkgs) matrix-appservice-discord; };
|
||||
inherit nixForNixPlugins;
|
||||
nix = nixForNixPlugins;
|
||||
nixVersions = pkgs.nixVersions // {
|
||||
stable = nixForNixPlugins;
|
||||
unstable = nixForNixPlugins;
|
||||
};
|
||||
matrix-appservice-discord = pkgs.matrix-appservice-discord.overrideAttrs (old: {
|
||||
doCheck = false;
|
||||
patches = (old.patches or []) ++ [
|
||||
# https://github.com/matrix-org/matrix-appservice-discord/pull/917
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/eb989fa710e8db4ebc8f2ce36c6679ee6cbc1a44.patch";
|
||||
hash = "sha256-GPeFDw3XujqXHJveHSsBHwHuG51vad50p55FX1Esq58=";
|
||||
name = "set-missing-config-defaults.patch";
|
||||
})
|
||||
# https://github.com/matrix-org/matrix-appservice-discord/pull/918
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/a4cd5e3a6a2d544adac2a263e164671c8a9009d9.patch";
|
||||
hash = "sha256-qQJ4V6/Ns2Msu8+X8JoEycuQ2Jc90TXulsuLLmPecGU=";
|
||||
name = "dont-send-filenames.patch";
|
||||
})
|
||||
# https://github.com/matrix-org/matrix-appservice-discord/pull/878/
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/fc850ba2473973e28858449ec4020380470d78b2.patch";
|
||||
hash = "sha256-Lq0FWmR08wLsoq4APRTokZzb7U2po98pgyxH4UR/9/M=";
|
||||
name = "bridge-discord-replies-1.patch";
|
||||
})
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/86388901fa44d5d0f9d3dec8727c18cc00d613e7.patch";
|
||||
hash = "sha256-XcLbKJPmFZElzwU4YS8Md8dNLajddJPKmau0U65bp00=";
|
||||
name = "bridge-discord-replies-2.patch";
|
||||
})
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/8299c626188e676723a708e49635d2c4afa26ffa.patch";
|
||||
hash = "sha256-ZfUwpJ21/m3QbktbxxHyO8Lcl/IuDhaSKQRXBEPeJBo=";
|
||||
name = "bridge-discord-replies-3.patch";
|
||||
})
|
||||
# https://github.com/matrix-org/matrix-appservice-discord/pull/819
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/1c3223387aaf78ba5637f58ca57bd8206ad0446c.patch";
|
||||
hash = "sha256-3hxyqjI9F4j/XBq/59b7c2PorYRN2mR4XZJjpygs9dI=";
|
||||
name = "bridge-matrix-edits-1.patch";
|
||||
})
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/f8e9449908b332d97f11932fb835552adca0aa5b.patch";
|
||||
hash = "sha256-1qb4Zah1XKzxTpVJqOOqz+TiXMFmnsIMZeuqJQdqSIA=";
|
||||
name = "bridge-matrix-edits-2.patch";
|
||||
})
|
||||
./matrix-appservice-discord/disable-attachment-forwarding-to-matrix.patch
|
||||
];
|
||||
});
|
||||
# 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";
|
||||
patches = [
|
||||
(pkgs.fetchpatch {
|
||||
# pull 16
|
||||
url = "https://github.com/chayleaf/nix-plugins/commit/8f945cadad7f2e60e8f308b2f498ec5e16961ede.patch";
|
||||
hash = "sha256-pOogMtjXYkSDtXW12TmBpGr/plnizJtud2nP3q2UldQ=";
|
||||
})
|
||||
];
|
||||
});*/
|
||||
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: {
|
||||
version = "2023-12-01";
|
||||
# who cares about tests amirite
|
||||
doCheck = false;
|
||||
src = old.src.override {
|
||||
rev = "4d1c8505120961f10897b8fe9a070d4e193c9a13";
|
||||
hash = "sha256-vXTuE83GL15mgZHegbllVAsVdDFcWWSayPfZxTJN5ys=";
|
||||
};
|
||||
});
|
||||
nurl = pkgs.nurl.override { nix = nixForNixPlugins; };
|
||||
|
||||
buffyboard = pkgs.callPackage ./buffyboard { };
|
||||
clang-tools_latest = pkgs.clang-tools_16;
|
||||
|
@ -39,11 +124,9 @@ in
|
|||
sha256 = "sha256-6vYbNmNJBCoU23nVculac24tHqH7F4AZVftIjL93WJU=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
patches = [ ];
|
||||
});
|
||||
kvmfrOverlay = kvmfr: kvmfr.overrideAttrs (old: {
|
||||
inherit (pkgs'.looking-glass-client) version src;
|
||||
patches = [ ./looking-glass.patch ];
|
||||
});
|
||||
mobile-config-firefox = callPackage ./mobile-config-firefox { };
|
||||
osu-wine = callPackage ./osu-wine { };
|
||||
|
@ -93,9 +176,7 @@ in
|
|||
qemu = pkgs'.qemu_7_ccache;
|
||||
stdenv = pkgs'.ccacheStdenv;
|
||||
};
|
||||
ccachePkgs = import ./ccache.nix { inherit pkgs pkgs' lib sources; };
|
||||
|
||||
# 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; };
|
||||
}
|
||||
// import ./ccache.nix { inherit pkgs pkgs' lib sources; }
|
||||
// import ../system/hardware/bpi-r3/pkgs.nix { inherit pkgs pkgs' lib sources; }
|
||||
// import ../system/hardware/oneplus-enchilada/pkgs.nix { inherit inputs pkgs pkgs' lib sources; }
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
{
|
||||
"fastforwardteam" = buildFirefoxXpiAddon {
|
||||
pname = "fastforwardteam";
|
||||
version = "0.2383";
|
||||
version = "0.2334";
|
||||
addonId = "addon@fastforward.team";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4258067/fastforwardteam-0.2383.xpi";
|
||||
sha256 = "eec6328df3df1afe2cb6a331f6907669d804235551ea766d48655f8f831caf28";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4177101/fastforwardteam-0.2334.xpi";
|
||||
sha256 = "d790219622469f08316b41c0d01abf2b584a37fa87b45666a74bd30cffb95ed0";
|
||||
meta = with lib;
|
||||
{
|
||||
homepage = "https://fastforward.team";
|
||||
|
@ -23,10 +23,10 @@
|
|||
};
|
||||
"rikaitan" = buildFirefoxXpiAddon {
|
||||
pname = "rikaitan";
|
||||
version = "24.5.21.0";
|
||||
version = "24.3.7.1";
|
||||
addonId = "tatsu@autistici.org";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4291845/rikaitan-24.5.21.0.xpi";
|
||||
sha256 = "a2a94d88af04023f14daaafda1f6ca7a7197f2ab92ada08ee2e9e4292d57a391";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4246908/rikaitan-24.3.7.1.xpi";
|
||||
sha256 = "db849343b029b2f1b510cc66032157502e3fe9e6168072d27e8aad9867b6ec17";
|
||||
meta = with lib;
|
||||
{
|
||||
homepage = "https://github.com/Ajatt-Tools/rikaitan";
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
diff --git a/kvmfr.c b/kvmfr.c
|
||||
index 121aae5b..4c386f98 100644
|
||||
--- a/kvmfr.c
|
||||
+++ b/kvmfr.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/memremap.h>
|
||||
#include <linux/version.h>
|
||||
+#include <linux/vmalloc.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
|
||||
@@ -539,7 +540,11 @@ static int __init kvmfr_module_init(void)
|
||||
if (kvmfr->major < 0)
|
||||
goto out_free;
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
|
||||
kvmfr->pClass = class_create(THIS_MODULE, KVMFR_DEV_NAME);
|
||||
+#else
|
||||
+ kvmfr->pClass = class_create(KVMFR_DEV_NAME);
|
||||
+#endif
|
||||
if (IS_ERR(kvmfr->pClass))
|
||||
goto out_unreg;
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
{ matrix-appservice-discord, fetchpatch }:
|
||||
|
||||
matrix-appservice-discord.overrideAttrs (old: {
|
||||
doCheck = false;
|
||||
patches = (old.patches or []) ++ [
|
||||
# https://github.com/matrix-org/matrix-appservice-discord/pull/917
|
||||
(fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/eb989fa710e8db4ebc8f2ce36c6679ee6cbc1a44.patch";
|
||||
hash = "sha256-GPeFDw3XujqXHJveHSsBHwHuG51vad50p55FX1Esq58=";
|
||||
name = "set-missing-config-defaults.patch";
|
||||
})
|
||||
# https://github.com/matrix-org/matrix-appservice-discord/pull/918
|
||||
(fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/a4cd5e3a6a2d544adac2a263e164671c8a9009d9.patch";
|
||||
hash = "sha256-qQJ4V6/Ns2Msu8+X8JoEycuQ2Jc90TXulsuLLmPecGU=";
|
||||
name = "dont-send-filenames.patch";
|
||||
})
|
||||
# https://github.com/matrix-org/matrix-appservice-discord/pull/878/
|
||||
(fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/fc850ba2473973e28858449ec4020380470d78b2.patch";
|
||||
hash = "sha256-Lq0FWmR08wLsoq4APRTokZzb7U2po98pgyxH4UR/9/M=";
|
||||
name = "bridge-discord-replies-1.patch";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/86388901fa44d5d0f9d3dec8727c18cc00d613e7.patch";
|
||||
hash = "sha256-XcLbKJPmFZElzwU4YS8Md8dNLajddJPKmau0U65bp00=";
|
||||
name = "bridge-discord-replies-2.patch";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/8299c626188e676723a708e49635d2c4afa26ffa.patch";
|
||||
hash = "sha256-ZfUwpJ21/m3QbktbxxHyO8Lcl/IuDhaSKQRXBEPeJBo=";
|
||||
name = "bridge-discord-replies-3.patch";
|
||||
})
|
||||
# https://github.com/matrix-org/matrix-appservice-discord/pull/819
|
||||
(fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/1c3223387aaf78ba5637f58ca57bd8206ad0446c.patch";
|
||||
hash = "sha256-3hxyqjI9F4j/XBq/59b7c2PorYRN2mR4XZJjpygs9dI=";
|
||||
name = "bridge-matrix-edits-1.patch";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/f8e9449908b332d97f11932fb835552adca0aa5b.patch";
|
||||
hash = "sha256-1qb4Zah1XKzxTpVJqOOqz+TiXMFmnsIMZeuqJQdqSIA=";
|
||||
name = "bridge-matrix-edits-2.patch";
|
||||
})
|
||||
# https://github.com/matrix-org/matrix-appservice-discord/pull/862
|
||||
(fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/3106957ebd857bc88ba3f62182a61dd00275f2fc.patch";
|
||||
hash = "sha256-Xf+TuWXNVqi+0YRwBbCkLcMfsYNxq1ZlsgLWpwjqPww=";
|
||||
name = "discord-to-matrix-reactions-1.patch";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/a8186874b03c545a8728892b299a4367776fc538.patch";
|
||||
hash = "sha256-Hq2HY44hPeGPXI3MglyN7Am+NCNAHAbr2hYhXvDYtGk=";
|
||||
name = "discord-to-matrix-reactions-2.patch";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/da2c3b88c7dd4f3a679890c58f934e9b2ed775df.patch";
|
||||
hash = "sha256-4NMAr+Ni+7pI/I007YH5Y+4ZwAhwg91/BXGvLVcO0BQ=";
|
||||
name = "discord-to-matrix-reactions-3.patch";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/matrix-org/matrix-appservice-discord/commit/a33f269c88c432c532d7816f180e5262d73ebf02.patch";
|
||||
hash = "sha256-0WkfDkQsDoxfKH3MgPb893UPDPxeWueQwVSaxD2RKAw=";
|
||||
name = "discord-to-matrix-reactions-4.patch";
|
||||
})
|
||||
./reactions-as-mxc-urls.patch
|
||||
./disable-attachment-forwarding-to-matrix.patch
|
||||
./reduce-spamminess.patch
|
||||
];
|
||||
})
|
|
@ -1,100 +0,0 @@
|
|||
diff --git a/src/bot.ts b/src/bot.ts
|
||||
index 4445aa6..8613b5a 100644
|
||||
--- a/src/bot.ts
|
||||
+++ b/src/bot.ts
|
||||
@@ -1199,7 +1199,9 @@ export class DiscordBot {
|
||||
|
||||
public async OnMessageReactionAdd(reaction: Discord.MessageReaction, user: Discord.User | Discord.PartialUser) {
|
||||
const message = reaction.message;
|
||||
- const reactionName = reaction.emoji.name;
|
||||
+ const reactionName = (reaction.emoji.id
|
||||
+ ? await this.GetEmoji(reaction.emoji.name, reaction.emoji.animated, reaction.emoji.id) + "#" + reaction.emoji.name
|
||||
+ : reaction.emoji.name);
|
||||
log.verbose(`Got message reaction add event for ${message.id} with ${reactionName}`);
|
||||
|
||||
const storeEvent = await this.store.Get(DbEvent, {
|
||||
@@ -1229,7 +1231,7 @@ export class DiscordBot {
|
||||
const reactionEventId = await intent.underlyingClient.unstableApis.addReactionToEvent(
|
||||
roomId,
|
||||
eventId,
|
||||
- reaction.emoji.id ? `:${reactionName}:` : reactionName
|
||||
+ reactionName,
|
||||
);
|
||||
|
||||
const event = new DbEvent();
|
||||
@@ -1246,7 +1248,10 @@ export class DiscordBot {
|
||||
|
||||
public async OnMessageReactionRemove(reaction: Discord.MessageReaction, user: Discord.User | Discord.PartialUser) {
|
||||
const message = reaction.message;
|
||||
- log.verbose(`Got message reaction remove event for ${message.id} with ${reaction.emoji.name}`);
|
||||
+ const reactionName = (reaction.emoji.id
|
||||
+ ? await this.GetEmoji(reaction.emoji.name, reaction.emoji.animated, reaction.emoji.id) + "#" + reaction.emoji.name
|
||||
+ : reaction.emoji.name);
|
||||
+ log.verbose(`Got message reaction remove event for ${message.id} with ${reactionName}`);
|
||||
|
||||
const storeEvent = await this.store.Get(DbEvent, {
|
||||
discord_id: message.id,
|
||||
@@ -1274,7 +1279,7 @@ export class DiscordBot {
|
||||
|
||||
const underlyingClient = intent.underlyingClient;
|
||||
|
||||
- const { chunk } = await underlyingClient.unstableApis.getRelationsForEvent(
|
||||
+ const { chunk } = await underlyingClient.getRelationsForEvent(
|
||||
roomId,
|
||||
eventId,
|
||||
"m.annotation"
|
||||
@@ -1285,7 +1290,7 @@ export class DiscordBot {
|
||||
return false;
|
||||
}
|
||||
|
||||
- return event.content["m.relates_to"].key === reaction.emoji.name;
|
||||
+ return event.content["m.relates_to"].key === reactionName;
|
||||
});
|
||||
|
||||
if (!event) {
|
||||
@@ -1324,7 +1329,7 @@ export class DiscordBot {
|
||||
const [ eventId, roomId ] = storeEvent.MatrixId.split(";");
|
||||
const underlyingClient = this.bridge.botIntent.underlyingClient;
|
||||
|
||||
- const { chunk } = await underlyingClient.unstableApis.getRelationsForEvent(
|
||||
+ const { chunk } = await underlyingClient.getRelationsForEvent(
|
||||
roomId,
|
||||
eventId,
|
||||
"m.annotation"
|
||||
diff --git a/test/mocks/appservicemock.ts b/test/mocks/appservicemock.ts
|
||||
index 06cc3ce..f6ef585 100644
|
||||
--- a/test/mocks/appservicemock.ts
|
||||
+++ b/test/mocks/appservicemock.ts
|
||||
@@ -281,6 +281,10 @@ class MatrixClientMock extends AppserviceMockBase {
|
||||
public async redactEvent(roomId: string, eventId: string, reason?: string | null) {
|
||||
this.funcCalled("redactEvent", roomId, eventId, reason);
|
||||
}
|
||||
+
|
||||
+ public async getRelationsForEvent(roomId: string, eventId: string, relationType?: string, eventType?: string): Promise<any> {
|
||||
+ this.funcCalled("getRelationsForEvent", roomId, eventId, relationType, eventType);
|
||||
+ }
|
||||
}
|
||||
|
||||
class UnstableApis extends AppserviceMockBase {
|
||||
@@ -288,8 +292,4 @@ class UnstableApis extends AppserviceMockBase {
|
||||
public async addReactionToEvent(roomId: string, eventId: string, emoji: string) {
|
||||
this.funcCalled("addReactionToEvent", roomId, eventId, emoji);
|
||||
}
|
||||
-
|
||||
- public async getRelationsForEvent(roomId: string, eventId: string, relationType?: string, eventType?: string): Promise<any> {
|
||||
- this.funcCalled("getRelationsForEvent", roomId, eventId, relationType, eventType);
|
||||
- }
|
||||
}
|
||||
diff --git a/test/test_discordbot.ts b/test/test_discordbot.ts
|
||||
index 9c9e469..2109bb7 100644
|
||||
--- a/test/test_discordbot.ts
|
||||
+++ b/test/test_discordbot.ts
|
||||
@@ -501,7 +501,7 @@ describe("DiscordBot", () => {
|
||||
discordBot = getDiscordBot();
|
||||
const intent = mockBridge.getIntent(author.id);
|
||||
|
||||
- intent.underlyingClient.unstableApis.getRelationsForEvent = async () => {
|
||||
+ intent.underlyingClient.getRelationsForEvent = async () => {
|
||||
return {
|
||||
chunk: [
|
||||
{
|
|
@ -1,28 +0,0 @@
|
|||
diff --git a/src/config.ts b/src/config.ts
|
||||
index 1e2f862..fd6e411 100644
|
||||
--- a/src/config.ts
|
||||
+++ b/src/config.ts
|
||||
@@ -163,7 +163,7 @@ export class LoggingFile {
|
||||
|
||||
class DiscordBridgeConfigGhosts {
|
||||
public nickPattern: string = ":nick";
|
||||
- public usernamePattern: string = ":username#:tag";
|
||||
+ public usernamePattern: string = ":username";
|
||||
}
|
||||
|
||||
export class DiscordBridgeConfigMetrics {
|
||||
diff --git a/src/usersyncroniser.ts b/src/usersyncroniser.ts
|
||||
index b82722d..fb534c6 100644
|
||||
--- a/src/usersyncroniser.ts
|
||||
+++ b/src/usersyncroniser.ts
|
||||
@@ -207,6 +207,10 @@ export class UserSyncroniser {
|
||||
log.warn("Remote user wasn't found, using blank avatar");
|
||||
}
|
||||
const intent = this.bridge.getIntentForUserId(memberState.mxUserId);
|
||||
+ const oldState = await intent.underlyingClient.getRoomStateEvent(roomId, "m.room.member", memberState.mxUserId);
|
||||
+ if (oldState && (oldState.avatar_url || "") == avatar && (oldState.displayname || "") == memberState.displayName) {
|
||||
+ return;
|
||||
+ }
|
||||
/* The intent class tries to be smart and deny a state update for <PL50 users.
|
||||
Obviously a user can change their own state so we use the client instead. */
|
||||
await intent.underlyingClient.sendStateEvent(roomId, "m.room.member", memberState.mxUserId, {
|
|
@ -1,46 +0,0 @@
|
|||
{ pkgs, pkgs', ... }:
|
||||
|
||||
let
|
||||
nixForNixPlugins = pkgs.nixVersions.nix_2_18;
|
||||
in {
|
||||
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";
|
||||
patches = [
|
||||
(pkgs.fetchpatch {
|
||||
# pull 16
|
||||
url = "https://github.com/chayleaf/nix-plugins/commit/8f945cadad7f2e60e8f308b2f498ec5e16961ede.patch";
|
||||
hash = "sha256-pOogMtjXYkSDtXW12TmBpGr/plnizJtud2nP3q2UldQ=";
|
||||
})
|
||||
];
|
||||
});*/
|
||||
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: {
|
||||
version = "2023-12-01";
|
||||
# who cares about tests amirite
|
||||
doCheck = false;
|
||||
src = old.src.override {
|
||||
rev = "4d1c8505120961f10897b8fe9a070d4e193c9a13";
|
||||
hash = "sha256-vXTuE83GL15mgZHegbllVAsVdDFcWWSayPfZxTJN5ys=";
|
||||
};
|
||||
});
|
||||
nurl = pkgs.nurl.override { nix = nixForNixPlugins; };
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs
|
||||
, pkgs-kernel
|
||||
, config
|
||||
, ... }:
|
||||
|
||||
|
@ -9,7 +8,7 @@
|
|||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs-kernel.linuxPackagesFor (pkgs-kernel.ccachePkgs.buildLinuxWithCcache pkgs-kernel.hw.bpi-r3.linux);
|
||||
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.buildLinuxWithCcache pkgs.linux_bpiR3);
|
||||
|
||||
hardware.deviceTree.enable = true;
|
||||
hardware.deviceTree.filter = "mt7986a-bananapi-bpi-r3.dtb";
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
, ... }:
|
||||
|
||||
let
|
||||
mkArmTrustedFirmwareBpiR3 = { bootDevice, uboot ? null }: pkgs.buildArmTrustedFirmware rec {
|
||||
armTrustedFirmwareBpiR3 = { bootDevice, uboot ? null }: pkgs.buildArmTrustedFirmware rec {
|
||||
inherit (sources.atf-bpir3) src;
|
||||
patches = [ ./bpi-r3-atf-backport-mkimage-support.patch ];
|
||||
extraMakeFlags = assert builtins.elem bootDevice [
|
||||
|
@ -36,7 +36,7 @@ let
|
|||
# CONFIG_DISTRO_DEFAULTS - surely this won't hurt, it adds autocomplete and stuff and doesn't weight much in the large scale of things
|
||||
# CONFIG_SYS_BOOTM_LEN - increase max initrd? size
|
||||
# CONFIG_ZSTD - allow zstd initrd
|
||||
mkUbootConfig = storage: ''
|
||||
ubootConfig = storage: ''
|
||||
CONFIG_AUTOBOOT=y
|
||||
CONFIG_BOOTCOMMAND="${builtins.replaceStrings [ "\n" ] [ "; " ] ''
|
||||
setenv boot_prefixes /@boot/ /@/ /boot/ /
|
||||
|
@ -61,9 +61,9 @@ let
|
|||
};
|
||||
|
||||
in rec {
|
||||
sd.uboot = pkgs.buildUBoot {
|
||||
ubootBpiR3Sd = pkgs.buildUBoot {
|
||||
defconfig = "mt7986a_bpir3_sd_defconfig";
|
||||
extraConfig = mkUbootConfig "sd";
|
||||
extraConfig = ubootConfig "sd";
|
||||
src = ubootSrc;
|
||||
version = ubootVersion;
|
||||
extraMeta.platforms = [ "aarch64-linux" ];
|
||||
|
@ -71,52 +71,52 @@ in rec {
|
|||
patches = [ ./mt7986-default-bootcmd.patch ];
|
||||
filesToInstall = [ "u-boot.bin" ];
|
||||
};
|
||||
emmc.uboot = pkgs.buildUBoot {
|
||||
ubootBpiR3Emmc = pkgs.buildUBoot {
|
||||
defconfig = "mt7986a_bpir3_emmc_defconfig";
|
||||
extraConfig = mkUbootConfig "emmc";
|
||||
extraConfig = ubootConfig "emmc";
|
||||
src = ubootSrc;
|
||||
version = ubootVersion;
|
||||
extraMeta.platforms = [ "aarch64-linux" ];
|
||||
patches = [ ./mt7986-default-bootcmd.patch ];
|
||||
filesToInstall = [ "u-boot.bin" ];
|
||||
};
|
||||
sd.armTrustedFirmware = mkArmTrustedFirmwareBpiR3 { inherit (sd) uboot; bootDevice = "sdmmc"; };
|
||||
emmc.armTrustedFirmware = mkArmTrustedFirmwareBpiR3 { inherit (emmc) uboot; bootDevice = "emmc"; };
|
||||
combinedStuff = pkgs.stdenvNoCC.mkDerivation {
|
||||
armTrustedFirmwareBpiR3Sd = armTrustedFirmwareBpiR3 { uboot = ubootBpiR3Sd; bootDevice = "sdmmc"; };
|
||||
armTrustedFirmwareBpiR3Emmc = armTrustedFirmwareBpiR3 { uboot = ubootBpiR3Emmc; bootDevice = "emmc"; };
|
||||
bpiR3StuffCombined = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "bpi-r3-stuff";
|
||||
unpackPhase = "true";
|
||||
buildPhase = "true";
|
||||
installPhase = ''
|
||||
mkdir -p $out/sd
|
||||
mkdir -p $out/emmc
|
||||
cp ${emmc.stuff}/* $out/emmc
|
||||
cp ${sd.stuff}/* $out/sd
|
||||
cp ${bpiR3StuffEmmc}/* $out/emmc
|
||||
cp ${bpiR3StuffSd}/* $out/sd
|
||||
'';
|
||||
fixupPhase = "true";
|
||||
};
|
||||
emmc.stuff = pkgs.stdenvNoCC.mkDerivation {
|
||||
bpiR3StuffEmmc = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "bpi-r3-stuff-emmc";
|
||||
unpackPhase = "true";
|
||||
buildPhase = "true";
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ${emmc.uboot}/*.* $out
|
||||
cp ${emmc.armTrustedFirmware}/*.* $out
|
||||
cp ${ubootBpiR3Emmc}/*.* $out
|
||||
cp ${armTrustedFirmwareBpiR3Emmc}/*.* $out
|
||||
'';
|
||||
fixupPhase = "true";
|
||||
};
|
||||
sd.stuff = pkgs.stdenvNoCC.mkDerivation {
|
||||
bpiR3StuffSd = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "bpi-r3-stuff-sd";
|
||||
unpackPhase = "true";
|
||||
buildPhase = "true";
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ${sd.uboot}/*.* $out
|
||||
cp ${sd.armTrustedFirmware}/*.* $out
|
||||
cp ${ubootBpiR3Sd}/*.* $out
|
||||
cp ${armTrustedFirmwareBpiR3Sd}/*.* $out
|
||||
'';
|
||||
fixupPhase = "true";
|
||||
};
|
||||
linux = pkgs.linux_latest.override {
|
||||
linux_bpiR3 = pkgs.linux_latest.override {
|
||||
ignoreConfigErrors = false;
|
||||
# there's probably more enabled-by-default configs that are better left disabled, but whatever
|
||||
structuredExtraConfig = with lib.kernel; {
|
||||
|
@ -351,5 +351,5 @@ in rec {
|
|||
XEN_PVHVM.tristate = lib.mkForce null; XEN_SAVE_RESTORE.tristate = lib.mkForce null; XEN_SYS_HYPERVISOR.tristate = lib.mkForce null;
|
||||
};
|
||||
};
|
||||
linuxPackages = pkgs.linuxPackagesFor linux;
|
||||
linuxPackages_bpiR3 = pkgs.linuxPackagesFor linux_bpiR3;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs
|
||||
, pkgs-kernel
|
||||
, lib
|
||||
, config
|
||||
, inputs
|
||||
|
@ -8,8 +7,6 @@
|
|||
|
||||
let
|
||||
cfg = config.phone;
|
||||
hw = pkgs.hw.oneplus-enchilada;
|
||||
hw-kernel = pkgs-kernel.hw.oneplus-enchilada;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
@ -30,21 +27,16 @@ in
|
|||
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
inherit (self.hw.oneplus-enchilada) pd-mapper qrtr rmtfs tqftpserv;
|
||||
})
|
||||
];
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
mobile.quirks.qualcomm.sdm845-modem.enable = true;
|
||||
mobile.quirks.audio.alsa-ucm-meld = true;
|
||||
environment.systemPackages = [ hw.alsa-ucm-conf ];
|
||||
environment.systemPackages = [ pkgs.alsa-ucm-conf-enchilada ];
|
||||
systemd.services.q6voiced = {
|
||||
description = "QDSP6 driver daemon";
|
||||
after = [ "ModemManager.service" "dbus.socket" ];
|
||||
wantedBy = [ "ModemManager.service" ];
|
||||
requires = [ "dbus.socket" ];
|
||||
serviceConfig.ExecStart = "${hw.q6voiced}/bin/q6voiced hw:0,6";
|
||||
serviceConfig.ExecStart = "${pkgs.q6voiced}/bin/q6voiced hw:0,6";
|
||||
};
|
||||
# TODO when testing PipeWire instead of PulseAudio, the following is needed:
|
||||
# https://gitlab.freedesktop.org/pipewire/wireplumber/-/blob/master/docs/rst/daemon/configuration/migration.rst
|
||||
|
@ -70,8 +62,8 @@ in
|
|||
percentageAction = 3;
|
||||
criticalPowerAction = "PowerOff";
|
||||
};
|
||||
hardware.firmware = lib.mkAfter [ hw.firmware ];
|
||||
boot.kernelPackages = lib.mkForce (pkgs-kernel.linuxPackagesFor hw-kernel.linux_ccache);
|
||||
hardware.firmware = lib.mkAfter [ pkgs.firmware-oneplus-sdm845 ];
|
||||
boot.kernelPackages = lib.mkForce (pkgs.linuxPackagesFor pkgs.linux_enchilada_ccache);
|
||||
hardware.deviceTree.enable = true;
|
||||
hardware.deviceTree.name = "qcom/sdm845-oneplus-enchilada.dtb";
|
||||
# loglevel=7 console=ttyMSM0,115200 is a way to delay boot
|
||||
|
@ -87,7 +79,7 @@ in
|
|||
"firmware-oneplus-sdm845"
|
||||
"firmware-oneplus-sdm845-xz"
|
||||
];
|
||||
system.build.uboot = pkgs.ubootImage;
|
||||
system.build.uboot = pkgs.ubootImageEnchilada;
|
||||
boot.initrd.includeDefaultModules = false;
|
||||
boot.initrd.availableKernelModules = [
|
||||
"sd_mod"
|
||||
|
@ -195,7 +187,7 @@ in
|
|||
};
|
||||
|
||||
boot.initrd.extraUtilsCommands = ''
|
||||
copy_bin_and_libs ${hw.adbd}/bin/adbd
|
||||
copy_bin_and_libs ${pkgs.adbd}/bin/adbd
|
||||
cp -pv ${pkgs.glibc.out}/lib/libnss_files.so.* $out/lib
|
||||
'';
|
||||
|
||||
|
@ -230,7 +222,7 @@ in
|
|||
description = "adb daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${hw.adbd}/bin/adbd";
|
||||
ExecStart = "${pkgs.adbd}/bin/adbd";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -35,7 +35,7 @@ in {
|
|||
meta.license = lib.licenses.mit;
|
||||
};
|
||||
|
||||
alsa-ucm-conf = pkgs.stdenvNoCC.mkDerivation {
|
||||
alsa-ucm-conf-enchilada = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "alsa-ucm-conf-enchilada";
|
||||
version = "unstable-2022-12-08";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
|
@ -55,7 +55,7 @@ in {
|
|||
meta.priority = -10;
|
||||
};
|
||||
|
||||
uboot = pkgs.buildUBoot {
|
||||
ubootEnchilada = pkgs.buildUBoot {
|
||||
defconfig = "qcom_defconfig";
|
||||
version = "unstable-2023-12-11";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
|
@ -73,7 +73,7 @@ in {
|
|||
filesToInstall = [ "u-boot-nodtb.bin" "u-boot-dtb.bin" "u-boot.dtb" ];
|
||||
};
|
||||
|
||||
ubootImage = pkgs.stdenvNoCC.mkDerivation {
|
||||
ubootImageEnchilada = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "u-boot-enchilada.img";
|
||||
nativeBuildInputs = [
|
||||
# available from mobile-nixos's overlay
|
||||
|
@ -97,13 +97,13 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
firmware = pkgs.stdenvNoCC.mkDerivation {
|
||||
firmware-oneplus-sdm845 = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "firmware-oneplus-sdm845";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "sdm845-mainline";
|
||||
repo = "firmware-oneplus-sdm845";
|
||||
rev = "176ca713448c5237a983fb1f158cf3a5c251d775";
|
||||
hash = "sha256-ZrBvYO+MY0tlamJngdwhCsI1qpA/2FXoyEys5FAYLj4=";
|
||||
rev = "dc9c77f220d104d7224c03fcbfc419a03a58765e";
|
||||
hash = "sha256-jrbWIS4T9HgBPYOV2MqPiRQCxGMDEfQidKw9Jn5pgBI=";
|
||||
};
|
||||
installPhase = ''
|
||||
cp -a . "$out"
|
||||
|
@ -119,13 +119,13 @@ in {
|
|||
meta.license = lib.licenses.unfreeRedistributableFirmware;
|
||||
};
|
||||
|
||||
linux = pkgs.linux_latest.override {
|
||||
linux_enchilada = pkgs.linux_latest.override {
|
||||
# TODO: uncomment
|
||||
# ignoreConfigErrors = false;
|
||||
kernelPatches = [
|
||||
{
|
||||
name = "linux_6_9";
|
||||
patch = ./linux_6_9.patch;
|
||||
name = "linux_6_8";
|
||||
patch = ./linux_6_8.patch;
|
||||
}
|
||||
{
|
||||
name = "config_fixes";
|
||||
|
@ -627,5 +627,5 @@ in {
|
|||
XEN_PVHVM.tristate = lib.mkForce null; XEN_SAVE_RESTORE.tristate = lib.mkForce null; XEN_SYS_HYPERVISOR.tristate = lib.mkForce null;
|
||||
};
|
||||
};
|
||||
linux_ccache = pkgs'.ccachePkgs.buildLinuxWithCcache pkgs'.hw.oneplus-enchilada.linux;
|
||||
linux_enchilada_ccache = pkgs'.buildLinuxWithCcache pkgs'.linux_enchilada;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ in {
|
|||
};
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud29;
|
||||
package = pkgs.nextcloud28;
|
||||
autoUpdateApps.enable = true;
|
||||
# TODO: use socket auth and remove the next line
|
||||
database.createLocally = false;
|
||||
|
|
|
@ -133,7 +133,7 @@ in {
|
|||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
# nixos-hardware uses mkDefault here, so we use slightly higher priority
|
||||
services.libinput.enable = mkForceDefault (!cfg.minimal);
|
||||
services.xserver.libinput.enable = mkForceDefault (!cfg.minimal);
|
||||
programs.fuse.userAllowOther = true;
|
||||
# autologin once after boot
|
||||
# --skip-login means directly call login instead of first asking for username
|
||||
|
@ -190,9 +190,6 @@ in {
|
|||
})
|
||||
|
||||
(lib.mkIf (!cfg.minimal) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
unixtools.xxd
|
||||
];
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = lib.mkDefault true;
|
||||
|
|
Loading…
Reference in a new issue