3 Apr 2024 |
smrtak | SD card is not the problem, looks like it has something to do with this: https://discourse.nixos.org/t/why-and-how-nix-shell-uses-tmpfs/11049
but I could be wrong | 19:46:23 |
K900 | It is very much the problem | 20:42:16 |
5 Apr 2024 |
smrtak | does this cmd completes on your opi5 correctly?
nix shell nixpkgs#ragenix | 13:28:24 |
K900 | Just use normal agenix | 13:37:26 |
K900 | Instead of ragenix | 13:37:29 |
K900 | They're compatible and agenix definitely works fine | 13:37:35 |
smrtak | for me it ends like this:
[nix-shell:~/nix-config]$ nix shell nixpkgs#ragenix
error: flake 'flake:nixpkgs' does not provide attribute 'packages.aarch64-linux.ragenix', 'legacyPackages.aarch64-linux.ragenix' or 'ragenix'
| 14:31:14 |
K900 | That's because there's no ragenix package in nixpkgs | 14:31:56 |
K900 | It's defined in the ragenix flake | 14:32:01 |
K900 | (but also seriously just use normal agenix) | 14:32:10 |
smrtak | ok, I'll try to change it to agenix, thank you | 14:36:14 |
smrtak | hurray! \o/ thank you one more time!
setting up /etc...
updating GRUB 2 menu...
installing the GRUB 2 boot loader into /boot/...
Installing for arm64-efi platform.
Installation finished. No error reported.
installation finished!
[nix-shell:~/nix-config]$ echo $?
0
| 14:59:59 |
8 Apr 2024 |
| Dima joined the room. | 06:32:46 |
| @lychee:lefishe.club changed their display name from lychee to kay. | 17:10:52 |
| 522 joined the room. | 19:30:32 |
9 Apr 2024 |
| @dclmatrix:matrix.org joined the room. | 03:35:45 |
| @raf:notashelf.dev joined the room. | 17:53:32 |
| @5m5z3q888q5prxkg:chat.lightnovel-dungeon.de changed their profile picture. | 23:12:29 |
10 Apr 2024 |
| nhnn joined the room. | 14:18:45 |
nhnn | Hello, is it possible to mock agenix secrets in NixOS tests? | 14:19:39 |
@5m5z3q888q5prxkg:chat.lightnovel-dungeon.de | ├─ nixium on WORK-IN-PROGRESS [+] via ❄️ impure (NiXium-devshell-env)
╰───❯ ragenix -e test.age
Error:
0: No rule for the given file test.age
Location:
src/main.rs:39
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Why is this giving me no rule err?
| 21:01:05 |
@adam:robins.wtf | because secrets.nix doesn't have an entry for it | 21:14:31 |
@5m5z3q888q5prxkg:chat.lightnovel-dungeon.de | i am trying to make a secret file | 21:14:09 |
@adam:robins.wtf | (r)agenix requires a secrets.nix that configures the files and the keys that will be encrypted with | 21:15:40 |
@5m5z3q888q5prxkg:chat.lightnovel-dungeon.de | oh i see, works now | 21:15:44 |
@adam:robins.wtf | In reply to @nhnn:nhnn.dev Hello, is it possible to mock agenix secrets in NixOS tests? I wrote this module for mocking age secrets:
{ lib, pkgs, ... }:
{
options = {
age.secrets = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ name, config, ... }:
let
secretConfig = config;
in
{
freeformType = (pkgs.formats.json { }).type;
options = {
testString = lib.mkOption {
type = lib.types.str;
description = lib.mdDoc "String to return with path. Use this in place of the encrypted age file.";
};
};
config = {
path = "/somepath";
};
}
)
);
description = "Mock age module";
default = { };
};
};
}
| 21:16:37 |
@5m5z3q888q5prxkg:chat.lightnovel-dungeon.de | thanks! | 21:15:47 |
@adam:robins.wtf | In reply to @nhnn:nhnn.dev Hello, is it possible to mock agenix secrets in NixOS tests? * I wrote this module for mocking age secrets:
{ lib, pkgs, ... }:
{
options = {
age.secrets = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ name, config, ... }:
let
secretConfig = config;
in
{
freeformType = (pkgs.formats.json { }).type;
options = {
testString = lib.mkOption {
type = lib.types.str;
description = lib.mdDoc "String to return with path. Use this in place of the encrypted age file.";
};
};
config = {
path = "/somepath";
};
}
)
);
description = "Mock age module";
default = { };
};
};
}
and an example use
age.secrets."consul-gossip-encrypt.json".testString = builtins.toJSON {
encrypt = "2Jb1bY7186nApvmwG+fwQuaI7EehjIV/XQ6xDDJ+114=";
};
| 21:17:40 |
11 Apr 2024 |
nhnn | In reply to@adam:robins.wtf
I wrote this module for mocking age secrets:
{ lib, pkgs, ... }:
{
options = {
age.secrets = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ name, config, ... }:
let
secretConfig = config;
in
{
freeformType = (pkgs.formats.json { }).type;
options = {
testString = lib.mkOption {
type = lib.types.str;
description = lib.mdDoc "String to return with path. Use this in place of the encrypted age file.";
};
};
config = {
path = "/somepath";
};
}
)
);
description = "Mock age module";
default = { };
};
};
}
and an example use
age.secrets."consul-gossip-encrypt.json".testString = builtins.toJSON {
encrypt = "2Jb1bY7186nApvmwG+fwQuaI7EehjIV/XQ6xDDJ+114=";
};
it will not work in runtime, right? | 08:10:20 |
nhnn | i don't quite understand how it supposed to work | 08:11:10 |