config/flake.nix

118 lines
3.5 KiB
Nix
Raw Normal View History

2023-12-28 21:33:09 -08:00
{
2024-02-22 15:27:47 -08:00
description = "New Modular flake!";
2023-12-28 21:33:09 -08:00
inputs = {
2024-02-22 15:27:47 -08:00
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs-stable.url = "nixpkgs/nixos-23.11";
2023-12-28 21:33:09 -08:00
2024-02-22 15:27:47 -08:00
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-12-28 21:33:09 -08:00
2024-02-22 15:27:47 -08:00
stylix.url = "github:danth/stylix";
blocklist-hosts = {
url = "github:StevenBlack/hosts";
#flake = false;
};
hyprland.url = "github:hyprwm/Hyprland";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
#flake = false;
};
2023-12-28 21:33:09 -08:00
};
2024-01-29 01:53:47 -08:00
outputs = {
self,
nixpkgs,
2024-02-22 15:27:47 -08:00
nixpkgs-stable,
home-manager,
stylix,
blocklist-hosts,
hyprland-plugins,
2024-01-29 01:53:47 -08:00
...
2024-02-22 15:27:47 -08:00
} @ inputs: let
systemSettings = {
system = "x86_64-linux"; # system arch
hostname = "nixos"; # hostname
#profile = "personal"; # select a profile defined from my profiles directory
timezone = "America/Los_Angeles"; # select timezone
locale = "en_US.UTF-8"; # select locale
};
userSettings = rec {
username = "nmarks"; # username
name = "Nmarks"; # name/identifier
email = "nmarks413@gmail.com"; # email (used for certain configurations)
dotfilesDir = "~/.dotfiles"; # absolute path of the local repo
#theme = "uwunicorn-yt"; # selcted theme from my themes directory (./themes/)
wm = "hyprland"; # Selected window manager or desktop environment; must select one in both ./user/wm/ and ./system/wm/
# window manager type (hyprland or x11) translator
wmType =
if (wm == "hyprland")
then "wayland"
else "x11";
browser = "firefox"; # Default browser; must select one from ./user/app/browser/
term = "kitty"; # Default terminal command;
font = ""; # Selected font
fontPkg = pkgs.intel-one-mono; # Font package
editor = "nvim"; # Default editor;
# editor spawning translator
# generates a command that can be used to spawn editor inside a gui
# EDITOR and TERM session variables must be set in home.nix or other module
# I set the session variable SPAWNEDITOR to this in my home.nix for convenience
spawnEditor =
if (editor == "emacsclient")
then "emacsclient -c -a 'emacs'"
else
(
if ((editor == "vim") || (editor == "nvim") || (editor == "nano"))
then "exec " + term + " -e " + editor
else editor
);
};
pkgs = import nixpkgs {
system = systemSettings.system;
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
overlays = [];
};
pkgs-stable = import nixpkgs-stable {
system = systemSettings.system;
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
2023-12-28 21:33:09 -08:00
};
2024-02-22 15:27:47 -08:00
overlays = [];
2023-12-28 21:33:09 -08:00
};
2024-02-22 15:27:47 -08:00
lib = nixpkgs.lib;
in {
2024-01-29 01:53:47 -08:00
homeConfigurations = {
2024-04-15 23:44:22 -07:00
nmarks = home-manager.lib.homeManagerConfiguration {
2024-01-29 01:53:47 -08:00
inherit pkgs;
modules = [./home.nix];
2024-02-22 15:27:47 -08:00
extraSpecialArgs = {
inherit pkgs-stable;
inherit systemSettings;
inherit userSettings;
inherit stylix;
inherit hyprland-plugins;
};
};
};
nixosConfigurations = {
2024-04-15 23:44:22 -07:00
nmarks = lib.nixosSystem {
2024-02-22 15:27:47 -08:00
system = systemSettings.system;
modules = [./configuration.nix];
specialArgs = {
inherit pkgs-stable;
inherit systemSettings;
inherit userSettings;
inherit stylix;
inherit blocklist-hosts;
};
2023-12-28 21:33:09 -08:00
};
2024-01-29 01:53:47 -08:00
};
2023-12-28 21:33:09 -08:00
};
}