Skip to content

Commit

Permalink
factor out with
Browse files Browse the repository at this point in the history
  • Loading branch information
bri committed Feb 16, 2024
1 parent cac732d commit ceb9b63
Show file tree
Hide file tree
Showing 20 changed files with 190 additions and 190 deletions.
4 changes: 2 additions & 2 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
# };
nixos-hardware.url = "github:nixos/nixos-hardware";
darwin = {
url = "github:lnl7/nix-darwin";
#url = "github:lnl7/nix-darwin";
url = "github:b-/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
Expand Down Expand Up @@ -384,11 +385,11 @@
in
rec {
pyEnv = pkgs.python3.withPackages (
ps: with ps; [
black
typer
colorama
shellingham
ps: [
ps.black
ps.typer
ps.colorama
ps.shellingham
]
);
sysdo = pkgs.writeScriptBin "sysdo" ''
Expand Down
49 changes: 25 additions & 24 deletions modules/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,50 +46,51 @@

# environment setup
environment = {
systemPackages = with pkgs; [
systemPackages = [
# editors
neovim
pkgs.neovim

# standard toolset
coreutils-full
findutils
diffutils
curl
wget
git
jq
pkgs.coreutils-full
pkgs.findutils
pkgs.diffutils
pkgs.curl
pkgs.wget
pkgs.git
pkgs.jq

# helpful shell stuff
bat
fzf
ripgrep
pkgs.bat
pkgs.fzf
pkgs.ripgrep

# languages
python3
ruby
shfmt
pkgs.python3
pkgs.ruby
pkgs.shfmt

# nix stuff
cachix
nixfmt-rfc-style
home-manager
inputs.attic.packages.x86_64-linux.attic-client
pkgs.cachix
pkgs.nil
pkgs.nixfmt-rfc-style
pkgs.home-manager
inputs.attic.packages.${pkgs.system}.attic-client
];
etc = {
home-manager.source = "${inputs.home-manager}";
nixpkgs.source = "${inputs.nixpkgs}";
stable.source = "${inputs.stable}";
};
# list of acceptable shells in /etc/shells
shells = with pkgs; [
bash
zsh
fish
shells = [
pkgs.bash
pkgs.zsh
pkgs.fish
];
};

fonts = {
fontDir.enable = true;
fonts = with pkgs; [ jetbrains-mono ];
fonts = [ pkgs.jetbrains-mono ]; # fonts.fonts was _not_ renamed to fonts.packages in nix-darwin
};
}
9 changes: 4 additions & 5 deletions modules/darwin/syncthing.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
pkgs,
...
}:
with lib;
let
cfg = config.services.syncthing;
in
{
options = {
services.syncthing = {
enable = mkOption {
enable = lib.mkOption {
type = types.bool;
default = false;
description = "Whether to enable the Syncthing service.";
};

homeDir = mkOption {
homeDir = lib.mkOption {
type = types.nullOr types.path;
default = "~";
example = "/Users/bri";
Expand All @@ -26,7 +25,7 @@ in
'';
};

logDir = mkOption {
logDir = lib.mkOption {
type = types.nullOr types.path;
default = "~/Library/Logs";
example = "~/Library/Logs";
Expand All @@ -37,7 +36,7 @@ in
};
};

config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.syncthing ];
launchd.user.agents.syncthing = {
command = "${lib.getExe pkgs.syncthing}";
Expand Down
138 changes: 69 additions & 69 deletions modules/home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,73 +58,73 @@ in
];

# define package definitions for current user environment
packages = with pkgs; [
age
packages = [
pkgs.age

alejandra
atuin
# autojump
cachix
cb
cirrus-cli
comma
coreutils-full
curl
diffutils
fd
ffmpeg
findutils
gawk
gnugrep
gnupg
gnused
grype
helm-docs
httpie
hurl
kotlin
kubectl
kubectx
kubernetes-helm
kustomize
lazydocker
luajit
mmv
ncdu
neofetch
nil
nix
#nixfmt
nixfmt-rfc-style
nixpkgs-fmt
nmap
nodejs_20
parallel
poetry
pre-commit
pkgs.alejandra
pkgs.atuin
# pkgs.autojump
pkgs.cachix
pkgs.cb
pkgs.cirrus-cli
pkgs.comma
pkgs.coreutils-full
pkgs.curl
pkgs.diffutils
pkgs.fd
pkgs.ffmpeg
pkgs.findutils
pkgs.gawk
pkgs.gnugrep
pkgs.gnupg
pkgs.gnused
pkgs.grype
pkgs.helm-docs
pkgs.httpie
pkgs.hurl
pkgs.kotlin
pkgs.kubectl
pkgs.kubectx
pkgs.kubernetes-helm
pkgs.kustomize
pkgs.lazydocker
pkgs.luajit
pkgs.mmv
pkgs.ncdu
pkgs.neofetch
pkgs.nil
pkgs.nix
#pkgs.nixfmt
pkgs.nixfmt-rfc-style
pkgs.nixpkgs-fmt
pkgs.nmap
pkgs.nodejs_20
pkgs.parallel
pkgs.poetry
pkgs.pre-commit
# python with default packages
(python3.withPackages (
ps: with ps; [
numpy
scipy
matplotlib
networkx
(pkgs.python3.withPackages (
ps: [
ps.numpy
ps.scipy
ps.matplotlib
ps.networkx
]
))
ranger
rclone
restic
rnix-lsp
rsync
ruff
shellcheck
starship
stylua
sysdo
tree
treefmt
trivy
yq-go
pkgs.ranger
pkgs.rclone
pkgs.restic
pkgs.rnix-lsp
pkgs.rsync
pkgs.ruff
pkgs.shellcheck
pkgs.starship
pkgs.stylua
pkgs.sysdo
pkgs.tree
pkgs.treefmt
pkgs.trivy
pkgs.yq-go
];
};

Expand Down Expand Up @@ -154,13 +154,13 @@ in
# conditionally enable vscode only on linux
vscode = mkIf stdenv.isLinux {
enable = true;
# extensions = with pkgs.vscode-extensions; [ vscode-extensions.ms-vscode-remote ];
# extensions = [ pkgs.vscode-extensions.ms-vscode-remote ];
package = pkgs.vscode.fhsWithPackages (
ps: with ps; [
rustup
zlib
openssl.dev
pkg-config
ps: [
ps.rustup
ps.zlib
ps.openssl.dev
ps.pkg-config
]
);
};
Expand Down
20 changes: 10 additions & 10 deletions modules/home-manager/nvim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@
withPython3 = true;

# share vim plugins since nothing is specific to nvim
plugins = with pkgs.vimPlugins; [
plugins = [
# basics
vim-commentary
pkgs.vimPlugins.vim-commentary

vim-fugitive
vim-nix
pkgs.vimPlugins.vim-fugitive
pkgs.vimPlugins.vim-nix

vim-sandwich
vim-sensible
pkgs.vimPlugins.vim-sandwich
pkgs.vimPlugins.vim-sensible

# vim addon utilities
direnv-vim
ranger-vim
nvim-lspconfig
mason-lspconfig-nvim
pkgs.vimPlugins.direnv-vim
pkgs.vimPlugins.ranger-vim
pkgs.vimPlugins.nvim-lspconfig
pkgs.vimPlugins.mason-lspconfig-nvim
];
extraConfig = ''
${config.lib.vimUtils.readVimConfig ./settings.lua}
Expand Down
Loading

0 comments on commit ceb9b63

Please sign in to comment.