From a417314404646ee55cd683d826105dde392453f3 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Thu, 27 Feb 2025 03:09:06 +0800 Subject: [PATCH] refactor(nixos): convert system to use flakes --- flake.lock | 27 +++++++++++++++++++ flake.nix | 18 +++++++++++++ .../nemesis/default.nix | 0 .../nemesis/hardware-configuration.nix | 0 4 files changed, 45 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix rename configuration.nix => hosts/nemesis/default.nix (100%) rename hardware-configuration.nix => hosts/nemesis/hardware-configuration.nix (100%) diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..e19c85d --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1740367490, + "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0196c0175e9191c474c26ab5548db27ef5d34b05", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ce3895f --- /dev/null +++ b/flake.nix @@ -0,0 +1,18 @@ +{ + outputs = { + self, + nixpkgs, + ... + } @ inputs: { + nixosConfigurations = { + nemesis = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ ./hosts/nemesis ]; + }; + }; + }; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; +} diff --git a/configuration.nix b/hosts/nemesis/default.nix similarity index 100% rename from configuration.nix rename to hosts/nemesis/default.nix diff --git a/hardware-configuration.nix b/hosts/nemesis/hardware-configuration.nix similarity index 100% rename from hardware-configuration.nix rename to hosts/nemesis/hardware-configuration.nix