dotfiles/flake.nix

104 lines
2.6 KiB
Nix
Raw Normal View History

2024-04-28 11:35:35 +02:00
{
description = "Strix nix flake";
2024-04-28 11:35:35 +02:00
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; # current supported
2024-04-28 11:35:35 +02:00
nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; # unstable branch for newer packages
nixpkgs-last.url = "nixpkgs/nixos-24.05"; # one branch before the current one
2024-04-28 11:35:35 +02:00
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
2024-04-28 11:35:35 +02:00
inputs.nixpkgs.follows = "nixpkgs";
};
nvidia-patch = {
url = "github:icewind1991/nvidia-patch-nixos";
inputs.nixpkgs.follows = "nixpkgs";
};
dttyper.url = "git+https://git.4o1x5.dev/4o1x5/dttyper";
romodoro.url = "git+https://git.4o1x5.dev/4o1x5/romodoro";
neo2005.url = "git+https://git.4o1x5.dev/4o1x5/neo2005";
2024-04-28 11:35:35 +02:00
};
outputs =
2025-01-09 09:34:41 +01:00
{
self,
nixpkgs,
home-manager,
nixpkgs-unstable,
nixpkgs-last,
nvidia-patch,
dttyper,
romodoro,
neo2005,
...
}@inputs:
2024-04-28 11:35:35 +02:00
let
system = "x86_64-linux";
overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
last = nixpkgs-last.legacyPackages.${prev.system};
2024-04-28 11:35:35 +02:00
};
in
{
nixosConfigurations.strix = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inputs = inputs;
user = "grape";
2025-01-09 09:34:41 +01:00
# Must be absolute path with no / at the end
dotfilepath = "/home/grape/dotfiles";
};
2024-04-28 11:35:35 +02:00
modules = [
# adding unstable overlay
2025-01-09 09:34:41 +01:00
(
{ config, pkgs, ... }:
{
nixpkgs.overlays = [
overlay-unstable
nvidia-patch.overlays.default
];
}
)
2024-04-28 11:35:35 +02:00
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
2025-01-11 12:03:31 +01:00
./hosts/strix/configuration.nix
2024-04-28 11:35:35 +02:00
];
2024-04-28 11:35:35 +02:00
};
2025-01-11 12:03:31 +01:00
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
2025-01-09 09:34:41 +01:00
inherit system;
specialArgs = {
inputs = inputs;
user = "peach";
dotfilepath = "/home/peach/dotfiles";
};
modules = [
(
{ config, pkgs, ... }:
{
nixpkgs.overlays = [
overlay-unstable
];
}
)
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
2025-01-11 12:03:31 +01:00
./hosts/thinkpad/configuration.nix
2025-01-09 09:34:41 +01:00
];
2024-04-28 11:35:35 +02:00
2025-01-09 09:34:41 +01:00
};
2024-04-28 11:35:35 +02:00
};
}