!ZNJKhFnSSBIKvsGxaF:matrix.org

nix-plus-linux

301 Members
flex your nix fu. unlock your inner badass3 Servers

Load older messages


SenderMessageTime
19 Oct 2021
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 No, I just needed to actually get the value 21:06:15
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593
    crater = { config, pkgs, ... }: {
      services.crater = {
        enable = true;
      };
      services.httpd = {
        networking.firewall.allowedTCPPorts =
          [
            # This is the same as the port defined below, via
            # virtualHosts.crater.listen
            (head "${config.services.httpd.virtualHosts.crater.listen}").port
          ];
        virtualHosts.crater.listen = 
          [
            {
              "port" = 8070;
            }
          ];
21:06:19
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 I'm making a test 21:06:21
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 Rather than saying "8070" twice 21:06:30
@_discord_327214733176471552:t2bot.iodegenerate#8194 maybey ou want builtins.deepSeq 21:06:53
@_discord_327214733176471552:t2bot.iodegenerate#8194 I think that forces evaluation 21:07:08
@_discord_327214733176471552:t2bot.iodegenerate#8194 can't say I've run into this before 21:07:12
@_discord_69910918519070720:t2bot.ioArc#0269 It's not because it's lazy, it's just abbreviating it. 21:08:14
@_discord_69910918519070720:t2bot.ioArc#0269 Use :p 21:08:17
@_discord_327214733176471552:t2bot.iodegenerate#8194 oic 21:09:55
@_discord_327214733176471552:t2bot.iodegenerate#8194 that is useful 21:10:08
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 That would have been done better with a let block 21:10:23
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 lol 21:10:24
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 I'm just a functional wanker now 21:10:42
@_discord_69910918519070720:t2bot.ioArc#0269unknown.png
Download unknown.png
21:10:44
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 Actually 21:13:15
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 this works in the repl but fails here 21:13:19
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 wtf 21:13:19
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 (builtins.head ${config.services.httpd.virtualHosts.crater.listen}).port is not valid to put in a list 21:13:36
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 why 21:13:36
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593
❯ nix build -f ./crater.nix -L
error: syntax error, unexpected DOLLAR_CURLY, expecting ')'

       at /home/matthew/git/nixpkgs/nixos/tests/crater.nix:20:28:

           19|             # virtualHosts.crater.listen
           20|             (builtins.head ${config.services.httpd.virtualHosts.crater.listen}).port
             |                            ^
           21|           ];
21:13:58
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 halp 21:13:59
@_discord_69910918519070720:t2bot.ioArc#0269 Why is there a ${ 21:15:28
@_discord_69910918519070720:t2bot.ioArc#0269 That's only for use in strings. 21:15:34
@_discord_69910918519070720:t2bot.ioArc#0269 And attrset keys. 21:15:41
@_discord_69910918519070720:t2bot.ioArc#0269 (Which are just strings, but with optional quotes) 21:15:58
20 Oct 2021
@_discord_841605895212236811:t2bot.ioITACHI#8417 changed their display name from THor to ITACHI#8417.03:39:04
@_discord_841605895212236811:t2bot.ioITACHI#8417 set a profile picture.03:39:06
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 https://github.com/NixOS/nixpkgs/pull/142040 03:48:46
@_discord_718941288719843349:t2bot.iomatthewcroughan#6593 mind blown 03:48:47

There are no newer messages yet.


Back to Room List