2024-02-29 17:06:55 -05:00
|
|
|
{
|
2024-03-13 14:17:21 -04:00
|
|
|
description = "Aly's NixOS flake.";
|
2024-02-29 17:06:55 -05:00
|
|
|
|
|
|
|
inputs = {
|
2024-10-14 23:53:48 -04:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-07-09 19:17:53 -04:00
|
|
|
|
|
|
|
agenix = {
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
};
|
|
|
|
|
2024-12-19 11:40:15 -05:00
|
|
|
chaotic = {
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
|
|
|
};
|
|
|
|
|
2024-07-09 19:17:53 -04:00
|
|
|
disko = {
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
url = "github:nix-community/disko";
|
|
|
|
};
|
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-10-14 23:53:48 -04:00
|
|
|
url = "github:nix-community/home-manager/master";
|
2024-07-09 19:17:53 -04:00
|
|
|
};
|
2024-06-22 23:38:24 -04:00
|
|
|
|
2024-07-09 19:17:53 -04:00
|
|
|
iio-hyprland = {
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
url = "github:JeanSchoeller/iio-hyprland";
|
|
|
|
};
|
|
|
|
|
2024-08-24 15:25:41 -04:00
|
|
|
lanzaboote = {
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-08-26 18:35:57 -04:00
|
|
|
url = "github:nix-community/lanzaboote/v0.4.1";
|
2024-08-24 15:25:41 -04:00
|
|
|
};
|
|
|
|
|
2024-07-06 19:58:17 -04:00
|
|
|
nur.url = "github:nix-community/NUR";
|
2024-07-09 19:17:53 -04:00
|
|
|
|
2024-08-15 17:12:48 -04:00
|
|
|
stylix = {
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-11-15 06:47:28 -05:00
|
|
|
url = "github:danth/stylix/master";
|
2024-08-15 17:12:48 -04:00
|
|
|
};
|
2024-09-06 17:31:20 -04:00
|
|
|
|
|
|
|
wallpapers = {
|
|
|
|
url = "github:alyraffauf/wallpapers";
|
|
|
|
flake = false; # This is important to specify that it's a non-flake
|
|
|
|
};
|
2024-03-12 22:44:08 -04:00
|
|
|
};
|
2024-02-29 17:06:55 -05:00
|
|
|
|
2024-03-21 13:00:26 -04:00
|
|
|
nixConfig = {
|
2024-07-09 19:17:53 -04:00
|
|
|
accept-flake-config = true;
|
|
|
|
|
2024-07-08 17:54:12 -04:00
|
|
|
extra-substituters = [
|
|
|
|
"https://alyraffauf.cachix.org"
|
2024-12-19 11:40:15 -05:00
|
|
|
"https://chaotic-nyx.cachix.org/"
|
2024-07-08 17:54:12 -04:00
|
|
|
"https://nix-community.cachix.org"
|
2024-10-14 23:53:48 -04:00
|
|
|
"https://nix-gaming.cachix.org"
|
2024-07-08 17:54:12 -04:00
|
|
|
];
|
2024-07-09 19:17:53 -04:00
|
|
|
|
2024-03-21 13:00:26 -04:00
|
|
|
extra-trusted-public-keys = [
|
2024-07-08 17:54:12 -04:00
|
|
|
"alyraffauf.cachix.org-1:GQVrRGfjTtkPGS8M6y7Ik0z4zLt77O0N25ynv2gWzDM="
|
2024-12-19 11:40:15 -05:00
|
|
|
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8"
|
2024-07-08 17:54:12 -04:00
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
2024-10-14 23:53:48 -04:00
|
|
|
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
2024-03-21 13:00:26 -04:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-07-09 19:17:53 -04:00
|
|
|
outputs = {self, ...}: let
|
2024-09-08 20:33:10 -04:00
|
|
|
allLinuxSystems = [
|
2024-05-24 09:37:37 -04:00
|
|
|
"aarch64-linux"
|
2024-07-07 23:06:17 -04:00
|
|
|
"x86_64-linux"
|
2024-09-08 20:33:10 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
allMacSystems = [
|
2024-07-07 23:06:17 -04:00
|
|
|
"aarch64-darwin"
|
2024-05-24 09:37:37 -04:00
|
|
|
"x86_64-darwin"
|
2024-07-07 23:06:17 -04:00
|
|
|
];
|
|
|
|
|
2024-09-08 20:33:10 -04:00
|
|
|
allSystems = allLinuxSystems ++ allMacSystems;
|
|
|
|
|
|
|
|
forAllLinuxSystems = f:
|
|
|
|
self.inputs.nixpkgs.lib.genAttrs allLinuxSystems (system:
|
|
|
|
f {
|
2024-12-15 14:09:58 -05:00
|
|
|
pkgs = import self.inputs.nixpkgs {
|
|
|
|
inherit overlays system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
2024-09-08 20:33:10 -04:00
|
|
|
});
|
|
|
|
|
2024-09-05 22:41:27 -04:00
|
|
|
forAllSystems = f:
|
|
|
|
self.inputs.nixpkgs.lib.genAttrs allSystems (system:
|
|
|
|
f {
|
2024-12-15 14:09:58 -05:00
|
|
|
pkgs = import self.inputs.nixpkgs {
|
|
|
|
inherit overlays system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
2024-09-05 22:41:27 -04:00
|
|
|
});
|
2024-07-07 23:06:17 -04:00
|
|
|
|
2024-07-09 19:17:53 -04:00
|
|
|
forAllHosts = self.inputs.nixpkgs.lib.genAttrs [
|
2024-07-07 23:06:17 -04:00
|
|
|
"fallarbor"
|
|
|
|
"lavaridge"
|
|
|
|
"mauville"
|
|
|
|
"rustboro"
|
2024-08-22 06:21:00 -04:00
|
|
|
"slateport"
|
2024-07-07 23:06:17 -04:00
|
|
|
];
|
2024-12-15 14:09:58 -05:00
|
|
|
|
|
|
|
overlays = [
|
|
|
|
self.inputs.nur.overlays.default
|
|
|
|
self.overlays.default
|
|
|
|
];
|
2024-07-07 23:06:17 -04:00
|
|
|
in {
|
2024-09-08 20:33:10 -04:00
|
|
|
devShells = forAllLinuxSystems ({pkgs}: {
|
2024-09-05 22:41:27 -04:00
|
|
|
default = pkgs.mkShell {
|
|
|
|
packages =
|
|
|
|
(with pkgs; [
|
2024-09-13 09:38:30 -04:00
|
|
|
e2fsprogs
|
2024-09-05 22:41:27 -04:00
|
|
|
git
|
|
|
|
mdformat
|
2024-09-05 22:58:21 -04:00
|
|
|
nh
|
2024-10-19 14:43:33 -04:00
|
|
|
nix-update
|
2024-09-05 22:41:27 -04:00
|
|
|
ruby
|
2024-09-05 22:58:21 -04:00
|
|
|
sbctl
|
2024-09-05 22:41:27 -04:00
|
|
|
])
|
|
|
|
++ [
|
|
|
|
self.formatter.${pkgs.system}
|
|
|
|
self.inputs.agenix.packages.${pkgs.system}.default
|
|
|
|
self.packages.${pkgs.system}.default
|
|
|
|
];
|
2024-09-12 22:28:18 -04:00
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
export FLAKE="."
|
|
|
|
'';
|
2024-09-05 22:41:27 -04:00
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
formatter = forAllSystems ({pkgs}: pkgs.alejandra);
|
2024-07-07 23:06:17 -04:00
|
|
|
|
2024-12-13 20:54:04 -05:00
|
|
|
homeConfigurations = {
|
|
|
|
"aly@petalburg" = self.inputs.home-manager.lib.homeManagerConfiguration {
|
2024-12-14 16:05:23 -05:00
|
|
|
extraSpecialArgs = {inherit self;};
|
2024-12-15 13:45:59 -05:00
|
|
|
pkgs = import self.inputs.nixpkgs {
|
2024-12-15 14:09:58 -05:00
|
|
|
inherit overlays;
|
|
|
|
config.allowUnfree = true; # Allow unfree packages
|
2024-12-15 13:45:59 -05:00
|
|
|
system = "x86_64-linux";
|
|
|
|
};
|
2024-12-13 20:54:04 -05:00
|
|
|
|
|
|
|
modules = [
|
2024-12-14 16:05:23 -05:00
|
|
|
self.homeManagerModules.aly-petalburg
|
2024-12-13 20:54:04 -05:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-07-07 21:07:35 -04:00
|
|
|
homeManagerModules = {
|
2024-07-09 19:17:53 -04:00
|
|
|
default = import ./homeManagerModules self;
|
2024-09-27 21:58:40 -04:00
|
|
|
aly = import ./homes/aly self;
|
2024-12-14 16:05:23 -05:00
|
|
|
aly-petalburg = import ./homes/aly/petalburg.nix self;
|
2024-07-09 19:17:53 -04:00
|
|
|
dustin = import ./homes/dustin self;
|
2024-07-07 21:07:35 -04:00
|
|
|
};
|
2024-06-11 14:25:31 -04:00
|
|
|
|
2024-07-07 19:17:35 -04:00
|
|
|
nixosModules = {
|
2024-09-27 21:58:40 -04:00
|
|
|
common-auto-upgrade = import ./common/autoUpgrade.nix;
|
|
|
|
common-base = import ./common/base.nix;
|
2024-12-20 21:31:05 -05:00
|
|
|
common-lanzaboote = import ./common/lanzaboote.nix;
|
2024-09-27 21:58:40 -04:00
|
|
|
common-locale = import ./common/locale.nix;
|
|
|
|
common-mauville-share = import ./common/samba.nix;
|
|
|
|
common-nix = import ./common/nix.nix;
|
|
|
|
common-pkgs = import ./common/pkgs.nix;
|
2024-12-20 21:31:05 -05:00
|
|
|
common-systemd-boot = import ./common/systemd-boot.nix;
|
2024-09-27 21:58:40 -04:00
|
|
|
common-tailscale = import ./common/tailscale.nix;
|
|
|
|
common-wifi-profiles = import ./common/wifi.nix;
|
2024-09-27 10:21:18 -04:00
|
|
|
|
2024-10-20 17:29:15 -04:00
|
|
|
hw-common = import ./hwModules/common;
|
2024-09-27 10:21:18 -04:00
|
|
|
hw-common-amd-cpu = import ./hwModules/common/gpu/amd;
|
|
|
|
hw-common-amd-gpu = import ./hwModules/common/cpu/amd;
|
|
|
|
hw-common-bluetooth = import ./hwModules/common/bluetooth;
|
2024-10-20 17:29:15 -04:00
|
|
|
hw-common-gaming = import ./hwModules/common/gaming;
|
2024-09-27 10:21:18 -04:00
|
|
|
hw-common-intel-cpu = import ./hwModules/common/cpu/intel;
|
|
|
|
hw-common-intel-gpu = import ./hwModules/common/gpu/intel;
|
|
|
|
hw-common-laptop = import ./hwModules/common/laptop;
|
|
|
|
hw-common-laptop-intel-cpu = import ./hwModules/common/laptop/intel-cpu.nix;
|
|
|
|
hw-common-ssd = import ./hwModules/common/ssd;
|
2024-11-24 20:32:06 -05:00
|
|
|
|
|
|
|
hw-asus-tuf-a16-amd-7030 = import ./hwModules/asus/tuf/a16/amd-7030/default.nix;
|
2024-09-27 21:58:40 -04:00
|
|
|
hw-framework-13-amd-7000 = import ./hwModules/framework/13/amd-7000;
|
|
|
|
hw-framework-13-intel-11th = import ./hwModules/framework/13/intel-11th;
|
|
|
|
hw-thinkpad-t440p = import ./hwModules/thinkpad/t440p;
|
2024-08-22 07:46:19 -04:00
|
|
|
|
2024-07-09 19:17:53 -04:00
|
|
|
nixos = import ./nixosModules self;
|
|
|
|
users = import ./userModules self;
|
2024-07-07 19:17:35 -04:00
|
|
|
};
|
2024-07-07 17:12:00 -04:00
|
|
|
|
2024-07-07 23:06:17 -04:00
|
|
|
nixosConfigurations = forAllHosts (
|
|
|
|
host:
|
2024-07-09 19:17:53 -04:00
|
|
|
self.inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
specialArgs = {inherit self;};
|
2024-12-15 14:09:58 -05:00
|
|
|
|
2024-07-07 23:06:17 -04:00
|
|
|
modules = [
|
|
|
|
./hosts/${host}
|
2024-07-09 19:17:53 -04:00
|
|
|
self.inputs.agenix.nixosModules.default
|
2024-12-19 11:40:15 -05:00
|
|
|
self.inputs.chaotic.homeManagerModules.default
|
2024-07-09 19:17:53 -04:00
|
|
|
self.inputs.disko.nixosModules.disko
|
|
|
|
self.inputs.home-manager.nixosModules.home-manager
|
2024-08-24 15:25:41 -04:00
|
|
|
self.inputs.lanzaboote.nixosModules.lanzaboote
|
2024-08-15 15:55:39 -04:00
|
|
|
self.inputs.stylix.nixosModules.stylix
|
2024-07-07 23:06:17 -04:00
|
|
|
self.nixosModules.nixos
|
|
|
|
self.nixosModules.users
|
|
|
|
{
|
|
|
|
home-manager = {
|
|
|
|
backupFileExtension = "backup";
|
2024-07-09 19:17:53 -04:00
|
|
|
extraSpecialArgs = {inherit self;};
|
2024-07-07 23:06:17 -04:00
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
};
|
2024-12-15 14:09:58 -05:00
|
|
|
|
|
|
|
nixpkgs = {
|
|
|
|
inherit overlays;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
2024-07-07 23:06:17 -04:00
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
);
|
2024-10-19 14:43:33 -04:00
|
|
|
|
2024-12-20 21:43:36 -05:00
|
|
|
overlays.default = import ./overlays/default.nix {inherit self;};
|
2024-10-19 14:43:33 -04:00
|
|
|
|
|
|
|
packages = forAllLinuxSystems ({pkgs}: rec {
|
|
|
|
default = clean-install;
|
|
|
|
|
|
|
|
clean-install = pkgs.writeShellApplication {
|
|
|
|
name = "clean-install";
|
|
|
|
text = ./flake/clean-install.sh;
|
|
|
|
};
|
|
|
|
|
2024-10-19 15:25:56 -04:00
|
|
|
rofi-bluetooth = pkgs.callPackage ./pkgs/rofi-bluetooth.nix {};
|
2024-10-19 14:43:33 -04:00
|
|
|
});
|
2024-04-07 22:16:33 -04:00
|
|
|
};
|
2024-03-06 22:14:16 -05:00
|
|
|
}
|