nix-configs/flake.nix

175 lines
5.1 KiB
Nix
Raw Normal View History

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