-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
senpai: use SCFG format #4086
senpai: use SCFG format #4086
Changes from all commits
55f880f
144ff00
41bb341
ea7404e
62da2b8
b59d90b
14adb57
8151418
55336fb
a6a95f0
5a861c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
senpai-example-settings = ./example-settings.nix; | ||
senpai-empty-settings = ./empty-settings.nix; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
address irc.libera.chat | ||
nickname Guest123456 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ config, ... }: | ||
|
||
{ | ||
config = { | ||
programs.senpai = { | ||
enable = true; | ||
package = config.lib.test.mkStubPackage { }; | ||
config = { | ||
address = "irc.libera.chat"; | ||
nickname = "Guest123456"; | ||
}; | ||
}; | ||
|
||
nmt.script = '' | ||
assertFileContent \ | ||
home-files/.config/senpai/senpai.scfg \ | ||
${./empty-settings-expected.conf} | ||
''; | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
address irc.libera.chat | ||
channel #rahxephon | ||
colors { | ||
prompt 2 | ||
} | ||
|
||
highlight guest senpai lenon | ||
nickname Guest123456 | ||
pane-widths { | ||
nicknames 16 | ||
} | ||
|
||
password-cmd gopass show irc/guest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, SCFG doesn't quote its strings. See: https://git.sr.ht/~taiite/senpai/tree/master/item/doc/senpai.5.scd#L199 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does, but The option should reflect that by having type There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I understand. Thank you for the well reasoned response -- an option wrapping |
||
realname Guest von Lenon | ||
username senpai |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ config, ... }: | ||
|
||
{ | ||
config = { | ||
programs.senpai = { | ||
enable = true; | ||
package = config.lib.test.mkStubPackage { }; | ||
config = { | ||
address = "irc.libera.chat"; | ||
nickname = "Guest123456"; | ||
password-cmd = [ "gopass" "show" "irc/guest" ]; | ||
}; | ||
extraConfig = { | ||
username = "senpai"; | ||
realname = "Guest von Lenon"; | ||
channel = [ "#rahxephon" ]; | ||
highlight = [ "guest" "senpai" "lenon" ]; | ||
pane-widths = { nicknames = 16; }; | ||
colors = { prompt = 2; }; | ||
}; | ||
}; | ||
|
||
nmt.script = '' | ||
assertFileContent \ | ||
home-files/.config/senpai/senpai.scfg \ | ||
${./example-settings-expected.conf} | ||
''; | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly this is not going to work because of NixOS/nixpkgs#96006. (Well, and also because this is defined in a
let in
but not used)I think the best we can do for now is add assertions that the old options aren't used...
Sorry for leading you to a wrong track, this corner of the module system isn't quite ready yet.