nix-configs/flake.nix

130 lines
3.8 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";
2025-01-15 14:45:36 +01:00
nixpkgs-stable.url = "nixpkgs/nixos-24.11";
2024-04-03 18:37:15 +02:00
nixpkgs-unstable-small.url = "nixpkgs/nixos-unstable-small";
2025-03-12 02:00:13 +01:00
niri.url = "github:sodiboo/niri-flake";
2025-03-27 19:02:45 +01:00
stylix.url = "github:danth/stylix";
typst-within.url = "github:schrottkatze/typst";
crane.url = "github:ipetkov/crane";
2025-04-01 17:58:07 +02:00
nixcord.url = "github:kaylorben/nixcord";
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
};
2024-04-20 20:07:07 +02:00
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-05-06 21:27:45 +02:00
lix-module,
2025-03-10 15:00:40 +01:00
typst-within,
home-manager,
nixos-hardware,
2025-03-12 02:00:13 +01:00
niri,
2025-03-27 19:02:45 +01:00
stylix,
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};
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
];
2025-03-20 14:53:11 +01:00
crane-lib = (crane.mkLib nixpkgs.legacyPackages.${system}).overrideToolchain rs-toolchain;
2024-04-16 21:37:01 +02:00
rs-programs = final: prev: {
2024-04-20 20:07:07 +02:00
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 = [
2024-04-16 21:37:01 +02:00
rs-toolchain
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 = {
2025-03-12 02:00:13 +01:00
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module niri;
2022-11-01 18:22:53 +01:00
};
2022-08-02 09:55:12 +02:00
system = "x86_64-linux";
modules = [
2025-03-12 02:00:13 +01:00
inputs.niri.nixosModules.niri
2025-03-27 19:02:45 +01:00
stylix.nixosModules.stylix
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 = {
2025-03-10 15:00:40 +01:00
inherit pkgs-unstable-small pkgs-stable typst-within;
2024-04-20 20:07:07 +02:00
};
2025-04-01 17:58:07 +02:00
home-manager.sharedModules = [
inputs.nixcord.homeManagerModules.nixcord
];
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 = {
2025-03-12 02:00:13 +01:00
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module niri;
2023-09-09 01:10:22 +02:00
};
system = "x86_64-linux";
modules = [
2025-03-12 02:00:13 +01:00
inputs.niri.nixosModules.niri
2025-03-27 19:02:45 +01:00
stylix.nixosModules.stylix
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 = {
2025-03-10 15:00:40 +01:00
inherit pkgs-unstable-small pkgs-stable typst-within;
2024-04-20 20:07:07 +02:00
};
2025-04-01 17:58:07 +02:00
home-manager.sharedModules = [
inputs.nixcord.homeManagerModules.nixcord
];
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
];
};
};
};
}