Added framework of flake in flake.nix

This commit is contained in:
2025-02-06 16:13:49 +01:00
commit 96c5be4d22

43
flake.nix Normal file
View File

@@ -0,0 +1,43 @@
{
description = "Hyprland NixOS Flake";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager.url = "github:nixos-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, ... }@inputs:
let
systemSettings = {
system = "x86_64-linux";
hostname = "sn0wfl4k3";
timezone = "Europe/Berlin";
locale = "en_US.UTF-8";
kbLayout = "us";
username = "zer0day";
};
homeSettings = {
dotfilesDir = "~/.flake"
};
lib = nixpkgs.lib;
pkgs = inputs.nixpkgs.legacyPackages.${systemSettings.system};
in {
nixosConfigurations = {
default = lib.nixosSystem {
modules = [ ( ./. + "/configuration.nix" ) ];
specialArgs = { inherit systemSettings };
};
};
homeConfigurations = {
zer0day = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ( ./. + "/home.nix" ) ];
extraSpecialArgs = { inherit homeSettings };
};
};
};
}