mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 11:23:40 +00:00
Refactor packages
This commit is contained in:
@@ -1,215 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (pkgs) stdenv;
|
|
||||||
in {
|
|
||||||
# System-wide packages to install.
|
|
||||||
environment.systemPackages = with pkgs; let
|
|
||||||
common =
|
|
||||||
[
|
|
||||||
# essentials
|
|
||||||
curl
|
|
||||||
gcc
|
|
||||||
git
|
|
||||||
git-crypt
|
|
||||||
gnupg
|
|
||||||
imagemagick
|
|
||||||
jq
|
|
||||||
ripgrep
|
|
||||||
unzip
|
|
||||||
xclip
|
|
||||||
xdg_utils
|
|
||||||
yq-go
|
|
||||||
zip
|
|
||||||
|
|
||||||
# ansible
|
|
||||||
/*
|
|
||||||
ansible
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
ansible-lint
|
|
||||||
*/
|
|
||||||
|
|
||||||
# productivity
|
|
||||||
bat
|
|
||||||
/*
|
|
||||||
checkov
|
|
||||||
*/
|
|
||||||
colordiff
|
|
||||||
drone-cli
|
|
||||||
exa
|
|
||||||
fd
|
|
||||||
github-cli
|
|
||||||
gnumake
|
|
||||||
go-jira
|
|
||||||
hadolint
|
|
||||||
nodePackages.eslint
|
|
||||||
oha
|
|
||||||
postman
|
|
||||||
pre-commit
|
|
||||||
shellcheck
|
|
||||||
shfmt
|
|
||||||
starship
|
|
||||||
tldr
|
|
||||||
tmux-sessionizer
|
|
||||||
|
|
||||||
# containers
|
|
||||||
docker
|
|
||||||
docker-compose
|
|
||||||
kubectl
|
|
||||||
kubernetes-helm
|
|
||||||
kustomize
|
|
||||||
minikube
|
|
||||||
stern
|
|
||||||
|
|
||||||
# language servers
|
|
||||||
nodePackages.bash-language-server
|
|
||||||
nodePackages.pyright
|
|
||||||
nodePackages.yaml-language-server
|
|
||||||
sumneko-lua-language-server
|
|
||||||
|
|
||||||
# monitoring
|
|
||||||
ctop
|
|
||||||
/*
|
|
||||||
glances
|
|
||||||
*/
|
|
||||||
htop
|
|
||||||
procs
|
|
||||||
|
|
||||||
# data tools
|
|
||||||
dbeaver
|
|
||||||
|
|
||||||
# lua
|
|
||||||
lua53Packages.luacheck
|
|
||||||
stylua
|
|
||||||
|
|
||||||
# golang
|
|
||||||
golangci-lint
|
|
||||||
gopls
|
|
||||||
gofumpt
|
|
||||||
|
|
||||||
# js
|
|
||||||
nodejs
|
|
||||||
nodePackages.prettier
|
|
||||||
nodePackages.yarn
|
|
||||||
|
|
||||||
# video
|
|
||||||
youtube-dl
|
|
||||||
|
|
||||||
# networking
|
|
||||||
arp-scan
|
|
||||||
/*
|
|
||||||
dnsutils
|
|
||||||
*/
|
|
||||||
iperf
|
|
||||||
nmap
|
|
||||||
openssl
|
|
||||||
openvpn
|
|
||||||
sshfs # mac requires https://osxfuse.github.io/
|
|
||||||
vpngate
|
|
||||||
whois
|
|
||||||
|
|
||||||
# backup
|
|
||||||
rclone
|
|
||||||
restic
|
|
||||||
|
|
||||||
# infra
|
|
||||||
terraform-ls
|
|
||||||
terraformer
|
|
||||||
tflint
|
|
||||||
tfswitch
|
|
||||||
infracost
|
|
||||||
|
|
||||||
# nix
|
|
||||||
alejandra
|
|
||||||
cachix
|
|
||||||
nix-diff
|
|
||||||
nixfmt
|
|
||||||
nixpkgs-fmt
|
|
||||||
nixpkgs-review
|
|
||||||
rnix-lsp
|
|
||||||
|
|
||||||
# cloud
|
|
||||||
/*
|
|
||||||
awscli2
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
ssm-session-manager-plugin
|
|
||||||
*/
|
|
||||||
google-cloud-sdk
|
|
||||||
|
|
||||||
# python
|
|
||||||
python310
|
|
||||||
/*
|
|
||||||
python310Packages.black
|
|
||||||
*/
|
|
||||||
python310Packages.ipython
|
|
||||||
python310Packages.pip
|
|
||||||
/*
|
|
||||||
python310Packages.poetry
|
|
||||||
*/
|
|
||||||
python310Packages.setuptools
|
|
||||||
python310Packages.virtualenv
|
|
||||||
|
|
||||||
# blog
|
|
||||||
hugo
|
|
||||||
|
|
||||||
# news
|
|
||||||
srv
|
|
||||||
]
|
|
||||||
++ lib.optionals stdenv.isLinux [
|
|
||||||
albert
|
|
||||||
authy
|
|
||||||
bitwarden
|
|
||||||
brave
|
|
||||||
calibre
|
|
||||||
cryptsetup
|
|
||||||
deluge
|
|
||||||
discord
|
|
||||||
firefox
|
|
||||||
ghostscript
|
|
||||||
gimp-with-plugins
|
|
||||||
glibcLocales
|
|
||||||
gnome3.gnome-tweaks
|
|
||||||
gnomeExtensions.appindicator
|
|
||||||
google-chrome
|
|
||||||
guake
|
|
||||||
i3lock-fancy-rapid
|
|
||||||
iotop
|
|
||||||
kazam
|
|
||||||
keyleds
|
|
||||||
linuxPackages.perf
|
|
||||||
minecraft
|
|
||||||
mojave-gtk-theme
|
|
||||||
netdata
|
|
||||||
nvfancontrol
|
|
||||||
pavucontrol
|
|
||||||
pinentry-curses
|
|
||||||
podman
|
|
||||||
qemu
|
|
||||||
rfd
|
|
||||||
rtorrent
|
|
||||||
rustup
|
|
||||||
signal-desktop
|
|
||||||
slack
|
|
||||||
spotify
|
|
||||||
steam
|
|
||||||
strace
|
|
||||||
tailscale
|
|
||||||
usbutils
|
|
||||||
virtmanager
|
|
||||||
vlc
|
|
||||||
vscodium
|
|
||||||
wireshark-qt
|
|
||||||
xautolock
|
|
||||||
yaru-theme
|
|
||||||
zoom-us
|
|
||||||
];
|
|
||||||
in
|
|
||||||
common;
|
|
||||||
|
|
||||||
programs.gnupg.agent.enable = true;
|
|
||||||
}
|
|
30
flake.lock
generated
30
flake.lock
generated
@@ -59,11 +59,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1656367977,
|
"lastModified": 1656927578,
|
||||||
"narHash": "sha256-0hV17V9Up9pnAtPJ+787FhrsPnawxoTPA/VxgjRMrjc=",
|
"narHash": "sha256-ZSFrM/1PlJOqCb3mN88ZUh9dkQvNLU/nkoQ2tu02/FM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "3bf16c0fd141c28312be52945d1543f9ce557bb1",
|
"rev": "f2445620d177e295e711c1b2bc6c01ed6df26c16",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -82,11 +82,11 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "contrib",
|
"dir": "contrib",
|
||||||
"lastModified": 1656735907,
|
"lastModified": 1656904399,
|
||||||
"narHash": "sha256-6tDUHALUyszphRnZFCD7c78eESphfRX2L6FnWCVVNIc=",
|
"narHash": "sha256-lJRk5fLa5xPARKIhslP9J6dLuhjV+4HmCfa+tr2HqvA=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "a9de89894a2ff43dd511b38f20ab2815d6c7e2bd",
|
"rev": "f075feee3258d15f6549e33c185f6165f9c7fbfc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -103,11 +103,11 @@
|
|||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1656749719,
|
"lastModified": 1656922590,
|
||||||
"narHash": "sha256-r/3k68MkeV1T6lSp2R9ewT+Bj1a6N3ZjUXE4y7fjJLk=",
|
"narHash": "sha256-m8SRuH6NgQ8AB7W+Oev/ip7O56YzGHHV7DMjw+bT+aM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "25b1177974a2d13c5bf3109f17940ce07c1cd043",
|
"rev": "61ce522387dc8219b1efe4315fb65ddbadae2b60",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -118,11 +118,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1656702262,
|
"lastModified": 1656933710,
|
||||||
"narHash": "sha256-BdVdx6LoGgAeIYrHnzk+AgbtkaVlV3JNcC6+vltLuh0=",
|
"narHash": "sha256-SVG8EqY1OTJWBRY4hpct2ZR2Rk0L8hCFkug3m0ABoZE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "c5308381432cdbf14d5b1128747a2845f5c6871e",
|
"rev": "3bf48d3587d3f34f745a19ebc968b002ef5b5c5a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -134,11 +134,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1656461576,
|
"lastModified": 1656753965,
|
||||||
"narHash": "sha256-rlmmw6lIlkMQIiB+NsnO8wQYWTfle8TA41UREPLP5VY=",
|
"narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cf3ab54b4afe2b7477faa1dd0b65bf74c055d70c",
|
"rev": "0ea7a8f1b939d74e5df8af9a8f7342097cdf69eb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
13
flake.nix
13
flake.nix
@@ -31,7 +31,7 @@
|
|||||||
defaultModules = [
|
defaultModules = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
./common/fonts.nix
|
./common/fonts.nix
|
||||||
./common/packages.nix
|
./packages/common.nix
|
||||||
|
|
||||||
({
|
({
|
||||||
config,
|
config,
|
||||||
@@ -71,12 +71,13 @@
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
desktopLinuxModules = [
|
desktopLinuxModules = [
|
||||||
./common/printing.nix
|
./common/desktop.nix
|
||||||
./services/netdata/default.nix
|
|
||||||
./services/keyleds/default.nix
|
|
||||||
./common/linux.nix
|
./common/linux.nix
|
||||||
./common/networking.nix
|
./common/networking.nix
|
||||||
./common/desktop.nix
|
./common/printing.nix
|
||||||
|
./packages/desktop.nix
|
||||||
|
./services/keyleds/default.nix
|
||||||
|
./services/netdata/default.nix
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
hephaestus = nixpkgs.lib.nixosSystem {
|
hephaestus = nixpkgs.lib.nixosSystem {
|
||||||
@@ -106,7 +107,7 @@
|
|||||||
modules = [
|
modules = [
|
||||||
home-manager.darwinModules.home-manager
|
home-manager.darwinModules.home-manager
|
||||||
./common/darwin.nix
|
./common/darwin.nix
|
||||||
./common/packages.nix
|
./packages/common.nix
|
||||||
|
|
||||||
./machines/zelus/configuration.nix
|
./machines/zelus/configuration.nix
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ with lib; {
|
|||||||
};
|
};
|
||||||
defaultUser = mkOption {
|
defaultUser = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
default = "dave";
|
default = "nixos";
|
||||||
description = "The name of the default user";
|
description = "The name of the default user";
|
||||||
};
|
};
|
||||||
startMenuLaunchers = mkEnableOption "shortcuts for GUI applications in the windows start menu";
|
startMenuLaunchers = mkEnableOption "shortcuts for GUI applications in the windows start menu";
|
||||||
|
160
packages/common.nix
Normal file
160
packages/common.nix
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (pkgs) stdenv;
|
||||||
|
in {
|
||||||
|
# System-wide packages to install.
|
||||||
|
environment.systemPackages = with pkgs; let
|
||||||
|
common = [
|
||||||
|
# essentials
|
||||||
|
curl
|
||||||
|
gcc
|
||||||
|
git
|
||||||
|
git-crypt
|
||||||
|
gnupg
|
||||||
|
imagemagick
|
||||||
|
jq
|
||||||
|
ripgrep
|
||||||
|
unzip
|
||||||
|
xclip
|
||||||
|
xdg_utils
|
||||||
|
yq-go
|
||||||
|
zip
|
||||||
|
|
||||||
|
# ansible
|
||||||
|
/*
|
||||||
|
ansible
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
ansible-lint
|
||||||
|
*/
|
||||||
|
|
||||||
|
# productivity
|
||||||
|
bat
|
||||||
|
/*
|
||||||
|
checkov
|
||||||
|
*/
|
||||||
|
colordiff
|
||||||
|
drone-cli
|
||||||
|
exa
|
||||||
|
fd
|
||||||
|
github-cli
|
||||||
|
gnumake
|
||||||
|
go-jira
|
||||||
|
hadolint
|
||||||
|
nodePackages.eslint
|
||||||
|
oha
|
||||||
|
postman
|
||||||
|
pre-commit
|
||||||
|
shellcheck
|
||||||
|
shfmt
|
||||||
|
starship
|
||||||
|
tldr
|
||||||
|
tmux-sessionizer
|
||||||
|
|
||||||
|
# containers
|
||||||
|
docker
|
||||||
|
docker-compose
|
||||||
|
kubectl
|
||||||
|
kubernetes-helm
|
||||||
|
kustomize
|
||||||
|
minikube
|
||||||
|
stern
|
||||||
|
|
||||||
|
# language servers
|
||||||
|
nodePackages.bash-language-server
|
||||||
|
nodePackages.pyright
|
||||||
|
nodePackages.yaml-language-server
|
||||||
|
sumneko-lua-language-server
|
||||||
|
|
||||||
|
# monitoring
|
||||||
|
ctop
|
||||||
|
/*
|
||||||
|
glances
|
||||||
|
*/
|
||||||
|
htop
|
||||||
|
procs
|
||||||
|
|
||||||
|
# lua
|
||||||
|
lua53Packages.luacheck
|
||||||
|
stylua
|
||||||
|
|
||||||
|
# golang
|
||||||
|
golangci-lint
|
||||||
|
gopls
|
||||||
|
gofumpt
|
||||||
|
|
||||||
|
# js
|
||||||
|
nodejs
|
||||||
|
nodePackages.prettier
|
||||||
|
nodePackages.yarn
|
||||||
|
|
||||||
|
# video
|
||||||
|
youtube-dl
|
||||||
|
|
||||||
|
# networking
|
||||||
|
arp-scan
|
||||||
|
/*
|
||||||
|
dnsutils
|
||||||
|
*/
|
||||||
|
iperf
|
||||||
|
nmap
|
||||||
|
openssl
|
||||||
|
openvpn
|
||||||
|
sshfs # mac requires https://osxfuse.github.io/
|
||||||
|
vpngate
|
||||||
|
whois
|
||||||
|
|
||||||
|
# backup
|
||||||
|
rclone
|
||||||
|
restic
|
||||||
|
|
||||||
|
# infra
|
||||||
|
terraform-ls
|
||||||
|
terraformer
|
||||||
|
tflint
|
||||||
|
tfswitch
|
||||||
|
infracost
|
||||||
|
|
||||||
|
# nix
|
||||||
|
alejandra
|
||||||
|
cachix
|
||||||
|
nix-diff
|
||||||
|
nixfmt
|
||||||
|
nixpkgs-fmt
|
||||||
|
nixpkgs-review
|
||||||
|
rnix-lsp
|
||||||
|
|
||||||
|
# cloud
|
||||||
|
/*
|
||||||
|
awscli2
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
ssm-session-manager-plugin
|
||||||
|
*/
|
||||||
|
google-cloud-sdk
|
||||||
|
|
||||||
|
# python
|
||||||
|
python310
|
||||||
|
python310Packages.black
|
||||||
|
python310Packages.ipython
|
||||||
|
python310Packages.pip
|
||||||
|
python310Packages.poetry
|
||||||
|
python310Packages.setuptools
|
||||||
|
python310Packages.virtualenv
|
||||||
|
|
||||||
|
# blog
|
||||||
|
hugo
|
||||||
|
|
||||||
|
# news
|
||||||
|
rfd
|
||||||
|
srv
|
||||||
|
];
|
||||||
|
in
|
||||||
|
common;
|
||||||
|
|
||||||
|
programs.gnupg.agent.enable = true;
|
||||||
|
}
|
49
packages/desktop.nix
Normal file
49
packages/desktop.nix
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (pkgs) stdenv;
|
||||||
|
in {
|
||||||
|
# System-wide packages to install.
|
||||||
|
environment.systemPackages = with pkgs; let
|
||||||
|
linuxDesktop = [
|
||||||
|
albert
|
||||||
|
authy
|
||||||
|
bitwarden
|
||||||
|
brave
|
||||||
|
calibre
|
||||||
|
deluge
|
||||||
|
discord
|
||||||
|
firefox
|
||||||
|
ghostscript
|
||||||
|
gimp-with-plugins
|
||||||
|
gnome3.gnome-tweaks
|
||||||
|
gnomeExtensions.appindicator
|
||||||
|
guake
|
||||||
|
i3lock-fancy-rapid
|
||||||
|
kazam
|
||||||
|
keyleds
|
||||||
|
nvfancontrol
|
||||||
|
pavucontrol
|
||||||
|
podman
|
||||||
|
qemu
|
||||||
|
signal-desktop
|
||||||
|
slack
|
||||||
|
spotify
|
||||||
|
steam
|
||||||
|
usbutils
|
||||||
|
virtmanager
|
||||||
|
vlc
|
||||||
|
vscodium
|
||||||
|
wireshark-qt
|
||||||
|
xautolock
|
||||||
|
yaru-theme
|
||||||
|
zoom-us
|
||||||
|
];
|
||||||
|
in
|
||||||
|
linuxDesktop;
|
||||||
|
|
||||||
|
programs.gnupg.agent.enable = true;
|
||||||
|
}
|
26
packages/linux.nix
Normal file
26
packages/linux.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (pkgs) stdenv;
|
||||||
|
in {
|
||||||
|
# System-wide packages to install.
|
||||||
|
environment.systemPackages = with pkgs; let
|
||||||
|
linux = [
|
||||||
|
cryptsetup
|
||||||
|
glibcLocales
|
||||||
|
iotop
|
||||||
|
linuxPackages.perf
|
||||||
|
netdata
|
||||||
|
pinentry-curses
|
||||||
|
rustup
|
||||||
|
strace
|
||||||
|
tailscale
|
||||||
|
];
|
||||||
|
in
|
||||||
|
linux;
|
||||||
|
|
||||||
|
programs.gnupg.agent.enable = true;
|
||||||
|
}
|
Reference in New Issue
Block a user