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 wget
curl curl
home-manager home-manager
just
xclip xclip
pamixer pamixer

1
nixos/default.nix Normal file
View File

@ -0,0 +1 @@
{ }

View File

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