nix/flake.nix

109 lines
2.9 KiB
Nix
Raw Normal View History

2023-08-14 07:11:18 -04:00
{
2023-08-14 07:45:15 -04:00
description = "mehbark's NixOS configuration";
2023-08-14 07:11:18 -04:00
inputs = {
2023-09-10 00:04:10 -04:00
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
2023-10-31 00:04:16 -04:00
fh.url = "https://flakehub.com/f/DeterminateSystems/fh/*.tar.gz";
2023-09-10 00:04:10 -04:00
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
nixos-generators.url = "github:nix-community/nixos-generators";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
hyprland.url = "github:hyprwm/Hyprland";
2023-10-31 00:04:16 -04:00
2023-11-03 23:41:31 -04:00
pesterchum.url = "git+https://g.pyrope.net/pesterchum";
pesterchum.inputs.nixpkgs.follows = "nixpkgs";
2023-10-31 00:04:16 -04:00
# for l8r :::;)
#homeage.url = "github:jordanisaacs/homeage";
#homeage.inputs.nixpkgs.follows = "nixpkgs";
2024-11-23 13:21:04 -05:00
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
};
2023-11-03 23:41:31 -04:00
outputs = inputs@{
self,
nixpkgs,
home-manager,
flake-utils,
nixos-generators,
hyprland,
fh,
pesterchum,
2024-11-24 03:20:56 -05:00
nix-darwin,
...
}:
2023-08-15 18:19:41 -04:00
let
2023-08-15 18:31:53 -04:00
# :(
# could do like nix-i3, nix-hyprland but that would be LAME
2023-08-16 03:28:41 -04:00
conf = (import ./build.conf.nix) { wm = "plasma"; };
2023-08-15 21:11:02 -04:00
modules = [
((import ./configuration.nix) conf)
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
2023-11-03 23:41:31 -04:00
home-manager.users.mbk = (import ./home.nix) {
inherit conf;
more-packages = [
pesterchum.packages.x86_64-linux.default
];
};
2023-08-15 21:11:02 -04:00
}
2023-10-31 00:04:16 -04:00
{
environment.systemPackages = [ fh.packages.x86_64-linux.default ];
}
# V evil V
2023-10-27 23:44:20 -04:00
# (nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
2023-08-15 21:11:02 -04:00
];
2023-08-15 18:19:41 -04:00
in
{
2024-11-23 13:21:04 -05:00
nixosConfigurations = {
2023-08-14 07:45:15 -04:00
nix = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
2023-09-04 07:45:29 -04:00
inherit modules;
specialArgs = { inherit inputs; };
2023-08-15 21:11:02 -04:00
};
};
homeConfigurations.mbk = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = if conf.wm == "hyprland" then modules ++ [
hyprland.homeManagerModules.default
{wayland.windowManager.hyprland.enable = true;}
] else modules;
};
2024-11-23 13:21:04 -05:00
darwinConfigurations = {
mac = nix-darwin.lib.darwinSystem {
modules = [
./darwin.nix
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.clark = import ./home.nix {inherit conf; darwin = true;};
}
];
specialArgs = { inherit inputs; };
};
};
# meh, doesn't rly work
2023-08-15 21:11:02 -04:00
packages.x86_64-linux = {
iso = nixos-generators.nixosGenerate {
system = "x86_64-linux";
modules = modules;
format = "iso";
2023-08-14 07:45:15 -04:00
};
2023-08-15 18:31:53 -04:00
};
2023-08-14 07:45:15 -04:00
};
2023-08-14 07:11:18 -04:00
}