This commit is contained in:
Nathan McCarty 2025-01-13 14:53:42 -05:00
parent ac3825e6f9
commit 29fd118635
22 changed files with 424 additions and 424 deletions

View file

@ -1,24 +1,23 @@
{ withSystem, inputs, ... }:
{
perSystem =
{ {
withSystem,
inputs,
...
}: {
perSystem = {
config, config,
pkgs, pkgs,
lib, lib,
inputs', inputs',
... ...
}: }: {
{ devShells.idris2 = let
devShells.idris2 =
let
libPackages = with pkgs; [ libPackages = with pkgs; [
readline70 readline70
openssl openssl
]; ];
in in
pkgs.mkShell { pkgs.mkShell {
buildInputs = buildInputs = with pkgs;
with pkgs;
[ [
# Idris toolchain # Idris toolchain
inputs'.nixpkgs-unstable.legacyPackages.idris2Packages.pack inputs'.nixpkgs-unstable.legacyPackages.idris2Packages.pack

View file

@ -1,16 +1,16 @@
{ withSystem, inputs, ... }:
{
perSystem =
{ {
withSystem,
inputs,
...
}: {
perSystem = {
config, config,
pkgs, pkgs,
lib, lib,
inputs', inputs',
... ...
}: }: {
{ devShells.raku = let
devShells.raku =
let
rakudo_env = pkgs.buildEnv { rakudo_env = pkgs.buildEnv {
name = "rakudo-env"; name = "rakudo-env";
paths = with pkgs; [ paths = with pkgs; [
@ -26,8 +26,7 @@
libPackages = with pkgs; [readline70]; libPackages = with pkgs; [readline70];
in in
pkgs.mkShell { pkgs.mkShell {
buildInputs = buildInputs = with pkgs;
with pkgs;
[ [
# Raku toolchain # Raku toolchain
rakudo_env rakudo_env

View file

@ -1,8 +1,13 @@
{ withSystem, inputs, ... }:
{
perSystem =
{ config, pkgs, ... }:
{ {
withSystem,
inputs,
...
}: {
perSystem = {
config,
pkgs,
...
}: {
devShells.rust = pkgs.mkShell { devShells.rust = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
# Rust toolchain # Rust toolchain

View file

@ -20,8 +20,11 @@
}; };
}; };
outputs = outputs = inputs @ {
inputs@{ flake-parts, self, ... }: flake-parts,
self,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} { flake-parts.lib.mkFlake {inherit inputs;} {
imports = [ imports = [
inputs.devshell.flakeModule inputs.devshell.flakeModule
@ -41,16 +44,14 @@
"aarch64-darwin" "aarch64-darwin"
"x86_64-darwin" "x86_64-darwin"
]; ];
perSystem = perSystem = {
{
config, config,
self', self',
inputs', inputs',
pkgs, pkgs,
system, system,
... ...
}: }: {
{
# Per-system attributes can be defined here. The self' and inputs' # Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same # module parameters provide easy access to attributes of the same
# system. # system.
@ -65,7 +66,6 @@
type = types.lazyAttrsOf types.raw; type = types.lazyAttrsOf types.raw;
default = {}; default = {};
}; };
}; };
}; };
}; };

View file

@ -1,9 +1,16 @@
{ withSystem, inputs, ... }:
{ {
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; }; # perSystem = { ... }: { config.packages.hello = ...; };
flake.homeConfigurations.crash = withSystem "x86_64-linux" ( flake.homeConfigurations.crash = withSystem "x86_64-linux" (
ctx@{ config, inputs', ... }: ctx @ {
config,
inputs',
...
}:
inputs.home-manager.lib.homeManagerConfiguration { inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.${"x86_64-linux"}; pkgs = inputs.nixpkgs.legacyPackages.${"x86_64-linux"};
extraSpecialArgs = { extraSpecialArgs = {
@ -17,8 +24,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
imports = [ imports = [
../../modules/programs/shell.nix ../../modules/programs/shell.nix
../../modules/programs/neovim.nix ../../modules/programs/neovim.nix

View file

@ -1,9 +1,16 @@
{ withSystem, inputs, ... }:
{ {
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; }; # perSystem = { ... }: { config.packages.hello = ...; };
flake.homeConfigurations.wsl = withSystem "x86_64-linux" ( flake.homeConfigurations.wsl = withSystem "x86_64-linux" (
ctx@{ config, inputs', ... }: ctx @ {
config,
inputs',
...
}:
inputs.home-manager.lib.homeManagerConfiguration { inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.${"x86_64-linux"}; pkgs = inputs.nixpkgs.legacyPackages.${"x86_64-linux"};
extraSpecialArgs = { extraSpecialArgs = {
@ -17,8 +24,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
imports = [ imports = [
../../modules/programs/shell.nix ../../modules/programs/shell.nix
../../modules/programs/neovim.nix ../../modules/programs/neovim.nix

View file

@ -3,9 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
# Rust rewrites of cli stuff # Rust rewrites of cli stuff
fd fd
@ -41,7 +39,10 @@
aggressiveResize = true; aggressiveResize = true;
keyMode = "vi"; keyMode = "vi";
shortcut = "x"; shortcut = "x";
terminal = if pkgs.stdenv.isLinux then "tmux-256color" else "screen-256color"; terminal =
if pkgs.stdenv.isLinux
then "tmux-256color"
else "screen-256color";
escapeTime = 100; escapeTime = 100;
plugins = with pkgs; [ plugins = with pkgs; [
tmuxPlugins.cpu tmuxPlugins.cpu
@ -56,5 +57,4 @@
}; };
programs.btop.enable = true; programs.btop.enable = true;
programs.jq.enable = true; programs.jq.enable = true;
} }

View file

@ -4,9 +4,7 @@
pkgs, pkgs,
inputs', inputs',
... ...
}: }: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
# Communications # Communications
webcord-vencord webcord-vencord
@ -27,5 +25,4 @@
enable = true; enable = true;
}; };
}; };
} }

View file

@ -4,9 +4,7 @@
pkgs, pkgs,
inputs', inputs',
... ...
}: }: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
# Git addons # Git addons
git-secret git-secret

View file

@ -1,21 +1,19 @@
{ {emacsPackage ? null}: {
emacsPackage ? null,
}:
{
config, config,
lib, lib,
pkgs, pkgs,
... ...
}: }: let
let
myAspell = pkgs.aspellWithDicts (d: [ myAspell = pkgs.aspellWithDicts (d: [
d.en d.en
d.en-science d.en-science
d.en-computers d.en-computers
]); ]);
emacsPackage' = if emacsPackage == null then pkgs.emacs29-pgtk else emacsPackage; emacsPackage' =
in if emacsPackage == null
{ then pkgs.emacs29-pgtk
else emacsPackage;
in {
home.packages = with pkgs; [ home.packages = with pkgs; [
# For markdown rendering # For markdown rendering
python312Packages.grip python312Packages.grip
@ -56,15 +54,16 @@ in
programs.emacs = { programs.emacs = {
enable = true; enable = true;
package = emacsPackage'; package = emacsPackage';
extraPackages = extraPackages = epkgs:
epkgs: with pkgs; [ with pkgs; [
epkgs.mu4e epkgs.mu4e
epkgs.vterm epkgs.vterm
epkgs.pdf-tools epkgs.pdf-tools
epkgs.emacsql epkgs.emacsql
epkgs.emacsql-sqlite epkgs.emacsql-sqlite
(tree-sitter.withPlugins ( (tree-sitter.withPlugins (
grammars: with grammars; [ grammars:
with grammars; [
tree-sitter-nix tree-sitter-nix
tree-sitter-rust tree-sitter-rust
tree-sitter-toml tree-sitter-toml

View file

@ -3,9 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
fonts.fontconfig = { fonts.fontconfig = {
enable = true; enable = true;
defaultFonts = { defaultFonts = {

View file

@ -1,15 +1,12 @@
{ {
gitUserName ? "Nathan McCarty", gitUserName ? "Nathan McCarty",
gitUserEmail ? "thatonelutenist@stranger.systems", gitUserEmail ? "thatonelutenist@stranger.systems",
}: }: {
{
config, config,
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
programs.git = { programs.git = {
enable = true; enable = true;
package = pkgs.gitAndTools.gitFull; package = pkgs.gitAndTools.gitFull;

View file

@ -3,9 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
programs.neovim = { programs.neovim = {
enable = true; enable = true;
viAlias = true; viAlias = true;

View file

@ -3,9 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
programs.nushell = { programs.nushell = {
enable = true; enable = true;
configFile.source = ./nushell/config.nu; configFile.source = ./nushell/config.nu;
@ -64,5 +62,4 @@
}; };
programs.fzf.enable = true; programs.fzf.enable = true;
} }

View file

@ -3,9 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
programs.ssh = { programs.ssh = {
# SSH configuration # SSH configuration
enable = true; enable = true;

View file

@ -1,10 +1,11 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
imports = [ imports = [
]; ];
@ -185,5 +186,4 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment? system.stateVersion = "24.11"; # Did you read the comment?
} }

View file

@ -7,9 +7,7 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: }: {
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];

View file

@ -1,9 +1,16 @@
{ withSystem, inputs, ... }:
{ {
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; }; # perSystem = { ... }: { config.packages.hello = ...; };
flake.nixosConfigurations.crash = withSystem "x86_64-linux" ( flake.nixosConfigurations.crash = withSystem "x86_64-linux" (
ctx@{ config, inputs', ... }: ctx @ {
config,
inputs',
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
# Expose `packages`, `inputs` and `inputs'` as module arguments. # Expose `packages`, `inputs` and `inputs'` as module arguments.
# Use specialArgs permits use in `imports`. # Use specialArgs permits use in `imports`.
@ -20,9 +27,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
imports = [ imports = [
# Hardware support # Hardware support
inputs.nixos-hardware.nixosModules.microsoft-surface-common inputs.nixos-hardware.nixosModules.microsoft-surface-common
@ -40,7 +45,6 @@
"nix-command" "nix-command"
"flakes" "flakes"
]; ];
} }
) )
]; ];

View file

@ -1,9 +1,16 @@
{ withSystem, inputs, ... }:
{ {
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; }; # perSystem = { ... }: { config.packages.hello = ...; };
flake.nixosConfigurations.inst = withSystem "x86_64-linux" ( flake.nixosConfigurations.inst = withSystem "x86_64-linux" (
ctx@{ config, inputs', ... }: ctx @ {
config,
inputs',
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
# Expose `packages`, `inputs` and `inputs'` as module arguments. # Expose `packages`, `inputs` and `inputs'` as module arguments.
# Use specialArgs permits use in `imports`. # Use specialArgs permits use in `imports`.
@ -20,15 +27,12 @@
( (
# NixOS-WSL specific options are documented on the NixOS-WSL repository: # NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL # https://github.com/nix-community/NixOS-WSL
{ {
config, config,
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
imports = [ imports = [
]; ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

@ -1,9 +1,16 @@
{ withSystem, inputs, ... }:
{ {
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; }; # perSystem = { ... }: { config.packages.hello = ...; };
flake.nixosConfigurations.wsl = withSystem "x86_64-linux" ( flake.nixosConfigurations.wsl = withSystem "x86_64-linux" (
ctx@{ config, inputs', ... }: ctx @ {
config,
inputs',
...
}:
inputs.nixpkgs.lib.nixosSystem { inputs.nixpkgs.lib.nixosSystem {
# Expose `packages`, `inputs` and `inputs'` as module arguments. # Expose `packages`, `inputs` and `inputs'` as module arguments.
# Use specialArgs permits use in `imports`. # Use specialArgs permits use in `imports`.
@ -17,15 +24,12 @@
( (
# NixOS-WSL specific options are documented on the NixOS-WSL repository: # NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL # https://github.com/nix-community/NixOS-WSL
{ {
config, config,
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
imports = [ imports = [
# WSL support # WSL support
inputs.nixos-wsl.nixosModules.default inputs.nixos-wsl.nixosModules.default

View file

@ -1,12 +1,9 @@
{ inputs }: {inputs}: {
{
config, config,
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
imports = [ imports = [
inputs.lix-module.nixosModules.default inputs.lix-module.nixosModules.default
]; ];

View file

@ -3,15 +3,12 @@
mutableUsers ? false, mutableUsers ? false,
username ? "nathan", username ? "nathan",
homedir ? "/home/nathan", homedir ? "/home/nathan",
}: }: {
{
config, config,
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
security.polkit = { security.polkit = {
enable = true; enable = true;
}; };
@ -30,6 +27,5 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEtE+KjKuHUj5bKKQBDKqhO5dpEQf8E8u1G6kRj7y6dI nathan@nixos" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEtE+KjKuHUj5bKKQBDKqhO5dpEQf8E8u1G6kRj7y6dI nathan@nixos"
]; ];
}; };
}; };
} }