nix-config/flake.nix

156 lines
4.3 KiB
Nix
Raw Normal View History

2025-03-24 12:14:46 +01:00
{
2025-04-04 09:45:57 +02:00
description = "NixOS configuration of DerGrumpf";
2025-03-24 12:14:46 +01:00
# the nixConfig here only affects the flake itself, not the system configuration!
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
inputs = {
2025-04-03 13:06:51 +02:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
2025-03-25 01:59:21 +01:00
hyprland.url = "github:hyprwm/Hyprland";
2025-08-16 19:28:53 +02:00
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
2025-09-03 10:03:29 +02:00
nixcord.url = "github:kaylorben/nixcord";
/*
nixvim = {
url = "github:nix-community/nixvim/nixos-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
*/
2025-05-03 13:19:50 +02:00
2025-04-08 19:51:19 +02:00
catppuccin.url = "github:catppuccin/nix";
2025-03-25 01:59:21 +01:00
2025-04-03 13:06:51 +02:00
home-manager.url = "github:nix-community/home-manager/release-24.11";
2025-03-24 12:14:46 +01:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2025-03-25 01:59:21 +01:00
hyprland-plugins = {
2025-09-03 10:03:29 +02:00
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
2025-03-25 01:59:21 +01:00
};
2025-03-24 12:14:46 +01:00
};
2025-09-03 10:03:29 +02:00
outputs =
inputs@{
self,
nixpkgs,
home-manager,
catppuccin,
...
}:
{
packages.x86_64-linux.default = self.nixosConfigurations.iso.config.system.build.isoImage;
nixosConfigurations = {
iso = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(
{ pkgs, modulesPath, ... }:
{
2025-03-24 23:45:29 +01:00
imports = [ (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") ];
2025-04-04 09:45:57 +02:00
environment.systemPackages = with pkgs; [
2025-09-03 10:03:29 +02:00
neovim
git
wget
curl
2025-04-04 09:45:57 +02:00
];
2025-09-03 10:03:29 +02:00
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}
)
2025-03-24 12:14:46 +01:00
];
};
2025-04-04 09:45:57 +02:00
2025-09-03 10:03:29 +02:00
m920q =
let
username = "phil";
specialArgs = {
inherit inputs username;
};
in
nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = "x86_64-linux";
modules = [
./hosts/m920q
./users/${username}/nixos.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.extraSpecialArgs = inputs // specialArgs;
home-manager.users.${username} = import ./users/${username}/home.nix;
home-manager.sharedModules = [
inputs.nixcord.homeModules.nixcord
];
2025-04-06 21:08:39 +02:00
2025-09-03 10:03:29 +02:00
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}
];
};
qemu =
let
username = "phil";
specialArgs = { inherit username; };
in
nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = "x86_64-linux";
modules = [
./hosts/qemu
./users/${username}/nixos.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs // specialArgs;
home-manager.users.${username} = import ./users/${username}/home.nix;
}
];
};
hp15-n028sg =
let
username = "phil";
specialArgs = { inherit username; };
in
nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = "x86_64-linux";
modules = [
./hosts/hp15-n028sg
./users/${username}/nixos.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs // specialArgs;
home-manager.users.${username} = import ./users/${username}/home.nix;
}
];
};
};
2025-03-24 12:14:46 +01:00
};
}