Compare commits

...

5 Commits

19 changed files with 73 additions and 95 deletions

2
TODO.md Normal file
View File

@ -0,0 +1,2 @@
- Add Nix formatting and linting that works with neovim.
- Change system to configs and migrate files to programs, desktop, or services as appropriate. configs will include optional system configuration that don't require additional programs installed (aliases for example)

View File

@ -40,8 +40,6 @@
devel = {
engineering.enable = true;
notes.enable = true;
python.enable = true;
tooling.enable = true;
};
gaming = {
emulation.enable = true;
@ -49,6 +47,7 @@
steam.enable = true;
};
programs = {
beancount.enable = true;
chezmoi.apply = true;
kitty.enable = true;
syncthing = {

View File

@ -34,10 +34,6 @@
enable = true;
gnome.enable = true;
};
devel = {
python.enable = true;
tooling.enable = true;
};
programs = {
chezmoi.apply = true;
kitty.enable = true;

View File

@ -27,8 +27,6 @@
devel = {
engineering.enable = true;
notes.enable = true;
python.enable = true;
tooling.enable = true;
};
programs = {
kitty.enable = true;

View File

@ -96,9 +96,6 @@
# Modules
modules = {
devel = {
tooling.enable = true;
};
programs = {
chezmoi.apply = true;
};

View File

@ -52,10 +52,6 @@ in
# Modules
modules = {
devel = {
python.enable = true;
tooling.enable = true;
};
programs = {
chezmoi.apply = true;
git.keys = false;

View File

@ -1,4 +1,7 @@
{ ... }:
{
imports = [ ./notes.nix ./python.nix ./tooling.nix ./engineering.nix ];
imports = [
./engineering.nix
./notes.nix
];
}

View File

@ -1,18 +1,14 @@
# CAD and 3d printing and everything nice
{ config, lib, pkgs, user, ... }:
let
cfg = config.modules.devel.engineering;
let cfg = config.modules.devel.engineering;
in {
options.modules.devel.engineering.enable = lib.mkEnableOption "engineering";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
prusa-slicer # Slicing software optimized for Prusa 3D printers, offering user-friendly interface and settings.
freecad # Open-source parametric 3D CAD modeler.
blender # Open-source 3D creation suite for modeling, animation, rendering, and more.
openscad
freecad # Open-source parametric 3D CAD modeler.
openscad # Open-source script-only based modeller.
prusa-slicer # Slicing software optimized for Prusa 3D printers, offering user-friendly interface and settings.
];
};
}

View File

@ -1,17 +1,12 @@
{ config, lib, pkgs, user, ... }:
let
cfg = config.modules.devel.notes;
let cfg = config.modules.devel.notes;
in {
options.modules.devel.notes.enable = lib.mkEnableOption "notes";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
pandoc # Universal document converter.
gollum # Wiki software that provides a simple, Git-based wiki engine.
obsidian # Note-taking and knowledge management application.
zk # Command-line tool for interacting with Apache ZooKeeper, a centralized service for distributed systems.
bat # Cat clone with syntax highlighting and Git integration.
fzf # Command-line fuzzy finder for Unix-like operating systems.
pandoc # Universal document converter.
];
};
}

View File

@ -1,25 +0,0 @@
# python with all the venom
{ config, lib, pkgs, user, ... }:
let
cfg = config.modules.devel.python;
my-python-packages = ps: with ps; [
virtualenv # Tool for creating isolated Python environments.
i3ipc # Python library for controlling i3 window manager via its IPC interface.
ipython # Interactive computing environment for Python.
pip # Package installer for Python.
];
in {
options.modules.devel.python.enable = lib.mkEnableOption "python";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
(python3.withPackages my-python-packages)
fava # Web interface for the double-entry bookkeeping software Beancount.
beancount # Double-entry bookkeeping software for tracking financial transactions.
pyright # Latest version of the Pyright package, a static type checker for Python.
];
};
}

View File

@ -1,21 +0,0 @@
# coding stuff for all the languages
{ config, lib, pkgs, user, ... }:
let
cfg = config.modules.devel.tooling;
in {
options.modules.devel.tooling.enable = lib.mkEnableOption "tooling";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
cmake # Cross-platform build system generator.
gcc # GNU Compiler Collection, a compiler system for programming languages.
coreutils # Collection of basic file, shell, and text manipulation utilities.
gnumake # GNU Make, a build automation tool.
go # Programming language developed by Google, known for its simplicity and efficiency.
nixpkgs-lint
nixpkgs-fmt
];
};
}

View File

@ -1,4 +1,8 @@
{ ... }:
{
imports = [ ./emulation.nix ./minecraft.nix ./steam.nix ];
imports = [
./emulation.nix
./minecraft.nix
./steam.nix
];
}

View File

@ -4,8 +4,6 @@ let cfg = config.modules.gaming.emulation;
in {
options.modules.gaming.emulation.enable = lib.mkEnableOption "emulation";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
ryujinx # Fuck Nintendo!
sudachi # Nintendo Switch emulator written in C++.
@ -24,6 +22,7 @@ in {
})
];
# Provide dumped keys for switch emulation
age.secrets."emu/switch/prod.keys" = {
file = ../../secrets/emu/switch/prod.keys.age;
owner = "${user}";

View File

@ -5,8 +5,8 @@ in {
options.modules.gaming.minecraft.enable = lib.mkEnableOption "minecraft";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
prismlauncher # Launcher for Prism, a web application framework.
jdk17 # Java Development Kit (JDK) version 17.
prismlauncher # Launcher for Prism, a web application framework.
];
};
}

View File

@ -4,22 +4,19 @@ let cfg = config.modules.gaming.steam;
in {
options.modules.gaming.steam.enable = lib.mkEnableOption "steam";
config = lib.mkIf cfg.enable {
hardware.graphics.enable = true; # this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932
# optionally enable 32bit pulseaudio support if pulseaudio is enabled
hardware.pulseaudio.support32Bit = config.hardware.pulseaudio.enable;
hardware.steam-hardware.enable = true;
# Digital distribution platform for purchasing and playing video games.
programs.steam = {
enable = true;
# Workaround from: https://github.com/NixOS/nixpkgs/issues/236561
package = with pkgs; steam.override { extraPkgs = pkgs: [ attr ]; };
};
environment.systemPackages = with pkgs; [
steamtinkerlaunch # Launcher and optimization tool for Steam games.
gamescope # Utility for running games using Valve's Steam Play compatibility layer with improved performance and compatibility.
mangohud
mangohud # Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more.
];
hardware.graphics.enable = true; # this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932
hardware.pulseaudio.support32Bit = config.hardware.pulseaudio.enable; # Enable 32bit pulseaudio support if pulseaudio is enabled
hardware.steam-hardware.enable = true;
programs.steam = {
enable = true;
package = with pkgs; steam.override { extraPkgs = pkgs: [ attr ]; }; # Workaround from: https://github.com/NixOS/nixpkgs/issues/236561
};
};
}

View File

@ -0,0 +1,12 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.programs.beancount;
in {
options.modules.programs.beancount.enable = lib.mkEnableOption "beancount";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
fava # Web interface for the double-entry bookkeeping software Beancount.
beancount # Double-entry bookkeeping software for tracking financial transactions.
];
};
}

View File

@ -1,11 +1,13 @@
{ ... }:
{
imports = [
./beancount.nix
./chrome
./firefox
./git.nix
./chezmoi.nix
./kitty.nix
./nvim.nix
./syncthing.nix
./yt-dlp.nix
];

View File

@ -0,0 +1,29 @@
{ config, lib, pkgs, user, home-manager, ... }:
let cfg = config.modules.programs.nvim;
in {
options.modules.programs.nvim = with lib; {
enable = lib.mkOption {
type = with types; bool;
default = true;
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
neovim # Fork of Vim aiming to improve extensibility and usability.
pyright # Latest version of the Pyright package, a static type checker for Python.
];
};
}

View File

@ -21,7 +21,6 @@ in {
unzip # Command-line utility for extracting files from ZIP archives.
trash-cli # Command-line interface to the freedesktop.org Trash.
vim # Text editor that is highly configurable and widely used, especially in the Unix environment.
neovim # Fork of Vim aiming to improve extensibility and usability.
nodejs # JavaScript runtime built on Chrome's V8 JavaScript engine.
ripgrep # Line-oriented search tool that recursively searches directories for a regex pattern.
cargo # Package manager and build system for Rust.