Clean up the files

This commit is contained in:
Gabriel Arazas 2022-02-02 12:25:03 +08:00
parent 4aaf393a81
commit 905b5680b1
7 changed files with 109 additions and 17 deletions

View File

@ -63,7 +63,7 @@
forAllSystems = f:
nixpkgs.lib.genAttrs inputs.flake-utils.lib.defaultSystems
(system: f system);
(system: f system);
libExtended = nixpkgs.lib.extend (final: prev:
(import ./lib { lib = final; }) // {
@ -75,6 +75,9 @@
# The default configuration for our NixOS systems.
hostDefaultConfig = {
# Default architecture.
system = "x86_64-linux";
# I want to capture the usual flakes to its exact version so we're
# making them available to our system. This will also prevent the
# annoying downloads since it always get the latest revision.
@ -91,12 +94,12 @@
};
# Set several binary caches.
nix = {
binaryCaches = [
nix.settings = {
substituters = [
"https://nix-community.cachix.org"
"https://foo-dogsquared.cachix.org"
];
binaryCachePublicKeys = [
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"foo-dogsquared.cachix.org-1:/2fmqn/gLGvCs5EDeQmqwtus02TUmGy0ZlAEXqRE70E="
];
@ -107,10 +110,8 @@
# Extend nixpkgs with our overlays except for the NixOS-focused modules
# here.
nixpkgs.overlays = overlays ++ [
inputs.nix-alien.overlay
inputs.guix-overlay.overlay
];
nixpkgs.overlays = overlays
++ [ inputs.nix-alien.overlay inputs.guix-overlay.overlay ];
# Please clean your temporary crap.
boot.cleanTmpDir = true;
@ -151,8 +152,7 @@
};
}];
};
in
{
in {
# Exposes only my library with the custom functions to make it easier to
# include in other flakes.
lib = import ./lib { lib = nixpkgs.lib; };
@ -181,7 +181,9 @@
# My custom packages, available in here as well. Though, I mainly support
# "x86_64-linux". I just want to try out supporting other systems.
packages = forAllSystems (system:
import ./pkgs { pkgs = import nixpkgs { inherit system overlays; }; });
inputs.flake-utils.lib.flattenTree (import ./pkgs {
pkgs = import nixpkgs { inherit system overlays; };
}));
# The development environment for this flake.
devShell = forAllSystems (system:

View File

@ -27,7 +27,7 @@
neovim.enable = true;
};
users.users.foo-dogsquared.settings = {
extraGroups = [ "wheel" "audio" "docker" "podman" "network-manager" ];
extraGroups = [ "wheel" "audio" "docker" "podman" "networkmanager" ];
hashedPassword =
"$6$.cMYto0K0CHbpIMT$dRqyKs4q1ppzmTpdzy5FWP/V832a6X..FwM8CJ30ivK0nfLjQ7DubctxOZbeOtygfjcUd1PZ0nQoQpOg/WMvg.";
isNormalUser = true;
@ -41,6 +41,10 @@
themes.a-happy-gnome.enable = true;
};
environment.systemPackages = with pkgs; [
guile_3_0
];
# Enable Guix service.
services.guix-binary.enable = true;

View File

@ -39,6 +39,7 @@ in {
carla # The Carla Carla.
];
# This is assuming you're using Pipewire, yes?
services.easyeffects.enable = true;
services.fluidsynth = {
enable = true;

View File

@ -9,6 +9,7 @@ in {
lib.mkEnableOption "foo-dogsquared's user-specific development setup";
shell.enable =
lib.mkEnableOption "configuration of foo-dogsquared's shell of choice";
extras.enable = lib.mkEnableOption "additional tools for development stuff";
};
config = lib.mkIf cfg.enable (lib.mkMerge [
@ -37,10 +38,19 @@ in {
nix-direnv.enable = true;
};
programs.zoxide.enable = true;
# Enable Starship prompt.
programs.starship = {
enable = true;
settings = { add_newline = false; };
};
})
(lib.mkIf cfg.extras.enable {
home.packages = with pkgs; [
tree-sitter # The modern way of text highlighting.
hyperfine # Command-line profiling.
];
})
]);
}

View File

@ -28,7 +28,9 @@ in {
(lib.mkIf cfg.emacs.enable {
# Doom Emacs dependencies.
home.packages = with pkgs; [
emacs
((emacsPackagesFor emacs).emacsWithPackages (epkgs: [
epkgs.vterm
]))
# Required dependencies.
ripgrep

View File

@ -20,6 +20,7 @@ in {
description =
"Whether to enable persistence for the cleanup, allowing it to activate the next time it boots when missed.";
default = true;
defaultText = "true";
example = false;
};
@ -97,7 +98,7 @@ in {
PartOf = [ "default.target" ];
};
Install.WantedBy = [ "default.target" ];
Install.WantedBy = [ "timers.target" ];
Timer = {
OnCalendar = cfg.startAt;

View File

@ -1,12 +1,36 @@
{ config, options, lib, pkgs, ... }:
{
let
yt-dlp-for-audio-config = pkgs.writeText "yt-dlp-for-audio-config" ''
# Don't overwrite for cautious individuals.
--no-overwrite
# To make sure all audio-related.
--extract-audio
--format bestaudio
--audio-format opus
--output '%(track_number,playlist_autonumber)d-%(track,title)s.%(ext)s'
--download-archive archive
# Add all sorts of metadata.
--embed-thumbnail
--add-metadata
'';
yt-dlp-for-audio = pkgs.writeScriptBin "yt-dlp-audio" ''
${pkgs.yt-dlp}/bin/yt-dlp --config-location "${yt-dlp-for-audio-config}" $@
'';
in {
programs.home-manager.enable = true;
home.packages = with pkgs; [
neovim
borgmatic
borgbackup
ncmpcpp
vscodium-fhs
tree-sitter
yt-dlp-for-audio
];
fonts.fontconfig.enable = true;
@ -24,11 +48,44 @@
services.mopidy = {
enable = true;
extensionPackages = with pkgs; [
mopidy-beets
mopidy-funkwhale
mopidy-internetarchive
mopidy-iris
mopidy-local
mopidy-mpd
mopidy-mpris
mopidy-local
mopidy-spotify
mopidy-youtube
];
configuration = {
http = {
hostname = "0.0.0.0";
};
file = {
enabled = true;
media_dirs = [
"$XDG_MUSIC_DIR|Music"
];
};
internetarchive = {
enabled = true;
browse_limit = 150;
search_limit = 150;
collections = [
"fav-foo-dogsquared"
"audio"
"etree"
"audio_music"
"audio_foreign"
];
};
};
};
services.recoll = {
enable = true;
settings = {
@ -70,11 +127,26 @@
bleachbit.enable = true;
};
# WHOA! Even browsers with extensions can be declarative!
programs.brave = {
enable = true;
extensions = [
{ id = "dbepggeogbaibhgnhhndojpepiihcmeb"; } # Vimium
{ id = "ekhagklcjbdpajgpjgmbionohlpdbjgc"; } # Zotero connector
{ id = "jfnifeihccihocjbfcfhicmmgpjicaec"; } # GSConnect
{ id = "aapbdbdomjkkjkaonfhkkikfgjllcleb"; } # Google Translate (yes, I'm disappointed in myself)
{ id = "egpjdkipkomnmjhjmdamaniclmdlobbo"; } # Firenvim
{ id = "gknkbkaapnhpmkcgkmdekdffgcddoiel"; } # Open Access Button
{ id = "fpnmgdkabkmnadcjpehmlllkndpkmiak"; } # Wayback Machine
];
};
xdg.userDirs = {
enable = true;
createDirectories = true;
# The XDG base directories.
# The XDG base directories. Most of my setup with this user will be my
# personal computer so I'll set them like so...
documents = "$HOME/library/documents";
music = "$HOME/library/music";
pictures = "$HOME/library/pictures";