system/flake.nix

152 lines
4.4 KiB
Nix
Raw Normal View History

2024-10-14 17:28:31 -04:00
{
description = "Launchpad flake";
inputs = {
# Switched to unstable 10/13/24 Generation 109 and below stable
nixpkgs-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
2024-12-06 13:12:42 -05:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
2024-10-14 17:28:31 -04:00
legacy.url = "github:NixOS/nixpkgs-channels";
# Home manager
2024-12-06 13:12:42 -05:00
home-manager.url = "github:nix-community/home-manager/release-24.11";
2024-10-14 17:28:31 -04:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
2024-11-29 18:31:17 -05:00
# nix-ld.url = "github:Mic92/nix-ld";
# nix-ld.inputs.nixpkgs.follows = "nixpkgs";
2024-10-14 17:28:31 -04:00
base16.url = "github:SenchoPens/base16.nix";
nix-colors.url = "github:misterio77/nix-colors";
tt-schemes = {
url = "github:tinted-theming/schemes";
flake = false;
};
base16-vim = {
url = "github:tinted-theming/base16-vim";
flake = false;
};
# Zen Browser
# zen-browser.url = "github:ch4og/zen-browser-flake";
zen-browser.url = "github:youwen5/zen-browser-flake";
zen-browser.inputs.nixpkgs.follows = "nixpkgs";
2025-04-11 18:43:57 -04:00
# ghostty.url = "github:ghostty-org/ghostty";
2024-10-14 17:28:31 -04:00
# hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
# hyprland.url = "github:hyprwm/Hyprland";
# GnuCobal.url="/home/wayne/Flakes/derivations/GnuCobal/";
# kmonad = {
# url = "git+https://github.com/kmonad/kmonad?submodules=1&dir=nix";
# inputs.nixpkgs.follows = "nixpkgs";
# };
2024-11-01 12:04:24 -04:00
agenix.url = "github:ryantm/agenix";
2024-12-03 13:21:22 -05:00
# PIA
pia.url = "github:Fuwn/pia.nix";
pia.inputs.nixpkgs.follows = "nixpkgs";
2024-11-29 18:31:17 -05:00
musnix.url = "github:musnix/musnix";
# compose2nix.url = "github:aksiksi/compose2nix";
# compose2nix.inputs.nixpkgs.follows = "nixpkgs";
2024-10-14 17:28:31 -04:00
};
2024-11-29 18:31:17 -05:00
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
legacy,
home-manager,
flake-utils,
flake-compat,
zen-browser,
nix-colors,
base16,
agenix,
# nix-ld,
musnix,
2024-12-03 13:21:22 -05:00
pia,
2025-04-11 18:43:57 -04:00
# ghostty,
# compose2nix,
2024-11-29 18:31:17 -05:00
...
} @ inputs:
2024-10-14 17:28:31 -04:00
let
inherit (self) outputs;
2024-11-29 18:31:17 -05:00
system = "x86_64-linux";
2024-10-14 17:28:31 -04:00
lib = nixpkgs.lib; # Import lib here explicitly from nixpkgs
2024-11-29 18:31:17 -05:00
2024-10-14 17:28:31 -04:00
systems = [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
systemSettings = {
hostname = "launchpad";
profile = "Professional";
timezone = "America/Los_Angeles";
locale = "en_US.UTF-8";
gpuType = "nvidia";
2024-12-06 13:12:42 -05:00
version = "24.11";
name = "Vicuña";
2024-10-14 17:28:31 -04:00
};
userSettings = {
username = "wayne";
name = "wayne";
email = "...";
dotfilesDir = "~/.dotfiles";
term = "tmux";
font = "JetBrainsMono Nerd Font";
editor = "lvim"; # Default editor;
};
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
packages = forAllSystems (system: nixpkgs.legacyPackages.${system});
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
nixosConfigurations = {
launchpad = nixpkgs.lib.nixosSystem {
2025-04-11 18:43:57 -04:00
specialArgs = {inherit inputs outputs systemSettings userSettings lib agenix pia ;};
2024-10-14 17:28:31 -04:00
modules = [
# kmonad.nixosModules.default
2024-11-29 18:31:17 -05:00
musnix.nixosModules.musnix
2024-11-01 12:04:24 -04:00
agenix.nixosModules.default
2024-12-03 13:21:22 -05:00
pia.nixosModules."x86_64-linux".default
2024-11-29 18:31:17 -05:00
./configuration.nix
# nix-ld.nixosModules.nix-ld
# https://github.com/nix-community/nix-ld
# The module in this repository defines a new module under (programs.nix-ld.dev) instead of (programs.nix-ld)
# to not collide with the nixpkgs version.
# { programs.nix-ld.dev.enable = true; }
2024-10-14 17:28:31 -04:00
];
};
};
homeConfigurations = {
wayne = home-manager.lib.homeManagerConfiguration {
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs systemSettings userSettings zen-browser nix-colors ;};
modules = [
base16.nixosModule
# set system's scheme to nord by setting `config.scheme`
{ scheme = "${inputs.tt-schemes}/base16/nord.yaml"; }
# import `theming.nix`, we will write it in the next, final, step
# ./theming.nix
2024-10-14 18:35:04 -04:00
./hm/home.nix
2024-10-14 17:28:31 -04:00
];
};
};
};
}