nixos-config/flake.nix

117 lines
2.8 KiB
Nix
Raw Normal View History

2022-12-18 17:01:34 +01:00
{
2022-12-19 15:45:59 +01:00
description = "My nix setup";
2022-12-18 17:01:34 +01:00
inputs = {
2023-03-05 10:48:43 +01:00
nixpkgs = {
url = github:nixos/nixpkgs/nixos-unstable;
};
flake-utils = {
url = github:numtide/flake-utils;
};
nixos-hardware = {
url = github:nixos/nixos-hardware;
};
2023-01-22 14:09:16 +01:00
2023-03-05 10:48:43 +01:00
home-manager = {
url = github:nix-community/home-manager;
inputs = {
nixpkgs.follows = "nixpkgs";
utils.follows = "flake-utils";
};
};
2022-12-18 17:01:34 +01:00
2023-03-05 10:48:43 +01:00
nix-colors = {
url = github:Misterio77/nix-colors;
};
sops-nix = {
url = github:Mic92/sops-nix;
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-protocols = {
url = github:hyprwm/hyprland-protocols;
inputs.nixpkgs.follows = "nixpkgs";
};
xdph = {
url = github:hyprwm/xdg-desktop-portal-hyprland;
inputs = {
nixpkgs.follows = "nixpkgs";
hyprland-protocols.follows = "hyprland-protocols";
};
};
hyprland = {
url = github:hyprwm/Hyprland;
inputs = {
nixpkgs.follows = "nixpkgs";
hyprland-protocols.follows = "hyprland-protocols";
xdph.follows = "xdph";
2022-12-18 17:01:34 +01:00
};
2023-03-05 10:48:43 +01:00
};
hyprpaper = {
url = github:hyprwm/hyprpaper;
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = github:pta2002/nixvim;
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
2023-01-23 17:30:09 +01:00
};
2022-12-18 17:01:34 +01:00
};
};
2023-03-05 10:48:43 +01:00
outputs =
{ self
, nixpkgs
, home-manager
, hyprland
, sops-nix
, nix-colors
, nixos-hardware
, nixvim
, ...
}@attrs: {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
nixosConfigurations = {
thinkpad = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs.inputs = attrs;
modules = [
./hosts/thinkpad
./users/rouven
nixos-hardware.nixosModules.common-pc-laptop-ssd
home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops
{
home-manager.extraSpecialArgs = attrs;
home-manager.users.rouven = {
imports = [
nix-colors.homeManagerModules.default
hyprland.homeManagerModules.default
nixvim.homeManagerModules.nixvim
sops-nix.homeManagerModules.sops
];
config = {
colorScheme = nix-colors.colorSchemes.dracula;
};
};
}
];
};
nuc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs.inputs = attrs;
modules = [
nixos-hardware.nixosModules.intel-nuc-8i7beh
./hosts/nuc
sops-nix.nixosModules.sops
];
};
};
};
2022-12-18 17:01:34 +01:00
}