Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jinja2: fix dependencies #96381

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
8bf9101
firefox-bin: ffmpeg_3 -> ffmpeg
samuelgrf Aug 10, 2020
e64e92f
nixosTests.virtualbox: Disable predictable interface names in guest
liff Aug 17, 2020
5f5c990
nixosTests.virtualbox: Port to python
liff Aug 7, 2020
a942508
confluence: 7.6.1 -> 7.7.2
WilliButz Aug 20, 2020
e21e5a9
nixos/security/misc: add option unprivilegedUsernsClone
Izorkin Aug 23, 2020
a4701ba
fasm: 1.73.24 -> 1.73.25
r-ryantm Aug 25, 2020
b1b8cae
octoprint: 1.4.0 -> 1.4.2
j0hax Aug 25, 2020
d35cb15
nixos/shadowsocks: support plugins
hmenke Jun 23, 2020
ef6c9fb
maintainers: add hmenke
hmenke Aug 26, 2020
27f281b
nixos/shadowsocks: add test
hmenke Aug 26, 2020
a45fa65
istioctl: 1.6.7 -> 1.7.0
r-ryantm Aug 26, 2020
25d7d47
intel-gmmlib: 20.2.3 -> 20.2.5
danieldk Aug 20, 2020
e71aaab
intel-compute-runtime: 20.02.15268 -> 20.33.17675
danieldk Aug 20, 2020
46184ba
poedit: 2.3.1 -> 2.4.1
r-ryantm Aug 16, 2020
df2317a
flexibee: 2020.2.1.2 -> 2020.2.3.1
r-ryantm Aug 1, 2020
8593feb
fswebcam: 20140113 -> 20200725
r-ryantm Aug 1, 2020
8e6d8fe
node-problem-detector: 0.8.2 -> 0.8.3
r-ryantm Jul 31, 2020
6f7bd51
go-ethereum: 1.9.19 -> 1.9.20
RaghavSood Aug 26, 2020
df2f22d
Merge pull request #94858 from liff/virtualbox-python-test
flokli Aug 26, 2020
f222501
go-ethereum: Add RaghavSood to maintainers
RaghavSood Aug 26, 2020
5df3339
Merge pull request #96294 from j0hax/octoprint-update
gebner Aug 26, 2020
4a19316
python3Packages.pipx: init at 0.15.5.0
Aug 24, 2020
7b46d0e
Merge pull request #95868 from danieldk/icr-update
danieldk Aug 26, 2020
1320915
Merge pull request #95847 from WilliButz/update/confluence-7.7.2
WilliButz Aug 26, 2020
62f394c
adding extends to maintainer list
ImExtends Aug 26, 2020
d8f5a66
Electron Player: init at 2.0.8
ImExtends Aug 26, 2020
c9dcac1
libmatroska: 1.6.1 -> 1.6.2
r-ryantm Aug 26, 2020
bd37bc5
Merge pull request #96253 from ImExtends/electronplayer
Lassulus Aug 26, 2020
4d43de3
nixos/nixpkgs.nix: Correct crossSystem default literal
roberth Aug 16, 2020
64a2de1
.github/workflow/pending-{set,clear}: switch to curl
zowoq Aug 26, 2020
4a82621
llvm_11: Enable build-id when linking libLLVM shared libs
primeos Aug 26, 2020
2213c46
chromiumDev: Drop nix_plugin_paths_68.patch
primeos Aug 26, 2020
bf0e13a
chromiumDev: Drop the optional VA-API patches
primeos Aug 26, 2020
8815c9e
chromiumDev: Fix "patchShebangs ."
primeos Aug 26, 2020
06abd5c
Merge pull request #96343 from RaghavSood/ethereum/1.9.20
adisbladis Aug 26, 2020
5f464fc
Merge pull request #95113 from samuelgrf/update/firefox-bin-ffmpeg
adisbladis Aug 26, 2020
1d8caa0
gerrit: 3.2.2 -> 3.2.3 (#96304)
r-ryantm Aug 26, 2020
8d819fb
Merge pull request #96358 from r-ryantm/auto-update/libmatroska
danieldk Aug 26, 2020
4ef21bb
Merge pull request #96307 from r-ryantm/auto-update/fasm
danieldk Aug 26, 2020
23a00dc
Merge pull request #96334 from r-ryantm/auto-update/istioctl
ryantm Aug 26, 2020
1ad014b
Merge pull request #96080 from Izorkin/unprivileged-userns-clone
joachifm Aug 26, 2020
12baef5
Merge pull request #96127 from hmenke/shadowsocks
Lassulus Aug 26, 2020
e2ec55a
jinja2: fix dependencies
GovanifY Aug 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 6 additions & 20 deletions .github/workflows/pending-clear.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,10 @@ jobs:
if: github.repository_owner == 'NixOS' && github.event.check_suite.app.name == 'OfBorg'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GSU_VERSION: "0.5.0"
GSU_HASH: "49df54dc0ed5eaa037400b66be8114bd62fa0af51ed36565f6203dc312711cc6"
GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download"
run: |
curl -sSf -O -L -C - \
"$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \
if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then
echo "checksum mismatch"
exit 1
fi
chmod +x github-status-updater_linux_amd64 && \
./github-status-updater_linux_amd64 \
-action update_state \
-token "$GITHUB_TOKEN" \
-owner NixOS \
-repo nixpkgs \
-state success \
-context "Wait for ofborg" \
-description " " \
-url " " \
-ref "${{ github.event.check_suite.head_sha }}"
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
-d '{"state": "success", "target_url": " ", "description": " ", "context": "Wait for ofborg"}' \
"https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.check_suite.head_sha }}"
26 changes: 6 additions & 20 deletions .github/workflows/pending-set.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,10 @@ jobs:
if: github.repository_owner == 'NixOS'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GSU_VERSION: "0.5.0"
GSU_HASH: "49df54dc0ed5eaa037400b66be8114bd62fa0af51ed36565f6203dc312711cc6"
GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download"
run: |
curl -sSf -O -L -C - \
"$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \
if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then
echo "checksum mismatch"
exit 1
fi
chmod +x github-status-updater_linux_amd64 && \
./github-status-updater_linux_amd64 \
-action update_state \
-token "$GITHUB_TOKEN" \
-owner NixOS \
-repo nixpkgs \
-state failure \
-context "Wait for ofborg" \
-description "This failed status will be cleared when ofborg finishes eval." \
-url " " \
-ref "${{ github.event.pull_request.head.sha }}"
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
-d '{"state": "failure", "target_url": " ", "description": "This failed status will be cleared when ofborg finishes eval.", "context": "Wait for ofborg"}' \
"https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.pull_request.head.sha }}"
16 changes: 16 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2717,6 +2717,12 @@
githubId = 857308;
name = "Joe Hermaszewski";
};
extends = {
email = "sharosari@gmail.com";
github = "ImExtends";
githubId = 55919390;
name = "Vincent VILLIAUMEY";
};
eyjhb = {
email = "eyjhbb@gmail.com";
github = "eyJhb";
Expand Down Expand Up @@ -9474,4 +9480,14 @@
github = "yevhenshymotiuk";
githubId = 44244245;
};
hmenke = {
name = "Henri Menke";
email = "henri@henrimenke.de";
github = "hmenke";
githubId = 1903556;
keys = [{
longkeyid = "rsa4096/0xD65C9AFB4C224DA3";
fingerprint = "F1C5 760E 45B9 9A44 72E9 6BFB D65C 9AFB 4C22 4DA3";
}];
};
}
2 changes: 0 additions & 2 deletions nixos/modules/misc/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ in
type = types.nullOr types.attrs; # TODO utilize lib.systems.parsedPlatform
default = null;
example = { system = "aarch64-linux"; config = "aarch64-unknown-linux-gnu"; };
defaultText = literalExample
''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform'';
description = ''
Specifies the platform for which NixOS should be
built. Specify this only if it is different from
Expand Down
5 changes: 4 additions & 1 deletion nixos/modules/profiles/hardened.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A profile with most (vanilla) hardening options enabled by default,
# potentially at the cost of features and performance.

{ lib, pkgs, ... }:
{ config, lib, pkgs, ... }:

with lib;

Expand All @@ -27,6 +27,9 @@ with lib;

security.forcePageTableIsolation = mkDefault true;

# This is required by podman to run containers in rootless mode.
security.unprivilegedUsernsClone = mkDefault config.virtualisation.containers.enable;

security.virtualisation.flushL1DataCache = mkDefault "always";

security.apparmor.enable = mkDefault true;
Expand Down
14 changes: 14 additions & 0 deletions nixos/modules/security/misc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ with lib;
'';
};

security.unprivilegedUsernsClone = mkOption {
type = types.bool;
default = false;
description = ''
When disabled, unprivileged users will not be able to create new namespaces.
By default unprivileged user namespaces are disabled.
This option only works in a hardened profile.
'';
};

security.protectKernelImage = mkOption {
type = types.bool;
default = false;
Expand Down Expand Up @@ -115,6 +125,10 @@ with lib;
];
})

(mkIf config.security.unprivilegedUsernsClone {
boot.kernel.sysctl."kernel.unprivileged_userns_clone" = mkDefault true;
})

(mkIf config.security.protectKernelImage {
# Disable hibernation (allows replacing the running kernel)
boot.kernelParams = [ "nohibernate" ];
Expand Down
36 changes: 33 additions & 3 deletions nixos/modules/services/networking/shadowsocks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ let
method = cfg.encryptionMethod;
mode = cfg.mode;
user = "nobody";
fast_open = true;
} // optionalAttrs (cfg.password != null) { password = cfg.password; };
fast_open = cfg.fastOpen;
} // optionalAttrs (cfg.plugin != null) {
plugin = cfg.plugin;
plugin_opts = cfg.pluginOpts;
} // optionalAttrs (cfg.password != null) {
password = cfg.password;
};

configFile = pkgs.writeText "shadowsocks.json" (builtins.toJSON opts);

Expand Down Expand Up @@ -74,6 +79,14 @@ in
'';
};

fastOpen = mkOption {
type = types.bool;
default = true;
description = ''
use TCP fast-open
'';
};

encryptionMethod = mkOption {
type = types.str;
default = "chacha20-ietf-poly1305";
Expand All @@ -82,6 +95,23 @@ in
'';
};

plugin = mkOption {
type = types.nullOr types.str;
default = null;
example = "\${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin";
description = ''
SIP003 plugin for shadowsocks
'';
};

pluginOpts = mkOption {
type = types.str;
default = "";
example = "server;host=example.com";
description = ''
Options to pass to the plugin if one was specified
'';
};
};

};
Expand All @@ -99,7 +129,7 @@ in
description = "shadowsocks-libev Daemon";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.shadowsocks-libev ] ++ optional (cfg.passwordFile != null) pkgs.jq;
path = [ pkgs.shadowsocks-libev cfg.plugin ] ++ optional (cfg.passwordFile != null) pkgs.jq;
serviceConfig.PrivateTmp = true;
script = ''
${optionalString (cfg.passwordFile != null) ''
Expand Down
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ in
sanoid = handleTest ./sanoid.nix {};
sddm = handleTest ./sddm.nix {};
service-runner = handleTest ./service-runner.nix {};
shadowsocks = handleTest ./shadowsocks.nix {};
shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {};
shiori = handleTest ./shiori.nix {};
signal-desktop = handleTest ./signal-desktop.nix {};
Expand Down
80 changes: 80 additions & 0 deletions nixos/tests/shadowsocks.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "shadowsocks";
meta = {
maintainers = with lib.maintainers; [ hmenke ];
};

nodes = {
server = {
boot.kernel.sysctl."net.ipv4.ip_forward" = "1";
networking.useDHCP = false;
networking.interfaces.eth1.ipv4.addresses = [
{ address = "192.168.0.1"; prefixLength = 24; }
];
networking.firewall.rejectPackets = true;
networking.firewall.allowedTCPPorts = [ 8488 ];
networking.firewall.allowedUDPPorts = [ 8488 ];
services.shadowsocks = {
enable = true;
encryptionMethod = "chacha20-ietf-poly1305";
password = "pa$$w0rd";
localAddress = [ "0.0.0.0" ];
port = 8488;
fastOpen = false;
mode = "tcp_and_udp";
plugin = "${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin";
pluginOpts = "server;host=nixos.org";
};
services.nginx = {
enable = true;
virtualHosts.server = {
locations."/".root = pkgs.writeTextDir "index.html" "It works!";
};
};
};

client = {
networking.useDHCP = false;
networking.interfaces.eth1.ipv4.addresses = [
{ address = "192.168.0.2"; prefixLength = 24; }
];
systemd.services.shadowsocks-client = {
description = "connect to shadowsocks";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = with pkgs; [
shadowsocks-libev
shadowsocks-v2ray-plugin
];
script = ''
exec ss-local \
-s 192.168.0.1 \
-p 8488 \
-l 1080 \
-k 'pa$$w0rd' \
-m chacha20-ietf-poly1305 \
-a nobody \
--plugin "${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin" \
--plugin-opts "host=nixos.org"
'';
};
};
};

testScript = ''
start_all()

server.wait_for_unit("shadowsocks-libev.service")
client.wait_for_unit("shadowsocks-client.service")

client.fail(
"${pkgs.curl}/bin/curl 192.168.0.1:80"
)

msg = client.succeed(
"${pkgs.curl}/bin/curl --socks5 localhost:1080 192.168.0.1:80"
)
assert msg == "It works!", "Could not connect through shadowsocks"
'';
}
)