mirror of
https://github.com/deltathetawastaken/dotfiles.git
synced 2025-12-06 07:16:37 +03:00
system builder flake.nix
This commit is contained in:
parent
cbe06e1d34
commit
c6f5084aa7
49
flake.nix
49
flake.nix
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
# nixpkgs.url = "github:nixos/nixpkgs?rev=ebce8ace41c8ca0d1776de4c5be5c815fb2fb5f7";
|
|
||||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixpkgs2105.url = "github:NixOS/nixpkgs/nixos-21.05";
|
nixpkgs2105.url = "github:NixOS/nixpkgs/nixos-21.05";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
anyrun.url = "github:Kirottu/anyrun";
|
anyrun.url = "github:anyrun-org/anyrun";
|
||||||
# anyrun.inputs.nixpkgs.follows = "nixpkgs";
|
anyrun.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
secrets.url = "git+ssh://git@github.com/deltathetawastaken/secrets.git";
|
secrets.url = "git+ssh://git@github.com/deltathetawastaken/secrets.git";
|
||||||
nixvim.url = "github:nix-community/nixvim";
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
shwewo = {
|
shwewo = {
|
||||||
|
|
@ -21,6 +20,11 @@
|
||||||
url = "github:hyprwm/contrib";
|
url = "github:hyprwm/contrib";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
#hyprland-plugins = {
|
||||||
|
# url = "github:hyprwm/hyprland-plugins";
|
||||||
|
# inputs.hyprland.follows = "hyprland";
|
||||||
|
#};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
|
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
|
||||||
|
|
@ -34,33 +38,32 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
config = { allowUnfree = true; };
|
config = { allowUnfree = true; };
|
||||||
};
|
};
|
||||||
specialArgs = { inherit inputs self stable unstable homeSettings; };
|
specialArgs = { inherit inputs self stable unstable homeSettings; }; #var coz shared between home and system
|
||||||
homeSettings = {
|
homeSettings.home-manager = {
|
||||||
home-manager.useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
useUserPackages = true;
|
||||||
home-manager.users.delta = import ./home/home.nix;
|
users.delta = import ./home/home.nix;
|
||||||
home-manager.extraSpecialArgs = specialArgs;
|
extraSpecialArgs = specialArgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
makeSystem = name: systemModules: nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = specialArgs;
|
||||||
|
modules = [ ./hosts/generic.nix ] ++ systemModules;
|
||||||
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
devShells."x86_64-linux".default = pkgs.mkShell {
|
devShells."x86_64-linux".default = pkgs.mkShell {
|
||||||
name = "delta";
|
name = "delta";
|
||||||
packages = with pkgs; [ gitleaks pre-commit ];
|
packages = with pkgs; [ gitleaks pre-commit ];
|
||||||
shellHook = "pre-commit install &> /dev/null && gitleaks detect -v";
|
shellHook = "pre-commit install &> /dev/null && gitleaks detect -v";
|
||||||
};
|
};
|
||||||
nixosConfigurations.dlaptop = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
nixosConfigurations = {
|
||||||
specialArgs = specialArgs;
|
dlaptop = makeSystem "dlaptop" [ ./hosts/dlaptop/system.nix ];
|
||||||
modules = [ ./hosts/generic.nix ./hosts/dlaptop/system.nix ];
|
intelnuc = makeSystem "intelnuc" [ ./hosts/intelnuc/system.nix ];
|
||||||
};
|
huanan = makeSystem "huanan" [ ./hosts/huanan/system.nix ];
|
||||||
nixosConfigurations.intelnuc = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = specialArgs;
|
|
||||||
modules = [ ./hosts/generic.nix ./hosts/intelnuc/system.nix ];
|
|
||||||
};
|
|
||||||
nixosConfigurations.huanan = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = specialArgs;
|
|
||||||
modules = [ ./hosts/generic.nix ./hosts/huanan/system.nix ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue