Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion docs/manual/book.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# SPDX-FileCopyrightText: 2026 Ryan Lahfa <ryan.lahfa@numerique.gouv.fr>
# SPDX-FileContributor: 2026 Xavier Maso <xavier.maso@beta.gouv.fr>
#
# SPDX-License-Identifier: CC-BY-SA-4.0

[book]
authors = ["Ryan Lahfa"]
authors = ["Ryan Lahfa", "Xavier Maso"]
language = "en"
src = "src"
title = "Sécurix"
4 changes: 4 additions & 0 deletions docs/manual/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0
- [Secure Boot]()
- [ANSSI compliance]()
- [Security key user logins]()

# External references

- [Resources](./external/links.md)
4 changes: 3 additions & 1 deletion docs/manual/src/about/securix.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!--
SPDX-FileCopyrightText: 2026 Ryan Lahfa <ryan.lahfa@numerique.gouv.fr>
SPDX-FileContributor: 2026 Xavier Maso <xavier.maso@beta.gouv.fr>

SPDX-License-Identifier: CC-BY-SA-4.0
-->

# What is Sécurix?


An operating system developped at [DINUM](https://www.numerique.gouv.fr/), primarily for internal use, for building workstation environments that are declarative, reproducible, and secure by default.
Based on [`NixOS`](https://nixos.org/), it allows to write configuration as code for defining users, programs, services, configurations, and more.
14 changes: 14 additions & 0 deletions docs/manual/src/external/links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--
SPDX-FileCopyrightText: 2026 Xavier Maso <xavier.maso@beta.gouv.fr>

SPDX-License-Identifier: CC-BY-SA-4.0
-->

# Resources

- [nix.dev](https://nix.dev/) a good starting point into the `Nix`/`Lix` and `NixOS` ecosystem
- Manuals
- [`Nixos`](https://nixos.org/manual/nixos/stable/), and particularly the [module development section](https://nixos.org/manual/nixos/stable/#sec-writing-modules)
- [`Nix`](https://nix.dev/manual/nix/2.34/)/[`Lix`](https://docs.lix.systems/manual/lix/stable/) for commands and some implementation details
- [`nixpkgs`](https://nixos.org/manual/nixpkgs/stable/) regarding writing expressions for building packages
- [the **official** wiki](https://wiki.nixos.org) has some interesting tips in niche topics, but of very mixed quality and up-to-date-ness
2 changes: 2 additions & 0 deletions modules/updates/permissionless-upgrade.nix
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ let
upgradeScript = pkgs.writeShellApplication {
name = "upgrade";

runtimeInputs = [ pkgs.git ];

text = ''
# Ensure the script runs as root
if [ "$(id -u)" -ne 0 ]; then
Expand Down
12 changes: 7 additions & 5 deletions tests/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let
{
name,
serialNumber,
inventoryId ? null,
extraSecurixConfig,
}:
{
Expand All @@ -21,7 +22,7 @@ let
self = {
mainDisk = "/dev/nvme0n1";
machine = {
inherit serialNumber;
inherit serialNumber inventoryId;
hardwareSKU = "x280";
};
};
Expand All @@ -34,6 +35,7 @@ let
terminal-with-tools = libSecurix.mkTerminal (terminalWith {
name = "tools";
serialNumber = "000000";
inventoryId = 0;
extraSecurixConfig = {
tools.enable = true;
};
Expand All @@ -47,16 +49,16 @@ in
pkgs.testers.nixosTest {
name = "tools";
nodes = {
securix-unbranded-000000 = {
securix-unbranded-0 = {
imports = terminal-with-tools.modules;
};
securix-unbranded-000001 = {
"securix-unbranded-${builtins.substring 0 12 (builtins.hashString "sha256" "000001")}" = {
imports = terminal-without-tools.modules;
};
};
testScript = ''
securix_with_tools = securix_unbranded_000000
securix_without_tools = securix_unbranded_000001
securix_with_tools = securix_unbranded_0
securix_without_tools = securix_unbranded_${builtins.substring 0 12 (builtins.hashString "sha256" "000001")}

securix_with_tools.wait_for_unit("default.target")
securix_without_tools.wait_for_unit("default.target")
Expand Down
Loading