move to make, change formatting, break everything

This commit is contained in:
Noah Masur 2022-01-22 17:19:32 -05:00
parent d49dbebf9d
commit 7d52ec7286
9 changed files with 454 additions and 453 deletions

1
.stylua.toml Normal file
View File

@ -0,0 +1 @@
indent_type = "Spaces"

View File

@ -1 +0,0 @@
use nix

27
nixos/Makefile Normal file
View File

@ -0,0 +1,27 @@
# Show these options
default:
@echo "sudo make bootstrap -- Install from scratch"
@echo "make channels -- Set intended software channels"
@echo "make system -- Update system config"
@echo "make home -- Update home config"
# Bootstrap from nothing
bootstrap:
nix-channel --add https://nixos.org/channels/nixos-unstable
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update
nixos-rebuild switch -I nixos-config=./configuration.nix
# Use intended software channels
channels:
doas nix-channel --add https://nixos.org/channels/nixos-unstable
doas nix-channel --add https://nixos.org/channels/nixpkgs-unstable
doas nix-channel --update
# Update the system
system:
doas nixos-rebuild switch -I nixos-config=./configuration.nix
# Update the user environment
home:
home-manager switch -f ./home.nix

View File

@ -159,7 +159,6 @@
wget
curl
home-manager
just
xclip
pamixer

1
nixos/default.nix Normal file
View File

@ -0,0 +1 @@
{ }

View File

@ -5,6 +5,8 @@ let
name = "Noah Masur";
editor = "nvim";
font = "Victor Mono";
dotfiles = builtins.toString ../.;
nixos_config = builtins.toString ./.;
in {
nixpkgs.config.allowUnfree = true;
@ -172,7 +174,7 @@ in {
v = "vim";
vl = "vim -c 'normal! `0'";
vll = "vim -c 'Telescope oldfiles'";
vimrc = "vim ${builtins.getEnv "PWD"}/../nvim.configlink/init.lua";
vimrc = "vim ${dotfiles}/nvim.configlink/init.lua";
# Notes
qn = "quicknote";
@ -180,10 +182,10 @@ in {
to = "today";
work = "vim $NOTES_PATH/work.md";
# Improved CLI Tools
# CLI Tools
cat = "bat"; # Swap cat with bat
h = "http -Fh --all"; # Curl site for headers
j = "just";
m = "make"; # For makefiles
# Fun CLI Tools
weather = "curl wttr.in/$WEATHER_CITY";
@ -228,8 +230,8 @@ in {
home.sessionVariables = {
fish_greeting = "";
EDITOR = "${editor}";
NIXOS_CONFIG = builtins.getEnv "PWD";
DOTS = "${builtins.getEnv "PWD"}/..";
NIXOS_CONFIG = "${nixos_config}";
DOTS = "${dotfiles}";
};
programs.starship = {
@ -260,7 +262,7 @@ in {
enable = true;
enableFishIntegration = true;
nix-direnv.enable = true;
config = { whitelist = { prefix = [ "${builtins.getEnv "PWD"}/" ]; }; };
config = { whitelist = { prefix = [ "${dotfiles}/" ]; }; };
};
programs.git = {

View File

@ -1,24 +0,0 @@
# Show these options
default:
@just --list --list-heading $'Update NixOS config:\n'
# Bootstrap from nothing
bootstrap:
sudo nix-channel --add https://nixos.org/channels/nixos-unstable
sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable
sudo nix-channel --update
sudo nixos-rebuild switch -I nixos-config=./configuration.nix
# Use intended software channels
channels:
doas nix-channel --add https://nixos.org/channels/nixos-unstable
doas nix-channel --add https://nixos.org/channels/nixpkgs-unstable
doas nix-channel --update
# Update the system
system:
doas nixos-rebuild switch -I nixos-config=./configuration.nix
# Update the user environment
home:
home-manager switch -f ./home.nix

View File

@ -1,4 +0,0 @@
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
nativeBuildInputs = [ pkgs.buildPackages.stylua pkgs.buildPackages.nixfmt ];
}