Added framework of flake in flake.nix
This commit is contained in:
43
flake.nix
Normal file
43
flake.nix
Normal 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 };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user