bleh bleh bleh bleh

This commit is contained in:
Natalie Marks 2024-02-22 15:27:47 -08:00
parent 8e9b2624d4
commit f9c6777f3d
2 changed files with 148 additions and 30 deletions

131
flake.nix
View file

@ -1,45 +1,116 @@
{
description = "My first flake!";
description = "New Modular flake!";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs-stable.url = "nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
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;
};
# hyprland.url = "github:hyprwm/Hyprland";
# hyprland-plugins = {
# url = "github:hyprwm/hyprland-plugins";
# inputs.hyprland.follows = "hyprland";
# };
# use the following for unstable:
# nixpkgs.url = "nixpkgs/nixos-unstable";
# or any branch you want:
# nixpkgs.url = "nixpkgs/{BRANCH-NAME}"
};
outputs = {
self,
home-manager,
nixpkgs,
nixpkgs-stable,
home-manager,
stylix,
blocklist-hosts,
hyprland-plugins,
...
}: let
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = nixpkgs.legacyPackages.${system};
in {
nixosConfigurations = {
nmarks = lib.nixosSystem {
inherit system;
modules = [./configuration.nix];
};
} @ 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;
};
overlays = [];
};
lib = nixpkgs.lib;
in {
homeConfigurations = {
nmarks = home-manager.lib.homeManagerConfiguration {
user = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [./home.nix];
extraSpecialArgs = {
inherit pkgs-stable;
inherit systemSettings;
inherit userSettings;
inherit stylix;
inherit hyprland-plugins;
};
};
};
nixosConfigurations = {
system = lib.nixosSystem {
system = systemSettings.system;
modules = [./configuration.nix];
specialArgs = {
inherit pkgs-stable;
inherit systemSettings;
inherit userSettings;
inherit stylix;
inherit blocklist-hosts;
};
};
};
};

47
oldflake.nix Normal file
View file

@ -0,0 +1,47 @@
{
description = "My first flake!";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
# nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=<0.2.0>";
# hyprland.url = "github:hyprwm/Hyprland";
# hyprland-plugins = {
# url = "github:hyprwm/hyprland-plugins";
# inputs.hyprland.follows = "hyprland";
# };
# use the following for unstable:
# nixpkgs.url = "nixpkgs/nixos-unstable";
# or any branch you want:
# nixpkgs.url = "nixpkgs/{BRANCH-NAME}"
};
outputs = {
self,
home-manager,
nixpkgs,
...
}: let
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = nixpkgs.legacyPackages.${system};
in {
nixosConfigurations = {
nmarks = lib.nixosSystem {
inherit system;
modules = [./configuration.nix];
};
};
homeConfigurations = {
nmarks = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [./home.nix];
};
};
};
}