Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into staging
- Loading branch information
Showing
35 changed files
with
1,904 additions
and
1,214 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
cfg = config.services.fireqos; | ||
fireqosConfig = pkgs.writeText "fireqos.conf" "${cfg.config}"; | ||
in { | ||
options.services.fireqos = { | ||
enable = mkOption { | ||
type = types.bool; | ||
default = false; | ||
description = '' | ||
If enabled, FireQOS will be launched with the specified | ||
configuration given in `config`. | ||
''; | ||
}; | ||
|
||
config = mkOption { | ||
type = types.str; | ||
default = ""; | ||
example = '' | ||
interface wlp3s0 world-in input rate 10mbit ethernet | ||
class web commit 50kbit | ||
match tcp ports 80,443 | ||
interface wlp3s0 world-out input rate 10mbit ethernet | ||
class web commit 50kbit | ||
match tcp ports 80,443 | ||
''; | ||
description = '' | ||
The FireQOS configuration goes here. | ||
''; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
systemd.services.fireqos = { | ||
description = "FireQOS"; | ||
after = [ "network.target" ]; | ||
serviceConfig = { | ||
Type = "oneshot"; | ||
RemainAfterExit = true; | ||
ExecStart = "${pkgs.firehol}/bin/fireqos start ${fireqosConfig}"; | ||
ExecStop = [ | ||
"${pkgs.firehol}/bin/fireqos stop" | ||
"${pkgs.firehol}/bin/fireqos clear_all_qos" | ||
]; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ stdenv, pkgs, fetchurl, lib, makeWrapper, gvfs, atomEnv}: | ||
|
||
stdenv.mkDerivation rec { | ||
name = "atom-${version}"; | ||
version = "1.21.0-beta0"; | ||
|
||
src = fetchurl { | ||
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb"; | ||
sha256 = "1syxlyb62vp9hmjdiazhmvq8w52b90l8mvf502xkdav4vi3yxzfz"; | ||
name = "${name}.deb"; | ||
}; | ||
|
||
nativeBuildInputs = [ makeWrapper ]; | ||
|
||
buildCommand = '' | ||
mkdir -p $out/usr/ | ||
ar p $src data.tar.xz | tar -C $out -xJ ./usr | ||
substituteInPlace $out/usr/share/applications/atom-beta.desktop \ | ||
--replace /usr/share/atom-beta $out/bin | ||
mv $out/usr/* $out/ | ||
rm -r $out/share/lintian | ||
rm -r $out/usr/ | ||
sed -i "s/'atom-beta'/'.atom-beta-wrapped'/" $out/bin/atom-beta | ||
wrapProgram $out/bin/atom-beta \ | ||
--prefix "PATH" : "${gvfs}/bin" | ||
fixupPhase | ||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | ||
--set-rpath "${atomEnv.libPath}:$out/share/atom-beta" \ | ||
$out/share/atom-beta/atom | ||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ | ||
--set-rpath "${atomEnv.libPath}" \ | ||
$out/share/atom-beta/resources/app/apm/bin/node | ||
#rm -f $out/share/atom-beta/resources/app/node_modules/dugite/git/bin/git | ||
#ln -s ${pkgs.git}/bin/git $out/share/atom-beta/resources/app/node_modules/dugite/git/bin/git | ||
find $out/share/atom-beta -name "*.node" -exec patchelf --set-rpath "${atomEnv.libPath}:$out/share/atom-beta" {} \; | ||
paxmark m $out/share/atom-beta/atom | ||
paxmark m $out/share/atom-beta/resources/app/apm/bin/node | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
description = "A hackable text editor for the 21st Century"; | ||
homepage = https://atom.io/; | ||
license = licenses.mit; | ||
maintainers = [ maintainers.offline maintainers.nequissimus ]; | ||
platforms = [ "x86_64-linux" ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.