modules updates

This commit is contained in:
Danilo Reyes 2024-04-28 11:24:47 -06:00
parent e23ce200a5
commit 4bcb766dec
11 changed files with 102 additions and 38 deletions

View File

@ -1,6 +1,11 @@
{ config, lib, pkgs, options, ... }: {
imports =
[ ./modules/apps.nix ./modules/dev.nix ./modules/services.nix ./jawz.nix ];
imports = [
./modules/apps.nix
./modules/dev.nix
./modules/shell.nix
./modules/services.nix
./jawz.nix
];
system = {
copySystemConfiguration = true;
stateVersion = "23.11";

View File

@ -10,11 +10,10 @@ in {
useGlobalPkgs = true;
users.jawz = { config, pkgs, ... }: {
home.stateVersion = version;
programs.bash = {
enable = true;
historyFile = "\${XDG_STATE_HOME}/bash/history";
historyControl = [ "erasedups" "ignorespace" ];
historyControl = [ "erasedups" "ignorespace" "ignoredups" ];
shellAliases = {
hh = "hstr";
ls = "eza --icons --group-directories-first";
@ -63,8 +62,8 @@ in {
nixos-reload () {
NIXOSDIR=/home/jawz/Development/NixOS
nix-store --add-fixed sha256 \
$NIXOSDIR/PureRef-1.11.1_x64.Appimage
# nix-store --add-fixed sha256 \
# $NIXOSDIR/PureRef-1.11.1_x64.Appimage
fd --full-path $NIXOSDIR -e nix -x nixfmt \;
sudo unbuffer nixos-rebuild switch -I \
nixos-config="$NIXOSDIR/hosts/$HOSTNAME/configuration.nix" \
@ -96,9 +95,12 @@ in {
};
};
programs = {
emacs.enable = true;
helix = { enable = true; };
hstr.enable = true;
zoxide = {
enable = true;
enableBashIntegration = true;
};
direnv = {
enable = true;
enableBashIntegration = true;
@ -129,17 +131,7 @@ in {
package = pkgs.htop-vim;
};
};
services = {
lorri.enable = true;
emacs = {
enable = true;
defaultEditor = true;
package = with pkgs;
((emacsPackagesFor emacs-gtk).emacsWithPackages
(epkgs: [ epkgs.vterm ]));
startWithUserSession = "graphical";
};
};
services = { lorri.enable = true; };
};
};
}

View File

@ -14,6 +14,7 @@ in {
# ../../services/systemd-user/tasks.nix
];
my = {
emacs.enable = true;
apps = {
art.enable = true;
dictionaries.enable = true;
@ -29,6 +30,7 @@ in {
python.enable = true;
gameDev.enable = true;
};
shell = { exercism.enable = true; };
services = {
network.enable = true;
nvidia.enable = true;
@ -98,6 +100,7 @@ in {
packages = (with pkgs; [
obs-studio # screen recorder & streamer
pitivi # video editor
gocryptfs # encrypted filesystem! shhh!!!
# celeste # sync tool for any cloud provider
# czkawka # duplicate finder
@ -107,21 +110,21 @@ in {
pika-backup # backups
gnome-obfuscate # censor private information
unstable.yt-dlp # downloads videos from most video websites
gallery-dl # similar to yt-dlp but for most image gallery websites
(ripgrep.override { withPCRE2 = true; }) # modern grep
du-dust # rusty du similar to gdu
eza # like ls but with colors
fd # modern find, faster searches
ffmpeg_5-full # not ffmpreg, the coolest video conversion tool!
ffmpeg # not ffmpreg, the coolest video conversion tool!
fzf # fuzzy finder! super cool and useful
gallery-dl # similar to yt-dlp but for most image gallery websites
gdu # disk-space utility checker, somewhat useful
gocryptfs # encrypted filesystem! shhh!!!
imagemagick # photoshop what??
rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS
torrenttools # create torrent files from the terminal!
tldr # man for retards
trash-cli # oop! did not meant to delete that
yt-dlp # downloads videos from most video websites
torrenttools # create torrent files from the terminal!
vcsi # video thumbnails for torrents, can I replace it with ^?
(writeScriptBin "tasks" (builtins.readFile ../../scripts/tasks.sh))
@ -145,11 +148,7 @@ in {
xdotool
xclip
tldr # man for retards
exercism # learn to code
# SH
bats # testing system, required by Exercism
bashdb # autocomplete
shellcheck # linting
shfmt # a shell parser and formatter
@ -214,6 +213,12 @@ in {
package = pkgs.gnomeExtensions.gsconnect;
};
# programs.nh = {
# enable = true;
# clean.enable = true;
# clean.extraArgs = "--keep-since 4d --keep 3";
# };
services.resilio = {
deviceName = "chichis";
enable = true;

View File

@ -58,6 +58,11 @@
};
fileSystems = let
nfsMount = nfsDisk: {
device = "server:/${nfsDisk}";
fsType = "nfs";
options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=600" ];
};
btrfsMount = subvol: {
device = "/dev/mapper/nvme";
fsType = "btrfs";

View File

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }:
{
let
unstable = import
(builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") {
config = config.nixpkgs.config;
};
in {
options.my.apps.gaming.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.apps.gaming.enable {
programs.steam = {

View File

@ -10,7 +10,9 @@
celluloid # video player
curtail # image compressor
easyeffects # equalizer
handbrake # video converter, may be unnecessary
# (handbrake.override {
# useGtk = true;
# }) # video converter, may be unnecessary
identity # compare images or videos
mousai # poor man shazam
shortwave # listen to world radio

View File

@ -1,6 +1,10 @@
{ config, lib, pkgs, unstable, ... }:
{
{ config, lib, pkgs, ... }:
let
unstable = import
(builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master") {
config = config.nixpkgs.config;
};
in {
options.my.apps.office.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.apps.office.enable {
users.users.jawz.packages = with pkgs; ([
@ -8,6 +12,7 @@
calibre # ugly af eBook library manager
newsflash # feed reader, syncs with nextcloud
furtherance # I packaged this one tehee track time utility
unstable.planify # let's pretend I will organize my tasks
# foliate # gtk eBook reader
# wike # gtk wikipedia wow!
# denaro # manage your finances

View File

@ -1,7 +1,6 @@
{ config, lib, pkgs, ... }:
{
imports = [ ./dev/haskell.nix ./dev/nix.nix ./dev/python.nix ];
{ config, lib, pkgs, ... }: {
imports = [ ./dev/haskell.nix ./dev/nix.nix ./dev/python.nix ./emacs.nix ];
my.emacs.enable = lib.mkDefault false;
my.dev = {
haskell.enable = lib.mkDefault false;
nix.enable = lib.mkDefault false;

24
modules/emacs.nix Normal file
View File

@ -0,0 +1,24 @@
{ config, lib, pkgs, unstable, ... }: {
options.my.emacs.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.emacs.enable {
users.users.jawz.packages = with pkgs; ([
fd # modern find, faster searches
(ripgrep.override { withPCRE2 = true; }) # modern grep
]);
services.emacs = {
enable = true;
package = with pkgs;
((emacsPackagesFor emacs-gtk).emacsWithPackages
(epkgs: with epkgs; ([ vterm ])));
defaultEditor = true;
};
home-manager.users.jawz.programs.bash.initExtra = ''
emacs-sqlite-fix () {
nix-shell -p cmake sqlite --command "doom sync &&
sc restart emacs &&
emacsclient -e '(org-roam-db-sync)'" &&
doom sync
}
'';
};
}

12
modules/shell.nix Normal file
View File

@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
{
imports = [ ./shell/exercism.nix ./dev/python.nix ./dev/haskell.nix ];
my = {
shell = { exercism.enable = lib.mkDefault false; };
dev = {
haskell.enable = lib.mkDefault false;
python.enable = lib.mkDefault false;
};
};
}

View File

@ -0,0 +1,11 @@
{ config, lib, pkgs, unstable, ... }:
{
options.my.shell.exercism.enable = lib.mkEnableOption "enable";
config = lib.mkIf config.my.shell.exercism.enable {
users.users.jawz.packages = with pkgs; ([
exercism # learn to code
bats # testing system, required by Exercism
]);
};
}