From 96c5be4d2266a6955471f4a12220e7bb8d0c7c54 Mon Sep 17 00:00:00 2001 From: zer0day Date: Thu, 6 Feb 2025 16:13:49 +0100 Subject: [PATCH] Added framework of flake in flake.nix --- flake.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f865fcf --- /dev/null +++ b/flake.nix @@ -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 }; + }; + }; + }; +} \ No newline at end of file