2023-05-08 04:17:40 +05:30
|
|
|
{
|
2023-06-11 20:56:47 +05:30
|
|
|
description = "Flake of LibrePhoenix";
|
2023-05-08 04:17:40 +05:30
|
|
|
|
2023-09-04 00:20:27 +05:30
|
|
|
outputs = { self, nixpkgs, home-manager, nix-doom-emacs, stylix, eaf, eaf-browser, org-nursery, phscroll, blocklist-hosts, rust-overlay, hyprland-plugins, ... }@inputs:
|
2023-05-08 04:17:40 +05:30
|
|
|
let
|
2023-06-21 20:44:07 +05:30
|
|
|
# ---- SYSTEM SETTINGS ---- #
|
2023-06-21 04:01:49 +05:30
|
|
|
system = "x86_64-linux"; # system arch
|
|
|
|
hostname = "snowfire"; # hostname
|
|
|
|
profile = "personal"; # select a profile defined from my profiles directory
|
2023-06-21 08:33:14 +05:30
|
|
|
timezone = "America/Chicago"; # select timezone
|
|
|
|
locale = "en_US.UTF-8"; # select locale
|
|
|
|
|
2023-06-21 20:44:07 +05:30
|
|
|
# ----- USER SETTINGS ----- #
|
2023-06-23 01:23:10 +05:30
|
|
|
username = "emmet"; # username
|
|
|
|
name = "Emmet"; # name/identifier
|
2023-06-21 04:01:49 +05:30
|
|
|
email = "librephoenix3@pm.me"; # email (used for certain configurations)
|
2023-06-23 02:18:09 +05:30
|
|
|
dotfilesDir = "~/.dotfiles"; # absolute path of the local repo
|
2023-09-04 00:20:27 +05:30
|
|
|
theme = "spaceduck"; # selcted theme from my themes directory (./themes/)
|
2023-08-13 00:17:14 +05:30
|
|
|
wm = "hyprland"; # Selected window manager or desktop environment; must select one in both ./user/wm/ and ./system/wm/
|
2023-08-14 07:27:11 +05:30
|
|
|
wmType = "wayland"; # x11 or wayland
|
|
|
|
browser = "librewolf"; # Default browser; must select one from ./user/app/browser/
|
2023-06-23 02:18:09 +05:30
|
|
|
editor = "emacsclient"; # Default editor;
|
2023-08-13 22:45:04 +05:30
|
|
|
term = "alacritty"; # Default terminal command;
|
2023-06-23 01:23:10 +05:30
|
|
|
font = "Inconsolata"; # Selected font
|
|
|
|
fontPkg = pkgs.inconsolata; # Font package
|
2023-05-08 04:17:40 +05:30
|
|
|
|
2023-06-23 02:18:09 +05:30
|
|
|
# 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" || "nvim" || "nano")) then "$TERM -e $EDITOR" else editor);
|
|
|
|
|
|
|
|
# configure pkgs
|
2023-05-08 04:17:40 +05:30
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
config = { allowUnfree = true; };
|
2023-05-21 06:28:54 +05:30
|
|
|
overlays = [ rust-overlay.overlays.default ];
|
2023-05-08 04:17:40 +05:30
|
|
|
};
|
|
|
|
|
2023-06-23 02:18:09 +05:30
|
|
|
# configure lib
|
2023-05-08 04:17:40 +05:30
|
|
|
lib = nixpkgs.lib;
|
|
|
|
|
|
|
|
in {
|
2023-05-09 07:36:37 +05:30
|
|
|
homeConfigurations = {
|
2023-06-24 01:34:17 +05:30
|
|
|
user = home-manager.lib.homeManagerConfiguration {
|
2023-05-09 07:36:37 +05:30
|
|
|
inherit pkgs;
|
2023-06-23 02:18:09 +05:30
|
|
|
modules = [ (./. + "/profiles"+("/"+profile)+"/home.nix") ]; # load home.nix from selected PROFILE
|
2023-05-14 01:49:11 +05:30
|
|
|
extraSpecialArgs = {
|
2023-06-23 02:18:09 +05:30
|
|
|
# pass config variables from above
|
2023-06-23 01:23:10 +05:30
|
|
|
inherit username;
|
|
|
|
inherit name;
|
|
|
|
inherit hostname;
|
2023-08-27 19:51:09 +05:30
|
|
|
inherit profile;
|
2023-06-23 01:23:10 +05:30
|
|
|
inherit email;
|
|
|
|
inherit dotfilesDir;
|
|
|
|
inherit theme;
|
|
|
|
inherit font;
|
|
|
|
inherit fontPkg;
|
|
|
|
inherit wm;
|
2023-08-14 07:27:11 +05:30
|
|
|
inherit wmType;
|
2023-06-23 02:18:09 +05:30
|
|
|
inherit browser;
|
|
|
|
inherit editor;
|
|
|
|
inherit term;
|
|
|
|
inherit spawnEditor;
|
2023-06-21 08:33:14 +05:30
|
|
|
inherit (inputs) nix-doom-emacs;
|
|
|
|
inherit (inputs) stylix;
|
2023-05-20 06:55:57 +05:30
|
|
|
inherit (inputs) eaf;
|
|
|
|
inherit (inputs) eaf-browser;
|
2023-06-04 09:42:31 +05:30
|
|
|
inherit (inputs) org-nursery;
|
2023-08-27 02:28:45 +05:30
|
|
|
inherit (inputs) phscroll;
|
2023-09-04 00:20:27 +05:30
|
|
|
inherit (inputs) hyprland-plugins;
|
2023-05-14 01:49:11 +05:30
|
|
|
};
|
2023-05-09 07:36:37 +05:30
|
|
|
};
|
|
|
|
};
|
2023-05-08 04:17:40 +05:30
|
|
|
nixosConfigurations = {
|
2023-06-24 01:34:17 +05:30
|
|
|
system = lib.nixosSystem {
|
2023-05-08 04:17:40 +05:30
|
|
|
inherit system;
|
2023-06-23 02:18:09 +05:30
|
|
|
modules = [ (./. + "/profiles"+("/"+profile)+"/configuration.nix") ]; # load configuration.nix from selected PROFILE
|
2023-05-23 07:09:15 +05:30
|
|
|
specialArgs = {
|
2023-06-23 02:18:09 +05:30
|
|
|
# pass config variables from above
|
2023-06-23 01:23:10 +05:30
|
|
|
inherit username;
|
|
|
|
inherit name;
|
|
|
|
inherit hostname;
|
|
|
|
inherit timezone;
|
|
|
|
inherit locale;
|
|
|
|
inherit theme;
|
|
|
|
inherit font;
|
|
|
|
inherit fontPkg;
|
|
|
|
inherit wm;
|
2023-06-21 08:33:14 +05:30
|
|
|
inherit (inputs) stylix;
|
2023-06-18 09:18:58 +05:30
|
|
|
inherit (inputs) blocklist-hosts;
|
2023-05-23 07:09:15 +05:30
|
|
|
};
|
2023-05-08 04:17:40 +05:30
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-06-21 09:02:28 +05:30
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2023-08-14 23:48:42 +05:30
|
|
|
nix-doom-emacs.url = "github:librephoenix/nix-doom-emacs?ref=pgtk-patch";
|
2023-06-21 09:02:28 +05:30
|
|
|
stylix.url = "github:danth/stylix";
|
|
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
|
|
eaf = {
|
|
|
|
url = "github:emacs-eaf/emacs-application-framework";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
eaf-browser = {
|
|
|
|
url = "github:emacs-eaf/eaf-browser";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
org-nursery = {
|
|
|
|
url = "github:chrisbarrett/nursery";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-08-27 02:28:45 +05:30
|
|
|
phscroll = {
|
|
|
|
url = "github:misohena/phscroll";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-06-21 09:02:28 +05:30
|
|
|
blocklist-hosts = {
|
|
|
|
url = "github:StevenBlack/hosts";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-09-04 00:20:27 +05:30
|
|
|
hyprland-plugins = {
|
|
|
|
url = "github:hyprwm/hyprland-plugins";
|
|
|
|
flake = false;
|
|
|
|
};
|
2023-06-21 09:02:28 +05:30
|
|
|
};
|
2023-05-08 04:17:40 +05:30
|
|
|
}
|