enforce new flake schema. formatting.
Some checks failed
Build tests / build-hosts (pull_request) Failing after 3s
Flake check / flake-check (pull_request) Failing after 13s

This commit is contained in:
sid 2026-05-31 18:50:41 +02:00
parent 4b0a90e00d
commit ecf5132cbb
121 changed files with 1606 additions and 1554 deletions

5
templates/container/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
.direnv/
.envrc
.pre-commit-config.yaml
result
target

View file

@ -2,10 +2,10 @@
description = "Container NixOS configurations";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
synix.url = "git+https://git.sid.ovh/sid/synix.git?ref=release-25.11";
synix.imputs.nixpkgs.follows = "nixpkgs";
synix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
@ -17,42 +17,62 @@
let
inherit (self) outputs;
system = "x86_64-linux";
systems = [
"x86_64-linux"
];
lib = nixpkgs.lib.extend (final: prev: inputs.synix.lib or { });
in
{
packages =
let
pkgs = nixpkgs.legacyPackages.${system};
in
import ./pkgs { inherit pkgs; };
lib = nixpkgs.lib.extend (_final: _prev: inputs.synix.lib or { });
overlays = import ./overlays { inherit (self) inputs; };
inherit (lib.helpers) mkPkgs;
devShells =
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
nixos-container
tmux
];
};
};
forAllSystems =
function:
lib.genAttrs systems (
system:
function (mkPkgs {
inherit system;
})
);
nixosModules = import ./modules;
nixosConfigurations = {
container = nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./config ];
mkNixosConfiguration =
system: modules:
nixpkgs.lib.nixosSystem {
inherit system modules;
specialArgs = {
inherit inputs outputs lib;
};
};
in
{
packages = forAllSystems (pkgs: import ./pkgs { inherit pkgs; });
overlays = import ./overlays { inherit (self) inputs; };
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nixos-container
tmux
];
};
});
nixosModules = import ./modules;
nixosConfigurations = {
container = mkNixosConfiguration "x86_64-linux" [ ./config ];
};
checks = forAllSystems (
pkgs:
let
inherit (pkgs.stdenv.hostPlatform) system;
in
{
inherit (inputs.synix.checks.${system}) pre-commit-check build-additions build-modifications;
}
);
inherit (inputs.synix) formatter;
};
}

View file

@ -1 +1,2 @@
# shellcheck shell=bash
use flake

View file

@ -1,23 +1,20 @@
---
name: C Nix Pipeline
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: # yamllint disable-line
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Nix
uses: cachix/install-nix-action@v18
with:
- uses: actions/checkout@v3
- name: Set up Nix
uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run nix flake check
run: nix flake check
- name: Run nix flake check
run: nix flake check

View file

@ -1,2 +1,3 @@
#!/usr/bin/env bash
make clean
bear --output build/compile_commands.json -- make all

View file

@ -81,7 +81,7 @@
system:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (self.checks.${system}.pre-commit-check) config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}

View file

@ -1 +1,2 @@
# shellcheck shell=bash
use flake

View file

@ -56,7 +56,7 @@
pkgs = nixpkgsFor.${system};
in
{
default = esp.devShells."${system}".default;
inherit (esp.devShells."${system}") default;
}
);
@ -64,7 +64,7 @@
system:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (self.checks.${system}.pre-commit-check) config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}

View file

@ -1,2 +1,3 @@
---
dependencies:
espressif/led_strip: "^3.0.0"

View file

@ -1 +1,2 @@
# shellcheck shell=bash
use flake

View file

@ -1,23 +1,20 @@
---
name: Python Nix Pipeline
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: # yamllint disable-line
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Nix
uses: cachix/install-nix-action@v18
with:
- uses: actions/checkout@v3
- name: Set up Nix
uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run nix flake check
run: nix flake check
- name: Run nix flake check
run: nix flake check

View file

@ -54,7 +54,7 @@
system:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (self.checks.${system}.pre-commit-check) config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}

View file

@ -8,7 +8,7 @@
let
cfg = config.services.flask_hello;
domain = config.networking.domain;
inherit (config.networking) domain;
fqdn = if (cfg.nginx.subdomain != "") then "${cfg.nginx.subdomain}.${domain}" else domain;
python-with-packages = pkgs.python3.withPackages (
@ -109,7 +109,7 @@ in
users.users."${cfg.user}" = {
home = "/var/lib/${cfg.user}";
isSystemUser = true;
group = cfg.group;
inherit (cfg) group;
};
users.groups."${cfg.group}" = { };

View file

@ -1,23 +1,20 @@
---
name: Python Nix Pipeline
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: # yamllint disable-line
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Nix
uses: cachix/install-nix-action@v18
with:
- uses: actions/checkout@v3
- name: Set up Nix
uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run nix flake check
run: nix flake check
- name: Run nix flake check
run: nix flake check

View file

@ -105,7 +105,7 @@
system:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (self.checks.${system}.pre-commit-check) config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}

View file

@ -1,26 +1,23 @@
---
name: Rust Nix Pipeline
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
on: # yamllint disable-line
jobs:
build-and-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Nix
uses: cachix/install-nix-action@v18
with:
- uses: actions/checkout@v3
- name: Set up Nix
uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Run cargo tests in dev shell
run: nix develop --command bash -c "cargo test"
- name: Run nix flake check
run: nix flake check
- name: Run cargo tests in dev shell
run: nix develop --command bash -c "cargo test"
- name: Run nix flake check
run: nix flake check

View file

@ -76,7 +76,7 @@
system:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (self.checks.${system}.pre-commit-check) config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}

View file

@ -1 +1,2 @@
# shellcheck shell=bash
use flake

View file

@ -1 +1,2 @@
# shellcheck shell=bash
use flake

View file

@ -2,13 +2,13 @@
description = "MicroVM NixOS configurations";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
microvm.url = "github:microvm-nix/microvm.nix";
microvm.inputs.nixpkgs.follows = "nixpkgs";
synix.url = "git+https://git.sid.ovh/sid/synix.git?ref=release-25.11";
synix.imputs.nixpkgs.follows = "nixpkgs";
synix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
@ -20,20 +20,22 @@
let
inherit (self) outputs;
supportedSystems = [
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
lib = nixpkgs.lib.extend (_final: _prev: inputs.synix.lib or { });
lib = nixpkgs.lib.extend (final: prev: inputs.synix.lib or { });
inherit (lib.helpers) mkPkgs;
mkApp = program: description: {
type = "app";
inherit program;
meta.description = description;
};
forAllSystems =
function:
lib.genAttrs systems (
system:
function (mkPkgs {
inherit system;
})
);
mkNixosConfiguration =
system: modules:
@ -43,13 +45,20 @@
inherit inputs outputs lib;
};
};
mkApp = program: description: {
type = "app";
inherit program;
meta.description = description;
};
in
{
apps = forAllSystems (
system:
pkgs:
let
microvm = self.nixosConfigurations."microvm-${system}".config.microvm;
inherit (nixpkgs.lib) getExe;
inherit (pkgs.stdenv.hostPlatform) system;
inherit (self.nixosConfigurations."microvm-${system}".config) microvm;
inherit (pkgs.lib) getExe;
in
{
rebuild = mkApp (getExe microvm.deploy.rebuild) "Rebuild the VM.";
@ -57,34 +66,22 @@
}
);
packages = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
import ./pkgs { inherit pkgs; }
);
packages = forAllSystems (pkgs: import ./pkgs { inherit pkgs; });
overlays = import ./overlays { inherit (self) inputs; };
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
buildInputs = with pkgs; [
tmux
];
};
# FIXME: `microvm.deploy.rebuild` does not seem to care about askpass
# shellHook = ''
# export SSH_ASKPASS="pass <SUDO_BUILD_HOST_PASSWORD>"
# export SSH_ASKPASS_REQUIRE="force"
# '';
}
);
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
tmux
];
};
# FIXME: `microvm.deploy.rebuild` does not seem to care about askpass
# shellHook = ''
# export SSH_ASKPASS="pass <SUDO_BUILD_HOST_PASSWORD>"
# export SSH_ASKPASS_REQUIRE="force"
# '';
});
nixosModules = import ./modules;
@ -92,5 +89,17 @@
microvm-x86_64-linux = mkNixosConfiguration "x86_64-linux" [ ./config ];
microvm-aarch64-linux = mkNixosConfiguration "aarch64-linux" [ ./config ];
};
checks = forAllSystems (
pkgs:
let
inherit (pkgs.stdenv.hostPlatform) system;
in
{
inherit (inputs.synix.checks.${system}) pre-commit-check build-additions build-modifications;
}
);
inherit (inputs.synix) formatter;
};
}

View file

@ -0,0 +1,5 @@
.direnv/
.envrc
.pre-commit-config.yaml
result
target

View file

@ -5,10 +5,7 @@
nixpkgs-old-stable.url = "github:nixos/nixpkgs/nixos-25.05";
synix.url = "git+https://git.sid.ovh/sid/synix.git?ref=release-25.11";
synix.imputs.nixpkgs.follows = "nixpkgs";
git-hooks.url = "github:cachix/git-hooks.nix";
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
synix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
@ -20,14 +17,22 @@
let
inherit (self) outputs;
supportedSystems = [
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
lib = nixpkgs.lib.extend (_final: _prev: inputs.synix.lib or { });
lib = nixpkgs.lib.extend (final: prev: inputs.synix.lib or { });
inherit (lib.helpers) mkPkgs;
forAllSystems =
function:
lib.genAttrs systems (
system:
function (mkPkgs {
inherit system;
})
);
mkNixosConfiguration =
system: modules:
@ -39,7 +44,7 @@
};
in
{
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
packages = forAllSystems (pkgs: import ./pkgs { inherit pkgs; });
overlays = import ./overlays { inherit inputs; };
@ -49,41 +54,26 @@
HOSTNAME = mkNixosConfiguration "x86_64-linux" [ ./hosts/HOSTNAME ];
};
formatter = forAllSystems (
system:
devShells = forAllSystems (
pkgs:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}
'';
inherit (pkgs.stdenv.hostPlatform) system;
in
pkgs.writeShellScriptBin "pre-commit-run" script
{
default = inputs.synix.devShells.${system}.nix-config;
}
);
checks = forAllSystems (
system:
pkgs:
let
pkgs = nixpkgs.legacyPackages.${system};
flakePkgs = self.packages.${system};
overlaidPkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.modifications ];
};
inherit (pkgs.stdenv.hostPlatform) system;
in
{
pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt.enable = true;
};
};
build-packages = pkgs.linkFarm "flake-packages-${system}" flakePkgs;
build-overlays = pkgs.linkFarm "flake-overlays-${system}" {
# package = overlaidPkgs.package;
};
inherit (inputs.synix.checks.${system}) pre-commit-check build-additions build-modifications;
}
);
inherit (inputs.synix) formatter;
};
}

View file

@ -11,20 +11,22 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"ahci"
"nvme"
"sd_mod"
"sdhci_pci"
"sr_mod"
"usb_storage"
"virtio_pci"
"virtio_scsi"
"xhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot = {
initrd.availableKernelModules = [
"ahci"
"nvme"
"sd_mod"
"sdhci_pci"
"sr_mod"
"usb_storage"
"virtio_pci"
"virtio_scsi"
"xhci_pci"
];
initrd.kernelModules = [ ];
kernelModules = [ ];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-label/ROOT";

View file

@ -0,0 +1,5 @@
.direnv/
.envrc
.pre-commit-config.yaml
result
target

View file

@ -5,7 +5,7 @@
nixpkgs-old-stable.url = "github:nixos/nixpkgs/nixos-25.05";
synix.url = "git+https://git.sid.ovh/sid/synix.git?ref=release-25.11";
synix.imputs.nixpkgs.follows = "nixpkgs";
synix.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
@ -18,29 +18,33 @@
stylix.url = "github:danth/stylix";
stylix.inputs.nixpkgs.follows = "nixpkgs";
git-hooks.url = "github:cachix/git-hooks.nix";
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{
self,
nixpkgs,
home-manager,
...
}@inputs:
let
inherit (self) outputs;
supportedSystems = [
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
lib = nixpkgs.lib.extend (_final: _prev: inputs.synix.lib or { });
lib = nixpkgs.lib.extend (final: prev: inputs.synix.lib or { });
inherit (lib.helpers) mkPkgs;
forAllSystems =
function:
lib.genAttrs systems (
system:
function (mkPkgs {
inherit system;
})
);
mkNixosConfiguration =
system: modules:
@ -50,76 +54,53 @@
inherit inputs outputs lib;
};
};
mkHomeConfiguration =
system: modules:
inputs.home-manager.lib.homeManagerConfiguration {
pkgs = mkPkgs { inherit system; };
modules = [ ./users/USERNAME/home ] ++ modules;
extraSpecialArgs = {
inherit inputs outputs;
};
};
in
{
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = import ./shell.nix { inherit pkgs; };
}
);
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
packages = forAllSystems (pkgs: import ./pkgs { inherit pkgs; });
overlays = import ./overlays { inherit inputs; };
nixosModules = import ./modules/nixos;
homeModules = import ./modules/home;
devShells = forAllSystems (
pkgs:
let
inherit (pkgs.stdenv.hostPlatform) system;
in
{
default = inputs.synix.devShells.${system}.nix-config;
}
);
nixosConfigurations = {
HOSTNAME = mkNixosConfiguration "x86_64-linux" [ ./hosts/HOSTNAME ];
};
homeConfigurations = {
"USERNAME@HOSTNAME" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # FIXME: Set architecture
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [
./users/USERNAME/home
./users/USERNAME/home/hosts/HOSTNAME
];
};
"USERNAME@HOSTNAME" = mkHomeConfiguration "x86_64-linux" [ ./users/USERNAME/home/hosts/HOSTNAME ];
};
formatter = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}
'';
in
pkgs.writeShellScriptBin "pre-commit-run" script
);
checks = forAllSystems (
system:
pkgs:
let
pkgs = nixpkgs.legacyPackages.${system};
flakePkgs = self.packages.${system};
overlaidPkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.modifications ];
};
inherit (pkgs.stdenv.hostPlatform) system;
in
{
pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt.enable = true;
};
};
build-packages = pkgs.linkFarm "flake-packages-${system}" flakePkgs;
build-overlays = pkgs.linkFarm "flake-overlays-${system}" {
# package = overlaidPkgs.package;
};
inherit (inputs.synix.checks.${system}) pre-commit-check build-additions build-modifications;
}
);
inherit (inputs.synix) formatter;
};
}

View file

@ -11,20 +11,22 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"ahci"
"nvme"
"sd_mod"
"sdhci_pci"
"sr_mod"
"usb_storage"
"virtio_pci"
"virtio_scsi"
"xhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot = {
initrd.availableKernelModules = [
"ahci"
"nvme"
"sd_mod"
"sdhci_pci"
"sr_mod"
"usb_storage"
"virtio_pci"
"virtio_scsi"
"xhci_pci"
];
initrd.kernelModules = [ ];
kernelModules = [ ];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-label/ROOT";

View file

@ -1,9 +0,0 @@
{
pkgs ? import <nixpkgs> { },
...
}:
pkgs.mkShell {
NIX_CONFIG = "extra-experimental-features = nix-command flakes";
nativeBuildInputs = with pkgs; [ home-manager ];
}

View file

@ -19,6 +19,4 @@
};
programs.nixvim.enable = true;
home.stateVersion = "25.11";
}

View file

@ -1 +1,5 @@
{ imports = [ ../../hyprland ]; }
{
imports = [ ../../hyprland ];
home.stateVersion = "25.11";
}

5
templates/nix-configs/pi4/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
.direnv/
.envrc
.pre-commit-config.yaml
result
target

View file

@ -5,10 +5,7 @@
nixpkgs-old-stable.url = "github:nixos/nixpkgs/nixos-25.05";
synix.url = "git+https://git.sid.ovh/sid/synix.git?ref=release-25.11";
synix.imputs.nixpkgs.follows = "nixpkgs";
git-hooks.url = "github:cachix/git-hooks.nix";
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
synix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
@ -20,14 +17,22 @@
let
inherit (self) outputs;
supportedSystems = [
"x86_64-linux"
systems = [
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
lib = nixpkgs.lib.extend (_final: _prev: inputs.synix.lib or { });
lib = nixpkgs.lib.extend (final: prev: inputs.synix.lib or { });
inherit (lib.helpers) mkPkgs;
forAllSystems =
function:
lib.genAttrs systems (
system:
function (mkPkgs {
inherit system;
})
);
mkNixosConfiguration =
system: modules:
@ -39,51 +44,37 @@
};
in
{
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
packages = forAllSystems (pkgs: import ./pkgs { inherit pkgs; });
overlays = import ./overlays { inherit inputs; };
nixosModules = import ./modules/nixos;
homeModules = import ./modules/home;
nixosConfigurations = {
HOSTNAME = mkNixosConfiguration "x86_64-linux" [ ./hosts/HOSTNAME ];
};
formatter = forAllSystems (
system:
devShells = forAllSystems (
pkgs:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}
'';
in
pkgs.writeShellScriptBin "pre-commit-run" script
);
checks = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
flakePkgs = self.packages.${system};
overlaidPkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.modifications ];
};
inherit (pkgs.stdenv.hostPlatform) system;
in
{
pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt.enable = true;
};
};
build-packages = pkgs.linkFarm "flake-packages-${system}" flakePkgs;
build-overlays = pkgs.linkFarm "flake-overlays-${system}" {
# package = overlaidPkgs.package;
};
default = inputs.synix.devShells.${system}.nix-config;
}
);
nixosConfigurations = {
HOSTNAME = mkNixosConfiguration "aarch64-linux" [ ./hosts/HOSTNAME ];
};
checks = forAllSystems (
pkgs:
let
inherit (pkgs.stdenv.hostPlatform) system;
in
{
inherit (inputs.synix.checks.${system}) pre-commit-check build-additions build-modifications;
}
);
inherit (inputs.synix) formatter;
};
}

View file

@ -0,0 +1,5 @@
.direnv/
.envrc
.pre-commit-config.yaml
result
target

View file

@ -5,10 +5,7 @@
nixpkgs-old-stable.url = "github:nixos/nixpkgs/nixos-25.05";
synix.url = "git+https://git.sid.ovh/sid/synix.git?ref=release-25.11";
synix.imputs.nixpkgs.follows = "nixpkgs";
git-hooks.url = "github:cachix/git-hooks.nix";
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
synix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
@ -20,14 +17,22 @@
let
inherit (self) outputs;
supportedSystems = [
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
lib = nixpkgs.lib.extend (_final: _prev: inputs.synix.lib or { });
lib = nixpkgs.lib.extend (final: prev: inputs.synix.lib or { });
inherit (lib.helpers) mkPkgs;
forAllSystems =
function:
lib.genAttrs systems (
system:
function (mkPkgs {
inherit system;
})
);
mkNixosConfiguration =
system: modules:
@ -39,51 +44,37 @@
};
in
{
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
packages = forAllSystems (pkgs: import ./pkgs { inherit pkgs; });
overlays = import ./overlays { inherit inputs; };
nixosModules = import ./modules/nixos;
homeModules = import ./modules/home;
devShells = forAllSystems (
pkgs:
let
inherit (pkgs.stdenv.hostPlatform) system;
in
{
default = inputs.synix.devShells.${system}.nix-config;
}
);
nixosConfigurations = {
HOSTNAME = mkNixosConfiguration "x86_64-linux" [ ./hosts/HOSTNAME ];
};
formatter = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}
'';
in
pkgs.writeShellScriptBin "pre-commit-run" script
);
checks = forAllSystems (
system:
pkgs:
let
pkgs = nixpkgs.legacyPackages.${system};
flakePkgs = self.packages.${system};
overlaidPkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.modifications ];
};
inherit (pkgs.stdenv.hostPlatform) system;
in
{
pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt.enable = true;
};
};
build-packages = pkgs.linkFarm "flake-packages-${system}" flakePkgs;
build-overlays = pkgs.linkFarm "flake-overlays-${system}" {
# package = overlaidPkgs.package;
};
inherit (inputs.synix.checks.${system}) pre-commit-check build-additions build-modifications;
}
);
inherit (inputs.synix) formatter;
};
}

View file

@ -11,20 +11,22 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"ahci"
"nvme"
"sd_mod"
"sdhci_pci"
"sr_mod"
"usb_storage"
"virtio_pci"
"virtio_scsi"
"xhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot = {
initrd.availableKernelModules = [
"ahci"
"nvme"
"sd_mod"
"sdhci_pci"
"sr_mod"
"usb_storage"
"virtio_pci"
"virtio_scsi"
"xhci_pci"
];
initrd.kernelModules = [ ];
kernelModules = [ ];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-label/ROOT";

View file

@ -0,0 +1,5 @@
.direnv/
.envrc
.pre-commit-config.yaml
result
target

View file

@ -5,10 +5,7 @@
nixpkgs-old-stable.url = "github:nixos/nixpkgs/nixos-25.05";
synix.url = "git+https://git.sid.ovh/sid/synix.git?ref=release-25.11";
synix.imputs.nixpkgs.follows = "nixpkgs";
git-hooks.url = "github:cachix/git-hooks.nix";
git-hooks.inputs.nixpkgs.follows = "nixpkgs";
synix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
@ -20,14 +17,22 @@
let
inherit (self) outputs;
supportedSystems = [
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
lib = nixpkgs.lib.extend (_final: _prev: inputs.synix.lib or { });
lib = nixpkgs.lib.extend (final: prev: inputs.synix.lib or { });
inherit (lib.helpers) mkPkgs;
forAllSystems =
function:
lib.genAttrs systems (
system:
function (mkPkgs {
inherit system;
})
);
mkNixosConfiguration =
system: modules:
@ -39,7 +44,7 @@
};
in
{
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
packages = forAllSystems (pkgs: import ./pkgs { inherit pkgs; });
overlays = import ./overlays { inherit inputs; };
@ -49,41 +54,26 @@
HOSTNAME = mkNixosConfiguration "x86_64-linux" [ ./hosts/HOSTNAME ];
};
formatter = forAllSystems (
system:
devShells = forAllSystems (
pkgs:
let
pkgs = nixpkgs.legacyPackages.${system};
config = self.checks.${system}.pre-commit-check.config;
inherit (config) package configFile;
script = ''
${pkgs.lib.getExe package} run --all-files --config ${configFile}
'';
inherit (pkgs.stdenv.hostPlatform) system;
in
pkgs.writeShellScriptBin "pre-commit-run" script
{
default = inputs.synix.devShells.${system}.nix-config;
}
);
checks = forAllSystems (
system:
pkgs:
let
pkgs = nixpkgs.legacyPackages.${system};
flakePkgs = self.packages.${system};
overlaidPkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.modifications ];
};
inherit (pkgs.stdenv.hostPlatform) system;
in
{
pre-commit-check = inputs.git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixfmt.enable = true;
};
};
build-packages = pkgs.linkFarm "flake-packages-${system}" flakePkgs;
build-overlays = pkgs.linkFarm "flake-overlays-${system}" {
# package = overlaidPkgs.package;
};
inherit (inputs.synix.checks.${system}) pre-commit-check build-additions build-modifications;
}
);
inherit (inputs.synix) formatter;
};
}

View file

@ -10,13 +10,15 @@
{
imports = [ inputs.synix.nixosModules.device.vm ];
boot.initrd.availableKernelModules = [
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot = {
initrd.availableKernelModules = [
"sd_mod"
"sr_mod"
];
initrd.kernelModules = [ ];
kernelModules = [ ];
extraModulePackages = [ ];
};
fileSystems."/" = {
device = "/dev/disk/by-label/ROOT";