run format

This commit is contained in:
Natalie Marks 2025-05-28 12:06:37 -07:00
parent 800f63b000
commit 40840a8084
No known key found for this signature in database
GPG key ID: 61F4EAEB0C9C3D5F
15 changed files with 661 additions and 614 deletions

View file

@ -595,6 +595,7 @@
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nvf": "nvf", "nvf": "nvf",
"rust-overlay": "rust-overlay_2", "rust-overlay": "rust-overlay_2",
"zen-browser": "zen-browser",
"zig": "zig", "zig": "zig",
"zls": "zls" "zls": "zls"
} }
@ -845,6 +846,26 @@
"type": "github" "type": "github"
} }
}, },
"zen-browser": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1748059546,
"narHash": "sha256-e0jy8RU8ofOdeS5gF9Hir+M5Wn0q7D8MkpeQXsOJdu4=",
"owner": "youwen5",
"repo": "zen-browser-flake",
"rev": "716a5af28d686d67146d01b14112c919b6133a84",
"type": "github"
},
"original": {
"owner": "youwen5",
"repo": "zen-browser-flake",
"type": "github"
}
},
"zig": { "zig": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",

219
flake.nix
View file

@ -29,6 +29,10 @@
moonlight.url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly. moonlight.url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
moonlight.inputs.nixpkgs.follows = "nixpkgs"; moonlight.inputs.nixpkgs.follows = "nixpkgs";
zen-browser = {
url = "github:youwen5/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
nh.url = "github:viperML/nh"; nh.url = "github:viperML/nh";
nh.inputs.nixpkgs.follows = "nixpkgs"; nh.inputs.nixpkgs.follows = "nixpkgs";
@ -37,76 +41,79 @@
nix-index-database.url = "github:nix-community/nix-index-database"; nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { outputs =
self, {
nixpkgs, self,
lix-module, nixpkgs,
darwin, lix-module,
... darwin,
} @ inputs: let ...
lib = nixpkgs.lib; }@inputs:
# TODO: apply these overlays sooner and remove uses of legacyPackages elsewhere. let
overlays = [ lib = nixpkgs.lib;
inputs.zig.overlays.default # TODO: apply these overlays sooner and remove uses of legacyPackages elsewhere.
inputs.rust-overlay.overlays.default overlays = [
inputs.nh.overlays.default inputs.zig.overlays.default
inputs.rust-overlay.overlays.default
inputs.nh.overlays.default
# https://github.com/LnL7/nix-darwin/issues/1041 # https://github.com/LnL7/nix-darwin/issues/1041
(_: prev: { (_: prev: {
karabiner-elements = prev.karabiner-elements.overrideAttrs (old: { karabiner-elements = prev.karabiner-elements.overrideAttrs (old: {
version = "14.13.0"; version = "14.13.0";
src = prev.fetchurl { src = prev.fetchurl {
inherit (old.src) url; inherit (old.src) url;
hash = "sha256-gmJwoht/Tfm5qMecmq1N6PSAIfWOqsvuHU8VDJY8bLw="; hash = "sha256-gmJwoht/Tfm5qMecmq1N6PSAIfWOqsvuHU8VDJY8bLw=";
}; };
}); });
})
];
# Users of this flake currently use x86_64 Linux and Apple Silicon
systems = [
"x86_64-linux"
"aarch64-darwin"
];
forAllSystems = f:
builtins.listToAttrs (
builtins.map (system: {
name = system;
value = f (
inputs
// {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
}
);
}) })
systems ];
);
mkSystem = import ./lib/mkSystem.nix { # Users of this flake currently use x86_64 Linux and Apple Silicon
inherit systems = [
overlays "x86_64-linux"
nixpkgs "aarch64-darwin"
lix-module ];
inputs forAllSystems =
mkNeovim f:
; builtins.listToAttrs (
}; builtins.map (system: {
mkNeovim = import ./lib/mkNeovim.nix { name = system;
inherit value = f (
self inputs
overlays // {
nixpkgs inherit system;
inputs pkgs = nixpkgs.legacyPackages.${system};
; }
}; );
in rec { }) systems
inherit self; );
# "nix fmt"
formatter = forAllSystems (inputs: inputs.pkgs.nixfmt-tree); mkSystem = import ./lib/mkSystem.nix {
packages = forAllSystems ( inherit
{system, ...}: overlays
nixpkgs
lix-module
inputs
mkNeovim
;
};
mkNeovim = import ./lib/mkNeovim.nix {
inherit
self
overlays
nixpkgs
inputs
;
};
in
rec {
inherit self;
# "nix fmt"
formatter = forAllSystems (inputs: inputs.pkgs.nixfmt-tree);
packages = forAllSystems (
{ system, ... }:
{ {
nvim-chloe = mkNeovim "chloe" system; nvim-chloe = mkNeovim "chloe" system;
nvim-natalie = mkNeovim "natalie" system; nvim-natalie = mkNeovim "natalie" system;
@ -115,46 +122,48 @@
# "nix run .#darwin-rebuild" # "nix run .#darwin-rebuild"
darwin-rebuild = darwin.packages.aarch64-darwin.darwin-rebuild; darwin-rebuild = darwin.packages.aarch64-darwin.darwin-rebuild;
} }
); );
# natalie's desktop computer # natalie's desktop computer
nixosConfigurations.nixos = mkSystem "nixos" { nixosConfigurations.nixos = mkSystem "nixos" {
user = "natalie"; user = "natalie";
host = "desktop"; host = "desktop";
system = "x86_64-linux"; system = "x86_64-linux";
extraModules = [ extraModules = [
]; ];
}; };
# natalie's laptop # natalie's laptop
darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" { darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" {
user = "natalie"; user = "natalie";
host = "laptop"; host = "laptop";
system = "aarch64-darwin"; system = "aarch64-darwin";
}; };
# chloe's mac studio "sandwich" # chloe's mac studio "sandwich"
darwinConfigurations.sandwich = mkSystem "sandwich" { darwinConfigurations.sandwich = mkSystem "sandwich" {
user = "chloe"; user = "chloe";
host = "sandwich"; host = "sandwich";
system = "aarch64-darwin"; system = "aarch64-darwin";
}; };
# chloe's macbook air "paperback" # chloe's macbook air "paperback"
darwinConfigurations.paperback = mkSystem "paperback" { darwinConfigurations.paperback = mkSystem "paperback" {
user = "chloe"; user = "chloe";
host = "paperback"; host = "paperback";
system = "aarch64-darwin"; system = "aarch64-darwin";
}; };
# generate checks for "nix flake check --all-systems --no-build" # generate checks for "nix flake check --all-systems --no-build"
checks.aarch64-darwin = builtins.listToAttrs ( checks.aarch64-darwin = builtins.listToAttrs (
builtins.map ( builtins.map (
name: let name:
d = darwinConfigurations.${name}.system; let
in { d = darwinConfigurations.${name}.system;
name = "darwinConfiguration-" + d.name; in
value = d; {
} name = "darwinConfiguration-" + d.name;
) (builtins.attrNames darwinConfigurations) value = d;
); }
}; ) (builtins.attrNames darwinConfigurations)
);
};
} }

View file

@ -4,7 +4,9 @@
# TODO: apply overlays here # TODO: apply overlays here
overlays, overlays,
inputs, inputs,
}: user: system: let }:
user: system:
let
darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system; darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system;
host = { host = {
@ -15,15 +17,15 @@
userDir = ../users + "/${user}"; userDir = ../users + "/${user}";
userConfig = import (userDir + "/user.nix"); userConfig = import (userDir + "/user.nix");
in in
(inputs.nvf.lib.neovimConfiguration { (inputs.nvf.lib.neovimConfiguration {
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
modules = builtins.filter (f: f != null) [ modules = builtins.filter (f: f != null) [
(../users + ("/" + user + "/vim.nix")) (../users + ("/" + user + "/vim.nix"))
../modules/neovim ../modules/neovim
]; ];
extraSpecialArgs = { extraSpecialArgs = {
inherit host; inherit host;
flake = self; flake = self;
user = userConfig; user = userConfig;
}; };
}).neovim }).neovim

View file

@ -8,14 +8,14 @@
host, host,
mainHomeImports, mainHomeImports,
... ...
}: let }:
let
cfg = config.programs; cfg = config.programs;
in { in
imports = {
mainHomeImports imports = mainHomeImports ++ [
++ [ ./macos/sketchybar.nix
./macos/sketchybar.nix ];
];
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;
nix-index.enable = true; nix-index.enable = true;
@ -80,7 +80,7 @@ in {
} }
]; ];
shellAliases = shellAliases =
{} { }
// lib.optionalAttrs (!host.darwin) { // lib.optionalAttrs (!host.darwin) {
reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now"; reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now";
}; };

File diff suppressed because it is too large Load diff

View file

@ -4,9 +4,11 @@
pkgs, pkgs,
lib, lib,
... ...
}: let }:
let
tiling = config.shared.darwin.tiling.enable; tiling = config.shared.darwin.tiling.enable;
in { in
{
# Use touchid or watch to activate sudo # Use touchid or watch to activate sudo
security.pam.services.sudo_local = { security.pam.services.sudo_local = {
enable = true; enable = true;

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
services = { services = {
avahi = { avahi = {
enable = true; enable = true;
@ -40,7 +41,7 @@
# Enable CUPS to print documents. # Enable CUPS to print documents.
printing = { printing = {
enable = true; enable = true;
drivers = [pkgs.brlaser]; # Brother printer driver drivers = [ pkgs.brlaser ]; # Brother printer driver
}; };
pipewire = { pipewire = {
@ -55,7 +56,7 @@
openssh = { openssh = {
enable = true; enable = true;
ports = [22]; ports = [ 22 ];
settings = { settings = {
PasswordAuthentication = true; PasswordAuthentication = true;
UseDns = true; UseDns = true;

View file

@ -1,4 +1,5 @@
{inputs, ...}: { { inputs, ... }:
{
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
}; };

View file

@ -3,7 +3,8 @@
user, user,
host, host,
... ...
}: { }:
{
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -17,7 +18,7 @@
enable = true; enable = true;
# Certain features, including CLI integration and system authentication support, # Certain features, including CLI integration and system authentication support,
# require enabling PolKit integration on some desktop environments (e.g. Plasma). # require enabling PolKit integration on some desktop environments (e.g. Plasma).
polkitPolicyOwners = [user.username]; polkitPolicyOwners = [ user.username ];
}; };
noisetorch.enable = true; noisetorch.enable = true;
@ -34,7 +35,7 @@
steam = { steam = {
enable = true; enable = true;
package = with pkgs; steam.override {extraPkgs = pkgs: [attr];}; package = with pkgs; steam.override { extraPkgs = pkgs: [ attr ]; };
}; };
git = { git = {
@ -58,7 +59,7 @@
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [xdg-desktop-portal-gtk]; extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
}; };
virtualisation = { virtualisation = {
containers.enable = true; containers.enable = true;
@ -83,14 +84,14 @@
hybrid-sleep.enable = false; hybrid-sleep.enable = false;
}; };
services.monitord.wantedBy = ["multi-user.target"]; services.monitord.wantedBy = [ "multi-user.target" ];
}; };
i18n = { i18n = {
# Select internationalisation properties. # Select internationalisation properties.
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
supportedLocales = ["all"]; supportedLocales = [ "all" ];
extraLocaleSettings = { extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8"; LC_ADDRESS = "en_US.UTF-8";
@ -170,7 +171,7 @@
}; };
interfaces.enp11s0.wakeOnLan = { interfaces.enp11s0.wakeOnLan = {
enable = true; enable = true;
policy = ["magic"]; policy = [ "magic" ];
}; };
}; };

View file

@ -8,6 +8,7 @@
... ...
}: }:
{ {
programs.mangohud.enable = true;
home = { home = {
stateVersion = "23.05"; # Please read the comment before changing. stateVersion = "23.05"; # Please read the comment before changing.
@ -29,6 +30,7 @@
wineWowPackages.stable wineWowPackages.stable
winetricks winetricks
(prismlauncher.override { gamemodeSupport = true; }) (prismlauncher.override { gamemodeSupport = true; })
umu-launcher
#window manager stuff #window manager stuff
wofi wofi
@ -50,8 +52,8 @@
signal-desktop signal-desktop
inputs.zls.packages.x86_64-linux.zls inputs.zls.packages.x86_64-linux.zls
rust-bin.stable.latest.default rust-bin.stable.latest.default
inputs.zen-browser.packages.x86_64-linux.default
]; ];
# programs.mangohud.enable = true;
}; };
# xdg.mimeApps.defaultApplications."inode/directory" = "dolphin.desktop"; # xdg.mimeApps.defaultApplications."inode/directory" = "dolphin.desktop";

View file

@ -2,7 +2,8 @@
pkgs, pkgs,
lib, lib,
... ...
} @ args: { }@args:
{
programs = { programs = {
# sort-lines:start # sort-lines:start
atuin.enable = true; atuin.enable = true;

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pinentry_mac pinentry_mac
]; ];
@ -6,7 +7,7 @@
# Custom configuration modules in "modules" are shared between users, # Custom configuration modules in "modules" are shared between users,
# and can be configured in this "shared" namespace # and can be configured in this "shared" namespace
shared.darwin = { shared.darwin = {
macAppStoreApps = ["wireguard"]; macAppStoreApps = [ "wireguard" ];
}; };
# Create /etc/zshrc that loads the nix-darwin environment. # Create /etc/zshrc that loads the nix-darwin environment.

View file

@ -1,4 +1,5 @@
{...}: { { ... }:
{
imports = [ imports = [
./keybinds.nix ./keybinds.nix
./languages.nix ./languages.nix

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
vim = { vim = {
lazy.plugins."lean.nvim" = { lazy.plugins."lean.nvim" = {
enabled = true; enabled = true;

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
vim = { vim = {
visuals = { visuals = {
indent-blankline = { indent-blankline = {