nix-configs/flake.nix

176 lines
5.1 KiB
Nix
Raw Normal View History

2022-08-02 07:55:12 +00:00
{
2022-10-02 16:22:40 +00:00
description = "system";
2022-08-02 07:55:12 +00:00
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
2023-11-30 13:58:50 +00:00
nixpkgs-stable.url = "nixpkgs/nixos-23.11";
2024-04-03 16:37:15 +00:00
nixpkgs-unstable-small.url = "nixpkgs/nixos-unstable-small";
2024-06-12 11:23:20 +00:00
helix-inline-diags = {
2024-07-30 20:06:36 +00:00
url = "github:helix-editor/helix";
2024-06-12 11:23:20 +00:00
inputs = {
crane.follows = "crane";
nixpkgs.follows = "nixpkgs";
};
};
2024-05-06 19:27:45 +00:00
lix-module = {
url = "git+https://git.lix.systems/lix-project/nixos-module";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-08-02 07:55:12 +00:00
home-manager = {
2023-10-28 20:25:06 +00:00
url = "github:nix-community/home-manager";
2022-10-02 15:39:04 +00:00
inputs.nixpkgs.follows = "nixpkgs";
2022-08-12 10:14:32 +00:00
};
2023-07-29 15:19:17 +00:00
nixos-hardware.url = "github:networkException/nixos-hardware/apple-t2-init";
2022-10-02 15:39:04 +00:00
mac-brcm-fw = {
2024-01-30 18:47:28 +00:00
url = "path:/home/jade/nix-configs/mac-brcm-fw";
2022-10-02 15:39:04 +00:00
flake = false;
};
2024-04-20 18:07:07 +00:00
crane = {
url = "github:ipetkov/crane";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-08-02 07:55:12 +00:00
};
outputs = {
self,
nixpkgs,
nixpkgs-stable,
2024-04-03 16:37:15 +00:00
nixpkgs-unstable-small,
2024-06-12 11:23:20 +00:00
helix-inline-diags,
2024-05-06 19:27:45 +00:00
lix-module,
home-manager,
nixos-hardware,
mac-brcm-fw,
2024-04-16 19:37:01 +00:00
fenix,
2024-04-20 18:07:07 +00:00
crane,
...
} @ inputs: let
2024-04-16 19:37:01 +00:00
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
pkgs-unstable-small = nixpkgs-unstable-small.legacyPackages.${system};
2024-04-20 18:07:07 +00:00
crane-lib = crane.lib.${system};
2024-04-16 19:37:01 +00:00
rs-toolchain = with fenix.packages.${system};
combine [
2024-07-30 20:06:36 +00:00
complete.toolchain
2024-04-16 19:37:01 +00:00
];
2024-04-20 18:07:07 +00:00
# rs-platform = pkgs.makeRustPlatform {
# cargo = rs-toolchain;
# rustc = rs-toolchain;
# };
2024-04-16 19:37:01 +00:00
rs-programs = final: prev: {
2024-04-20 18:07:07 +00:00
# s10e-jrnl = rs-platform.buildRustPackage {
# pname = "jrnl";
# version = "0.0.1";
# src = ./programs/jrnl;
# cargoLock.lockFile = ./programs/jrnl/Cargo.lock;
# };
s10e-jrnl = crane-lib.buildPackage {
2024-05-06 19:49:11 +00:00
pname = "s10e-bs";
version = "0.0.1";
2024-04-20 18:07:07 +00:00
src = crane-lib.cleanCargoSource (crane-lib.path ./.);
2024-04-16 19:37:01 +00:00
};
};
in {
devShells."x86_64-linux".default = pkgs.mkShell {
buildInputs = [
(pkgs.haskellPackages.ghcWithPackages
2024-02-27 17:18:55 +00:00
(pkgs:
with pkgs; [
xmonad
xmonad-contrib
xmobar
statgrab
]))
2024-04-16 19:37:01 +00:00
rs-toolchain
pkgs.haskell-language-server
];
};
2022-08-02 07:55:12 +00:00
nixosConfigurations = {
monosodium-glutamate-g = nixpkgs.lib.nixosSystem {
2022-11-01 17:22:53 +00:00
specialArgs = {
2024-06-12 11:23:20 +00:00
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module helix-inline-diags;
2022-11-01 17:22:53 +00:00
};
2022-08-02 07:55:12 +00:00
system = "x86_64-linux";
modules = [
2023-04-22 11:10:34 +00:00
./hosts/monosodium-glutamate-g/configuration.nix
home-manager.nixosModules.home-manager
{
2022-08-02 07:55:12 +00:00
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
2024-04-20 18:07:07 +00:00
home-manager.extraSpecialArgs = {
inherit pkgs-unstable-small pkgs-stable;
};
home-manager.users.jade = {
nixosConfig,
pkgs,
...
}: {
2022-08-12 10:14:32 +00:00
home.sessionVariables.TZ = nixosConfig.time.timeZone;
home.stateVersion = "${nixosConfig.system.stateVersion}";
2023-09-08 23:10:22 +00:00
};
}
];
};
catbook-j = nixpkgs.lib.nixosSystem {
specialArgs = {
2024-06-12 11:23:20 +00:00
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module helix-inline-diags;
2023-09-08 23:10:22 +00:00
};
system = "x86_64-linux";
modules = [
./hosts/catbook-j/configuration.nix
home-manager.nixosModules.home-manager
{
2023-09-08 23:10:22 +00:00
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
2024-04-20 18:07:07 +00:00
home-manager.extraSpecialArgs = {
inherit pkgs-unstable-small pkgs-stable;
};
home-manager.users.jade = {
nixosConfig,
pkgs,
...
}: {
2023-09-08 23:10:22 +00:00
home.sessionVariables.TZ = nixosConfig.time.timeZone;
2023-09-25 18:11:47 +00:00
home.stateVersion = "22.11";
2022-08-12 10:14:32 +00:00
};
}
2022-08-02 07:55:12 +00:00
];
};
2022-08-31 20:49:48 +00:00
potatobook-g = nixpkgs.lib.nixosSystem {
2022-11-01 17:22:53 +00:00
specialArgs = {
2024-06-12 11:23:20 +00:00
inherit inputs pkgs-unstable-small rs-programs lix-module helix-inline-diags;
2022-11-01 17:22:53 +00:00
};
2022-08-31 20:49:48 +00:00
system = "x86_64-linux";
modules = [
2022-10-02 16:15:36 +00:00
"${mac-brcm-fw}"
2023-04-22 11:10:34 +00:00
./hosts/potatobook-g/configuration.nix
home-manager.nixosModules.home-manager
{
2022-08-31 20:49:48 +00:00
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
2024-04-20 18:07:07 +00:00
home-manager.extraSpecialArgs = {
inherit pkgs-unstable-small pkgs-stable;
};
home-manager.users.jade = {
nixosConfig,
pkgs,
...
}: {
2022-08-31 20:49:48 +00:00
home.sessionVariables.TZ = nixosConfig.time.timeZone;
home.stateVersion = "${nixosConfig.system.stateVersion}";
};
}
nixos-hardware.nixosModules.apple-t2
];
};
2022-08-02 07:55:12 +00:00
};
};
}