0
0
Fork 0
flake/flake.nix

224 lines
6.2 KiB
Nix
Raw Normal View History

2022-12-21 06:27:41 +00:00
{
2023-01-02 07:09:38 +00:00
description = "The nix flake for all my systems";
inputs = {
2025-01-03 01:26:51 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2022-12-28 08:22:43 +00:00
2023-01-02 07:09:38 +00:00
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2022-12-28 08:22:43 +00:00
2025-01-03 01:26:51 +00:00
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
2023-01-02 05:19:31 +00:00
2025-01-03 01:26:51 +00:00
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
apple-fonts.inputs.nixpkgs.follows = "nixpkgs";
2023-01-02 08:56:35 +00:00
2025-01-03 01:26:51 +00:00
catppuccin.url = "github:catppuccin/nix";
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
2025-01-03 01:26:51 +00:00
alejandra.url = "github:kamadorueda/alejandra";
alejandra.inputs.nixpkgs.follows = "nixpkgs";
2025-01-03 01:26:51 +00:00
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
2023-01-02 07:09:38 +00:00
};
2025-01-03 01:26:51 +00:00
outputs = inputs @ {
2023-01-02 07:09:38 +00:00
self,
nixpkgs,
home-manager,
2025-01-03 01:26:51 +00:00
nixos-facter-modules,
catppuccin,
alejandra,
nix-flatpak,
2023-01-02 07:09:38 +00:00
...
}: let
modules = {
2025-01-03 01:26:51 +00:00
hardware = {
boot = {
grub = [
./hardware/boot/grub.nix
];
};
devices = {
wahnix = [
./hardware/devices/wahnix.nix
];
};
drivers = {
controllers = {
xbox = [
./hardware/drivers/controllers/xbox.nix
];
};
cpu = {
intel = [
./hardware/drivers/cpu/intel.nix
];
};
video = {
base = [
./hardware/drivers/video/base.nix
];
intel = [
./hardware/drivers/video/intel.nix
];
nvidia = [
./hardware/drivers/video/nvidia.nix
];
};
};
};
2023-01-02 07:09:38 +00:00
nixos = {
2025-01-03 01:26:51 +00:00
base = [
./system/nix.nix
2023-01-02 07:09:38 +00:00
];
2025-01-03 01:26:51 +00:00
desktops = {
apps = [
./system/desktop/apps.nix
];
displaymanagers = {
tuigreet = [
./system/desktop/displaymanagers/tuigreet.nix
];
};
environments = {
hyprland = [
./system/desktop/environments/hyprland.nix
];
};
};
security = {
sudo = [
./system/security/sudo.nix
];
};
services = {
2025-01-03 01:26:51 +00:00
bluetooth = [
./system/services/bluetooth.nix
];
flatpak = [
./system/services/flatpak.nix
];
networkmanager = [
./system/services/networkmanager.nix
];
openssh = [
./system/services/openssh.nix
];
pipewire = [
./system/services/pipewire.nix
];
};
2025-01-03 01:26:51 +00:00
users = {
relms = [
./system/users/relms.nix
2023-01-02 07:09:38 +00:00
];
2025-01-03 01:26:51 +00:00
};
};
home = {
apps = {
audio = {
pulseaudio = [
./home/modules/apps/audio/pulesaudio.nix
];
};
browsers = {
firefox = [
./home/modules/apps/browsers/firefox.nix
];
};
terminals = {
kitty = [
./home/modules/apps/terminals/kitty.nix
];
};
flatpak = [
./home/modules/apps/flatpak.nix
];
};
cli = {
development = [
./home/modules/cli/development.nix
./home/modules/cli/neovim.nix
];
shell = [
./home/modules/cli/shell.nix
];
};
desktop = {
environments = {
hyprland = [
./home/modules/desktop/environments/hyprland.nix
];
};
};
users = {
relms = [
./home/users/relms.nix
2023-01-02 07:09:38 +00:00
];
};
};
};
in {
2025-01-03 01:26:51 +00:00
packages.x86_64-linux.nerd-fonts-sf-mono-ligatures = nixpkgs.legacyPackages.x86_64-linux.callPackage ./pkgs/fonts/nerd-fonts-sf-mono-ligatures.nix {};
2025-01-03 01:26:51 +00:00
nixosConfigurations = {
wahnix = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
2025-01-03 01:26:51 +00:00
specialArgs = {
inherit inputs;
};
modules =
2025-01-03 01:26:51 +00:00
modules.nixos.base
++ modules.nixos.desktops.apps
++ modules.nixos.desktops.displaymanagers.tuigreet
++ modules.nixos.desktops.environments.hyprland
++ modules.nixos.security.sudo
++ modules.nixos.services.bluetooth
++ modules.nixos.services.flatpak
++ modules.nixos.services.networkmanager
++ modules.nixos.services.openssh
++ modules.nixos.services.pipewire
++ modules.nixos.users.relms
++ modules.hardware.boot.grub
++ modules.hardware.devices.wahnix
++ modules.hardware.drivers.controllers.xbox
++ modules.hardware.drivers.cpu.intel
++ modules.hardware.drivers.video.base
++ modules.hardware.drivers.video.intel
++ modules.hardware.drivers.video.nvidia
++ [
2025-01-03 01:26:51 +00:00
nix-flatpak.nixosModules.nix-flatpak
catppuccin.nixosModules.catppuccin
nixos-facter-modules.nixosModules.facter
{config.facter.reportPath = ./wahnix-facter.json;}
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit self;
inherit inputs;
};
home-manager.users.relms = {
imports =
modules.home.users.relms
++ modules.home.apps.audio.pulseaudio
++ modules.home.apps.browsers.firefox
++ modules.home.apps.terminals.kitty
++ modules.home.apps.flatpak
++ modules.home.cli.development
++ modules.home.cli.shell
++ modules.home.desktop.environments.hyprland
++ [
catppuccin.homeManagerModules.catppuccin
nix-flatpak.homeManagerModules.nix-flatpak
];
};
}
];
};
2023-01-02 07:09:38 +00:00
};
2022-12-31 09:27:24 +00:00
2025-01-03 01:26:51 +00:00
formatter.aarch64-linux = alejandra.defaultPackage.aarch64-linux;
formatter.x86_64-linux = alejandra.defaultPackage.x86_64-linux;
2023-01-02 07:09:38 +00:00
};
2022-12-21 06:27:41 +00:00
}