FrameworkNix/flake.nix

76 lines
1.8 KiB
Nix
Raw Normal View History

2024-02-17 12:14:27 +00:00
{
2024-02-23 00:41:38 +00:00
description = "The Nix flake for whatever the fuck it is that Hertog is doing";
2024-02-17 12:14:27 +00:00
inputs = {
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nixpkgs.url = "nixpkgs/nixos-unstable";
nix-flatpak.url = "github:gmodena/nix-flatpak";
2024-02-19 23:19:01 +00:00
nix-colors.url = "github:misterio77/nix-colors";
2024-02-17 12:14:27 +00:00
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
};
2024-02-19 23:19:01 +00:00
outputs = {
self,
nixos-hardware,
nixpkgs,
nix-flatpak,
nix-colors,
2024-02-19 23:19:01 +00:00
nixvim,
home-manager,
...
}@inputs:
2024-02-17 12:14:27 +00:00
let
system = "x86_64-linux";
currentSystem = system;
pkgs = import nixpkgs {
inherit system;
};
lib = nixpkgs.lib;
in {
# Laptop NixOS configuration
nixosConfigurations = {
2024-02-22 19:27:34 +00:00
sam = lib.nixosSystem {
2024-02-17 12:14:27 +00:00
inherit system;
modules = [
2024-02-21 13:11:02 +00:00
nixos-hardware.nixosModules.framework-11th-gen-intel
2024-02-19 23:19:01 +00:00
./system
2024-03-11 17:31:39 +00:00
./system/hardware-configuration.nix
2024-02-19 23:19:01 +00:00
./programs
./hertog/user.nix
2024-02-21 13:11:02 +00:00
nix-flatpak.nixosModules.nix-flatpak
2024-02-17 12:14:27 +00:00
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users = {
2024-02-19 23:19:01 +00:00
hertog = import hertog/home.nix;
2024-02-17 12:14:27 +00:00
};
2024-02-21 14:21:46 +00:00
extraSpecialArgs = {
inherit inputs;
};
2024-02-17 12:14:27 +00:00
};
}
];
specialArgs = {
inputs = inputs;
inherit nix-colors;
2024-02-17 12:14:27 +00:00
inherit system;
};
};
};
packages."${system}" = {
2024-02-19 23:19:01 +00:00
vim = nixvim.legacyPackages."${system}".makeNixvimWithModule {
2024-02-17 12:14:27 +00:00
module = import ./programs/vim;
};
};
};
}