24 Commits

Author SHA1 Message Date
97ed5eb33b switch from homebrew to firefox overlay for macos 2022-11-23 15:46:30 -07:00
d672a77ddb fix alt-e in fish for kitty 2022-11-23 14:37:57 -07:00
52f9057ee5 unused n8n setup 2022-11-21 01:04:38 +00:00
7ddd9d9aa4 add discord to macos dock 2022-11-20 12:12:18 -07:00
b9ddaf095c replace alacritty with kitty in macos dock 2022-11-20 12:09:03 -07:00
f304392d58 fix: victormono italic glitch on macos 2022-11-20 11:55:11 -07:00
3beacf9f3c adjust k9s toggleterm keybind 2022-11-20 11:52:33 -07:00
44c4084b57 fix: tfvars recognized as terraform 2022-11-20 11:51:46 -07:00
42237eab13 fix: aerc doesn't recognize config file 2022-11-20 11:38:10 -07:00
2848ae9424 switch kitty to victormono font 2022-11-19 19:40:04 -07:00
a6f9b985fc Revert "force neovim fish shell in toggleterm"
This reverts commit d1f12671b0.
2022-11-19 19:12:04 -07:00
d1f12671b0 force neovim fish shell in toggleterm 2022-11-19 19:12:01 -07:00
30f9f869a7 force fish shell for kitty 2022-11-19 19:11:26 -07:00
e1fc3317b5 adjust aws package layout 2022-11-18 22:35:00 -05:00
07b5f855a6 disable firefox autofill 2022-11-16 15:52:24 -05:00
5178c9f458 fix colorscheme for macbook 2022-11-16 15:52:00 -05:00
2ab37d3298 move noisetorch to linux audio 2022-11-14 10:35:36 -05:00
0176b14350 move qr to nautilusg 2022-11-14 10:35:16 -05:00
8342746b69 fix wsl with new theme 2022-11-10 04:26:38 +00:00
2340b862e5 add noisetorch for mic noise suppression 2022-11-07 20:54:01 -05:00
b04c442c87 replace rnix lsp with nil 2022-11-07 08:04:29 -05:00
5bbba2be39 set back to dark mode default 2022-11-05 19:38:43 -04:00
c871f59791 fixes for light mode 2022-11-05 13:41:09 -04:00
4ea56b0aab fix: remove bell sounds from kitty 2022-11-03 21:20:29 -04:00
23 changed files with 178 additions and 75 deletions

41
flake.lock generated
View File

@ -21,6 +21,24 @@
"type": "github"
}
},
"firefox-darwin": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1668992358,
"narHash": "sha256-24iH+wIbE1bKCFmqslwOpfrDypJ40mk1uGIqRUxDXxY=",
"owner": "bandithedoge",
"repo": "nixpkgs-firefox-darwin",
"rev": "066d4fd658acd075b45405eda9e3bca6a71a47b1",
"type": "github"
},
"original": {
"owner": "bandithedoge",
"repo": "nixpkgs-firefox-darwin",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -111,6 +129,22 @@
}
},
"nixpkgs": {
"locked": {
"lastModified": 1639237670,
"narHash": "sha256-RTdL4rEQcgaZGpvtDgkp3oK/V+1LM3I53n0ACPSroAQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "edfb969386ebe6c3cf8f878775a7975cd88f926d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1666959691,
"narHash": "sha256-TRpWA3t8ata79HOGtFd5dDCl1kJQmIE16PDF53/Hcxo=",
@ -126,7 +160,7 @@
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1660318005,
"narHash": "sha256-g9WCa9lVUmOV6dYRbEPjv/TLOR5hamjeCcKExVGS3OQ=",
@ -159,9 +193,10 @@
"root": {
"inputs": {
"darwin": "darwin",
"firefox-darwin": "firefox-darwin",
"home-manager": "home-manager",
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nur": "nur",
"wallpapers": "wallpapers",
"wsl": "wsl"
@ -202,7 +237,7 @@
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1666720338,

View File

@ -26,6 +26,9 @@
# Community packages; used for Firefox extensions
nur.url = "github:nix-community/nur";
# Use official Firefox binary for macOS
firefox-darwin.url = "github:bandithedoge/nixpkgs-firefox-darwin";
# Wallpapers
wallpapers = {
url = "gitlab:exorcist365/wallpapers";
@ -83,12 +86,10 @@
};
# Package servers into images with a generator
packages.x86_64-linux = with inputs; {
aws = import ./hosts/aws {
inherit inputs globals;
system = "x86_64-linux";
};
};
packages.aws = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ]
(system: {
"${system}" = import ./hosts/aws { inherit inputs globals system; };
});
apps = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; };

View File

@ -37,7 +37,7 @@ nixpkgs.lib.nixosSystem {
../../modules/applications/discord.nix
../../modules/applications/nautilus.nix
../../modules/applications/obsidian.nix
../../modules/mail/default.nix
../../modules/mail
../../modules/gaming/steam.nix
../../modules/gaming/legendary.nix
../../modules/repositories/notes.nix

View File

@ -16,10 +16,13 @@ darwin.lib.darwinSystem {
{
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
gui.enable = true;
colorscheme = (import ../../modules/colorscheme/gruvbox);
theme = {
colors = (import ../../modules/colorscheme/gruvbox).dark;
dark = true;
};
mailUser = globals.user;
networking.hostName = "noah-masur-mac";
nixpkgs.overlays = [ nur.overlay ];
nixpkgs.overlays = [ nur.overlay firefox-darwin.overlay ];
# Set registry to flake packages, used for nix X commands
nix.registry.nixpkgs.flake = nixpkgs;
}
@ -29,6 +32,7 @@ darwin.lib.darwinSystem {
../../modules/applications/alacritty.nix
../../modules/applications/kitty.nix
../../modules/applications/discord.nix
../../modules/applications/firefox.nix
../../modules/repositories/notes.nix
../../modules/programming/nix.nix
../../modules/programming/terraform.nix

View File

@ -16,7 +16,10 @@ nixpkgs.lib.nixosSystem {
nix.registry.nixpkgs.flake = nixpkgs;
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
gui.enable = false;
colorscheme = (import ../../modules/colorscheme/gruvbox);
theme = {
colors = (import ../../modules/colorscheme/gruvbox).dark;
dark = true;
};
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
wsl = {
enable = true;
@ -31,7 +34,7 @@ nixpkgs.lib.nixosSystem {
../common.nix
../../modules/wsl
../../modules/nixos
../../modules/mail/himalaya.nix
../../modules/mail
../../modules/repositories/notes.nix
../../modules/programming/nix.nix
../../modules/programming/lua.nix

View File

@ -9,6 +9,7 @@
programs.firefox = {
enable = true;
package = lib.mkIf pkgs.stdenv.isDarwin pkgs.firefox-bin;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
vimium
@ -38,6 +39,7 @@
"browser.toolbars.bookmarks.visibility" = "newtab";
"browser.startup.page" = 3; # Restore previous session
"browser.newtabpage.enabled" = false; # Make new tabs blank
"dom.forms.autocomplete.formautofill" = false; # Disable autofill
"general.autoScroll" = true; # Drag middle-mouse to scroll
"services.sync.prefs.sync.general.autoScroll" =
false; # Prevent disabling autoscroll
@ -45,6 +47,8 @@
"toolkit.legacyUserProfileCustomizations.stylesheets" =
true; # Allow userChrome.css
"layout.css.color-mix.enabled" = true;
"ui.systemUsesDarkTheme" =
if config.theme.dark == true then 1 else 0;
};
userChrome = ''
:root {

View File

@ -69,6 +69,9 @@
tab_bar_edge = "top";
tab_bar_style = "slant";
# Audio
enable_audio_bell = false;
};
};
};

View File

@ -7,6 +7,13 @@
gnome.nautilus
gnome.sushi # Quick preview with spacebar
];
programs.fish.functions = {
qr = {
body =
"${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | ${pkgs.gnome.sushi}/bin/sushi /tmp/qr.png";
};
};
};
};

View File

@ -20,6 +20,7 @@
base0E = "#d3869b"; # purple
base0F = "#d65d0e"; # brown
neovimConfig = ./neovim.lua;
batTheme = "gruvbox-dark";
};
light = {
base00 = "#fbf1c7"; # ----
@ -38,6 +39,7 @@
base0D = "#076678"; # blue
base0E = "#8f3f71"; # purple
base0F = "#d65d0e"; # brown
neovimConfig = ./neovim-light.lua;
neovimConfig = ./neovim.lua;
batTheme = "gruvbox-light";
};
}

View File

@ -6,7 +6,6 @@ M.packer = function(use)
config = function()
vim.g.gruvbox_italicize_strings = 0
vim.cmd("colorscheme gruvbox8")
vim.cmd("set background=dark")
end,
})
end

View File

@ -3,13 +3,13 @@
home-manager.users.${config.user} = {
home.packages = with pkgs;
[ (nerdfonts.override { fonts = [ "Victor Mono" ]; }) ];
[ (nerdfonts.override { fonts = [ "VictorMono" ]; }) ];
programs.alacritty.settings = { font.normal.family = "Victor Mono"; };
programs.alacritty.settings = { font.normal.family = "VictorMono"; };
programs.kitty.font = {
package = pkgs.nerdfonts;
name = "Victor Mono";
package = (pkgs.nerdfonts.override { fonts = [ "VictorMono" ]; });
name = "VictorMono Nerd Font Mono";
};
};

View File

@ -32,7 +32,6 @@
"openjdk" # Required by Apache Directory Studio
];
casks = [
"firefox" # Firefox packaging on Nix is broken for macOS
"1password" # 1Password packaging on Nix is broken for macOS
"scroll-reverser" # Different scroll style for mouse vs. trackpad
"meetingbar" # Show meetings in menu bar

View File

@ -6,9 +6,11 @@
darwinLaunchOptions = [ "--start-as=fullscreen" ];
font.size = lib.mkForce 20;
settings = {
shell = "${pkgs.fish}/bin/fish";
shell = "/run/current-system/sw/bin/fish";
macos_traditional_fullscreen = true;
macos_quit_when_last_window_closed = true;
disable_ligatures = "always";
macos_option_as_alt = true;
};
};
};

View File

@ -132,6 +132,16 @@
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
echo "Allow apps from anywhere"
SPCTL=$(spctl --status)
if ! [ "$SPCTL" = "assessments disabled" ]; then
sudo spctl --master-disable
fi
'';
# User-level settings
activationScripts.postUserActivation.text = ''
echo "Show the ~/Library folder"
chflags nohidden ~/Library
@ -156,22 +166,17 @@
"$(__dock_item /Applications/1Password.app)" \
"$(__dock_item /Applications/Slack.app)" \
"$(__dock_item /System/Applications/Calendar.app)" \
"$(__dock_item /Applications/Firefox.app)" \
"$(__dock_item ${pkgs.firefox-bin}/Applications/Firefox.app)" \
"$(__dock_item /System/Applications/Messages.app)" \
"$(__dock_item /System/Applications/Mail.app)" \
"$(__dock_item /Applications/Mimestream.app)" \
"$(__dock_item /Applications/zoom.us.app)" \
"$(__dock_item ${pkgs.discord}/Applications/Discord.app)" \
"$(__dock_item /Applications/Obsidian.app)" \
"$(__dock_item /Applications/Alacritty.app)" \
"$(__dock_item ${pkgs.kitty}/Applications/kitty.app)" \
"$(__dock_item /System/Applications/System\ Preferences.app)"
echo "Allow apps from anywhere"
SPCTL=$(spctl --status)
if ! [ "$SPCTL" = "assessments disabled" ]; then
sudo spctl --master-disable
fi
'';
};
}

View File

@ -4,6 +4,12 @@
# macOS user
home = config.homePath;
shell = pkgs.fish; # Default shell
};
# Used for aerc
home-manager.users.${config.user} = {
home.sessionVariables = { XDG_CONFIG_HOME = "${config.homePath}/.config"; };
};
}

View File

@ -39,6 +39,9 @@ in {
pulse.enable = true;
};
# Provides audio source with background noise filtered
programs.noisetorch.enable = true;
# These aren't necessary, but helpful for the user
environment.systemPackages = with pkgs; [
pamixer # Audio control

View File

@ -19,9 +19,9 @@
};
"nvim/lua/packer/colors.lua".source = config.theme.colors.neovimConfig;
"nvim/lua/background.lua".text = ''
vim.cmd("set background=${
vim.o.background = "${
if config.theme.dark == true then "dark" else "light"
}")
}"
'';
};

View File

@ -46,8 +46,8 @@ M.packer = function(use)
capabilities = capabilities,
})
end
if on_path("rnix-lsp") then
require("lspconfig").rnix.setup({ capabilities = capabilities })
if on_path("nil") then
require("lspconfig").nil_ls.setup({ capabilities = capabilities })
end
vim.keymap.set("n", "gd", vim.lsp.buf.definition)

View File

@ -50,7 +50,7 @@ M.packer = function(use)
vim.keymap.set("n", "<Leader>t", TERM_TOGGLE)
vim.keymap.set("n", "<Leader>P", NIXPKGS_TOGGLE)
vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE)
vim.keymap.set("n", "<C-k>", K9S_TOGGLE)
vim.keymap.set("n", "<Leader>9", K9S_TOGGLE)
end,
})

View File

@ -75,6 +75,11 @@ vim.api.nvim_exec(
false
)
vim.filetype.add({
pattern = {
[".*%.tfvars"] = "terraform",
},
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "*.eml",
callback = function()

View File

@ -4,7 +4,7 @@
home.packages = with pkgs; [
nixfmt # Nix file formatter
rnix-lsp # Nix language server
nil # Nix language server
];
};

21
modules/services/n8n.nix Normal file
View File

@ -0,0 +1,21 @@
{ ... }: {
services.n8n = {
enable = true;
settings = {
n8n = {
listenAddress = "127.0.0.1";
port = 5678;
};
};
};
caddyRoutes = [{
match = [{ host = [ config.n8nServer ]; }];
handle = [{
handler = "reverse_proxy";
upstreams = [{ dial = "localhost:5678"; }];
}];
}];
}

View File

@ -13,50 +13,54 @@ let
in {
home-manager.users.${config.user} = {
config = {
home.packages = with pkgs; [
unzip # Extract zips
rsync # Copy folders
ripgrep # grep
bat # cat
fd # find
sd # sed
jq # JSON manipulation
tealdeer # Cheatsheets
tree # View directory hierarchy
htop # Show system processes
glow # Pretty markdown previews
qrencode # Generate qr codes
vimv-rs # Batch rename files
dig # DNS lookup
lf # File viewer
# whois # Lookup IPs
age # Encryption
];
home-manager.users.${config.user} = {
programs.zoxide.enable = true; # Shortcut jump command
home.packages = with pkgs; [
unzip # Extract zips
rsync # Copy folders
ripgrep # grep
fd # find
sd # sed
jq # JSON manipulation
tealdeer # Cheatsheets
tree # View directory hierarchy
htop # Show system processes
glow # Pretty markdown previews
qrencode # Generate qr codes
vimv-rs # Batch rename files
dig # DNS lookup
lf # File viewer
inetutils # Includes telnet, whois
age # Encryption
];
home.file = {
".rgignore".text = ignorePatterns;
".fdignore".text = ignorePatterns;
".digrc".text = "+noall +answer"; # Cleaner dig commands
};
programs.zoxide.enable = true; # Shortcut jump command
programs.fish.shellAbbrs = {
cat = "bat"; # Swap cat with bat
};
programs.fish.functions = {
ping = {
description = "Improved ping";
argumentNames = "target";
body = "${pkgs.prettyping}/bin/prettyping --nolegend $target";
home.file = {
".rgignore".text = ignorePatterns;
".fdignore".text = ignorePatterns;
".digrc".text = "+noall +answer"; # Cleaner dig commands
};
qr = {
body =
"${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | open /tmp/qr.png"; # Fix for non-macOS
programs.bat = {
enable = true; # cat replacement
config = { theme = config.theme.colors.batTheme; };
};
programs.fish.shellAbbrs = {
cat = "bat"; # Swap cat with bat
};
programs.fish.functions = {
ping = {
description = "Improved ping";
argumentNames = "target";
body = "${pkgs.prettyping}/bin/prettyping --nolegend $target";
};
};
};
};