From a6b84cc41778fc321c956e9fe409bf1c67ec42cc Mon Sep 17 00:00:00 2001 From: voidarc Date: Sat, 17 Oct 2026 14:07:09 +0100 Subject: [PATCH] initial --- .gitignore | 3 ++ flake.lock | 77 +++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 14 +++++++++ modules/default.nix | 12 +++++++ modules/parts.nix | 10 ++++++ modules/system.nix | 11 +++++++ 6 files changed, 127 insertions(+) create mode 100644 .gitignore create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 modules/default.nix create mode 100644 modules/parts.nix create mode 100644 modules/system.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..677767a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.session +/nixos.qcow2 +/result diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..af8cdf9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,77 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1790898470, + "narHash": "sha256-zTwuwezD0w3hpga6a6P8emidzAZFyWqlNeRBlpWOOl8=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "024633cd702b10285db5cb19b40ad48d2399ba60", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "import-tree": { + "locked": { + "lastModified": 1788467110, + "narHash": "sha256-ljEMTXP/rH0tOvDzc9gzwww6KcHRPRnEHzd9lK48V7s=", + "owner": "vic", + "repo": "import-tree", + "rev": "eb1b52eaecc57f7c136d07ae8a93e724dfecac46", + "type": "github" + }, + "original": { + "owner": "vic", + "repo": "import-tree", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1792030654, + "narHash": "sha256-OaQwAtPMTjQiY2sT/2/62UbSPhzP/0aDnWzMm/NCiUw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "26f4107e47e3ad0ffd0db220469ba83b6f6d96e8", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-26.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1790477367, + "narHash": "sha256-oujbxmVKDhci2E4EM3KyAbRUgp5/IsCoiA/LfEF7OOk=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "f7cd230690d9fc982d06129f9189b101fddcfa3b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "import-tree": "import-tree", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e23478e --- /dev/null +++ b/flake.nix @@ -0,0 +1,14 @@ +{ + description = "some config"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; + + flake-parts.url = "github:hercules-ci/flake-parts"; + import-tree.url = "github:vic/import-tree"; + }; + + outputs = inputs: + inputs.flake-parts.lib.mkFlake {inherit inputs;} + (inputs.import-tree ./modules); +} diff --git a/modules/default.nix b/modules/default.nix new file mode 100644 index 0000000..b83d554 --- /dev/null +++ b/modules/default.nix @@ -0,0 +1,12 @@ +{ + self, + inputs, + ... +}: { + flake.nixosConfigurations.host = inputs.nixpkgs.lib.nixosSystem { + modules = with self.nixosModules; [ + system + ]; + + }; +} diff --git a/modules/parts.nix b/modules/parts.nix new file mode 100644 index 0000000..657e3ca --- /dev/null +++ b/modules/parts.nix @@ -0,0 +1,10 @@ +{ + config = { + systems = [ + "x86_64-linux" + "x86_64-darwin" + "aarch64-linux" + "aarch64-darwin" + ]; + }; +} diff --git a/modules/system.nix b/modules/system.nix new file mode 100644 index 0000000..d7b7bfd --- /dev/null +++ b/modules/system.nix @@ -0,0 +1,11 @@ +{...}: { + flake.nixosModules.system = {pkgs, ...}: { + environment.systemPackages = with pkgs; [ + git + ]; + + imports = [ + /etc/nixos/hardware-configuration.nix + ]; + }; +}