basic config

This commit is contained in:
Semere Meharena Mebrahtom 2026-07-11 12:44:00 +02:00
parent a489aa344a
commit dd508cb134
6 changed files with 465 additions and 0 deletions

48
flake.nix Normal file
View file

@ -0,0 +1,48 @@
{
description = "NixOS system flake";
inputs = {
nixpkgs.url = "nixpkgs/nixos-26.05";
home-manager = {
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
hosts = [ "sys" ];
# hosts = builtins.attrNames (builtins.readDir ./hosts);
in
{
nixosConfigurations =
builtins.listToAttrs (
map (host: {
name = host;
value = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./hosts/${host}/configuration.nix
./hosts/${host}/hardware-configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.him = import ./home/him.nix;
backupFileExtension = "backup";
};
}
];
};
}) hosts
);
};
}