Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
181ce4f
nix: Point the nix path to a static value
Tom-Hubrecht Apr 13, 2026
f338bf5
Ajoute le support matériel du ThinkPad X13 Gen 1 AMD (20UF/20UG)
raltheo Apr 16, 2026
f3819d3
config: Revise README
jdauphant-dinum Apr 20, 2026
3157baf
feat: add --securix-branch to upgrade command
agrimault-dinum Apr 13, 2026
8d9a055
config: Readme Update
Apr 20, 2026
1fe306b
chore: add yubikey-reset tool
plegrand-dinum Mar 12, 2026
f757755
chore: modify yubikey reset reuse
plegrand-dinum Mar 12, 2026
0e975df
modify by hook
plegrand-dinum Mar 12, 2026
b573591
chore: add inventory generator tool
plegrand-dinum Mar 12, 2026
5e6f559
rfc style
plegrand-dinum Mar 12, 2026
97bd410
chore: add reuse html
plegrand-dinum Mar 12, 2026
bfc220a
Update community/yubikey-reset/default.nix
plegrand-dinum Mar 30, 2026
ea030a4
chore: modify html for better rendering
plegrand-dinum Apr 1, 2026
ebf2035
delete: yubikey reset
plegrand-dinum Apr 1, 2026
2cb255a
nixfmt-rfc-style
plegrand-dinum Apr 1, 2026
5ca4b56
fix: delete font import from internet
plegrand-dinum Apr 8, 2026
46e9f8e
chore: add new files for better organization
plegrand-dinum Apr 9, 2026
a243f37
fix: add css and js
plegrand-dinum Apr 9, 2026
2c344df
nixfmt-rfc-style
plegrand-dinum Apr 9, 2026
8b2a91f
chore: add retex user modification
plegrand-dinum Apr 9, 2026
5856207
chore: better ux to paste value
plegrand-dinum Apr 9, 2026
04e6955
fix: delete undefined value
plegrand-dinum Apr 9, 2026
d718d98
fix: delete python parser and use nix function
plegrand-dinum Apr 14, 2026
bdcb81b
nixfmt-rfc-style
plegrand-dinum Apr 15, 2026
4f7b82c
Update community/inventory-generator/inventory-generator.js
plegrand-dinum Apr 24, 2026
aeee115
mkTerminal exposes the postInstallScript attribute
nlewo Apr 14, 2026
ff5c4de
fix: validate the verb passed to the upgrade command
QuentinCzr Apr 21, 2026
1593f03
fix: --do-not-pull not working in upgrade script
MattiasKockum Apr 25, 2026
64626fe
refactor: Remove useless line in permissionless-upgrade.nix
MattiasKockum Apr 28, 2026
f936749
feat: flake wrapper bundling lanzaboote/agenix/disko + module surface
abstracts33d May 19, 2026
0f6d83c
feat: make securix modules composable outside lib.mkTerminal
abstracts33d May 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<!--
SPDX-FileCopyrightText: 2025 Ryan Lahfa <ryan.lahfa.ext@numerique.gouv.fr>
SPDX-FileCopyrightText: 2026 Julien Dauphant <julien.dauphant@numerique.gouv.fr>

SPDX-License-Identifier: MIT
-->

# Sécurix: Base OS sécurisé pour poste d'administration
# Sécurix: Base OS pour poste sécurisé

Ce projet est en **alpha**, aucun support n'est proposé pour l'heure.

Expand Down Expand Up @@ -51,6 +52,11 @@ Sécurix repose sur NixOS avec un noyau Linux personnalisé conformément aux r
## Contribuer

Les contributions sont les bienvenues ! Consultez les tickets ouverts et le guide de contribution pour participer.
Vous pouvez ouvrir des tickets pour proposer des fonctionnalités et discuter de l'architecture.
Les PR générées par IA sans relecture ni test seront fermées, les contributions par le même auteur pourront être bloquées par la suite.

Ce README est en français mais le reste du code est en anglais.


### Lancement des tests

Expand All @@ -62,4 +68,4 @@ de cette VM.

## Licence

Sécurix est distribué sous licence MIT. Voir le fichier `LICENSE` pour plus de détails.
Sécurix est distribué sous licence [MIT](https://github.com/cloud-gouv/securix/blob/main/LICENSES/MIT.txt). Voir le dossier `LICENSE` pour plus de détails.
2 changes: 2 additions & 0 deletions community/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
imports = [
# Grist registration
./grist-registration

./inventory-generator
];
}
143 changes: 143 additions & 0 deletions community/inventory-generator/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# SPDX-FileCopyrightText: 2026 Pauline Legrand <pauline.legrand@numerique.gouv.fr>
#
# SPDX-License-Identifier: MIT

{
config,
lib,
pkgs,
securixSrc,
repoSrc ? null,
...
}:

let
cfg = config.securix.inventory-generator;
in
{
options.securix.inventory-generator = {
enable = lib.mkEnableOption "Inventory generator HTML tool";
repoOptionsPrefix = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "Préfixe des options du repo dérivé (ex: 'bureautix'). Laisser null si pas de repo dérivé.";
example = "bureautix";
};
};

config = lib.mkIf cfg.enable {
environment.systemPackages = [
(pkgs.writeShellScriptBin "inventory-generator" ''
TMPDIR=$(mktemp -d)
trap "rm -rf ''$TMPDIR" EXIT

SECURIX_SRC="${securixSrc}"
NIX_PKGS="${pkgs.path}"
REPO_SRC="${if repoSrc != null then toString repoSrc else ""}"
REPO_PREFIX="${if cfg.repoOptionsPrefix != null then cfg.repoOptionsPrefix else ""}"

echo "Chargement des options..."
OPTIONS=$(${pkgs.nix}/bin/nix-instantiate --eval --strict --json -E "
let
pkgs = import $NIX_PKGS {};
lib = pkgs.lib;

securixFiles = lib.filter (f: lib.hasSuffix \".nix\" (toString f)) (
lib.filesystem.listFilesRecursive $SECURIX_SRC/modules
++ lib.filesystem.listFilesRecursive $SECURIX_SRC/community
);

repoFiles =
if \"$REPO_SRC\" == \"\" then []
else lib.filter (f: lib.hasSuffix \".nix\" (toString f)) (
lib.filesystem.listFilesRecursive $REPO_SRC
);

isOptionFile = f:
let content = builtins.readFile f; in
(lib.hasInfix \"mkOption\" content || lib.hasInfix \"mkEnableOption\" content)
&& (lib.hasInfix \"options.securix\" content
|| (\"$REPO_PREFIX\" != \"\" && lib.hasInfix (\"options.$REPO_PREFIX\") content));

optionFiles = builtins.filter isOptionFile (securixFiles ++ repoFiles);

eval = lib.evalModules {
modules = optionFiles ++ [ { _module.check = false; } ];
specialArgs = {
inherit pkgs lib;
vpnProfiles = {};
operators = {};
edition = \"unbranded\";
defaultTags = [];
sources = {};
securixSrc = $SECURIX_SRC;
repoSrc = if \"$REPO_SRC\" == \"\" then null else $REPO_SRC;
};
};

raw = lib.optionAttrSetToDocList (builtins.removeAttrs eval.options [ \"_module\" ]);
filtered = builtins.filter (o: !o.internal && o.visible) raw;
enableGroups = lib.unique (
map (o: lib.removeSuffix \".enable\" o.name)
(builtins.filter (o: lib.hasSuffix \".enable\" o.name) filtered)
);

resolveValue = d:
if d == null then null
else if !(builtins.isAttrs d && (d._type or \"\") == \"literalExpression\") then d
else
let text = lib.trim d.text; in
if text == \"null\" then null
else if text == \"true\" then true
else if text == \"false\" then false
else if text == \"[ ]\" || text == \"[]\" then []
else if lib.hasPrefix \"\\\"\" text && lib.hasSuffix \"\\\"\" text
then lib.removePrefix \"\\\"\" (lib.removeSuffix \"\\\"\" text)
else null;

resolveType = t:
let name = if builtins.isString t then t else t.name or \"string\"; in
if name == \"boolean\" then { kind = \"bool\"; }
else if name == \"package\" then { kind = \"package\"; }
else if lib.hasInfix \"integer\" name then { kind = \"int\"; }
else if lib.hasPrefix \"list of\" name then { kind = \"list\"; }
else if lib.hasPrefix \"one of\" name then {
kind = \"enum\";
values = map lib.trim (lib.splitString \", \" (lib.removePrefix \"one of \" name));
}
else { kind = \"str\"; };

in {
schemaVersion = 1;
inherit enableGroups;
options = map (opt: {
path = opt.name;
description = opt.description or null;
internal = opt.internal;
visible = opt.visible;
hasDefault = opt ? default;
default = resolveValue (opt.default or null);
example = resolveValue (opt.example or null);
isEnable = lib.hasSuffix \".enable\" opt.name;
enableGroup =
let g = lib.concatStringsSep \".\" (lib.init (lib.splitString \".\" opt.name));
in if lib.elem g enableGroups then g else null;
type = resolveType (opt.type or \"string\");
}) filtered;
}
")

cp ${./inventory-generator.html} ''$TMPDIR/inventory-generator.html
cp ${./inventory-generator.css} ''$TMPDIR/inventory-generator.css
${pkgs.python3}/bin/python3 -c "
js = open('${./inventory-generator.js}').read()
opts = open('/dev/stdin').read()
open('$TMPDIR/inventory-generator.js', 'w').write(js.replace('@@SECURIX_OPTIONS@@', opts))
" <<< "''$OPTIONS"

xdg-open ''$TMPDIR/inventory-generator.html
sleep 5
'')
];
};
}
Loading