2023-08-21 02:24:55 +02:00
|
|
|
{ lib, pkgs, config, ... }:
|
2024-02-27 02:54:02 +01:00
|
|
|
with lib; {
|
2023-08-21 02:24:55 +02:00
|
|
|
imports = [
|
2024-03-18 22:53:37 +01:00
|
|
|
./../programs/atuin.nix
|
2023-08-21 02:24:55 +02:00
|
|
|
./../programs/alacritty.nix
|
|
|
|
./../programs/bat.nix
|
|
|
|
./../programs/beets.nix
|
|
|
|
./../programs/command-not-found.nix
|
|
|
|
./../programs/dircolors.nix
|
|
|
|
./../programs/direnv.nix
|
|
|
|
./../programs/fzf.nix
|
|
|
|
./../programs/git.nix
|
|
|
|
./../programs/htop.nix
|
|
|
|
./../programs/neovim.nix
|
|
|
|
./../programs/starship.nix
|
|
|
|
./../programs/topgrade.nix
|
|
|
|
./../programs/yt-dlp.nix
|
|
|
|
./../programs/zsh.nix
|
|
|
|
./../programs/go.nix
|
2023-11-13 17:54:16 +01:00
|
|
|
./../programs/firefox.nix
|
2023-11-13 18:46:14 +01:00
|
|
|
./../programs/chromium.nix
|
2023-11-13 20:04:20 +01:00
|
|
|
./../programs/mpv.nix
|
2024-02-17 02:10:58 +01:00
|
|
|
./../programs/syncthing.nix
|
2024-02-18 23:04:50 +01:00
|
|
|
./../programs/hstr.nix
|
2024-03-18 22:53:37 +01:00
|
|
|
./../programs/thefuck.nix
|
2024-02-13 00:08:01 +01:00
|
|
|
./../../nix.nix
|
2023-08-21 02:24:55 +02:00
|
|
|
./packages.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
machine = {
|
|
|
|
username = mkOption {
|
|
|
|
type = types.str;
|
|
|
|
default = "thilo";
|
|
|
|
description = "The username of the user";
|
|
|
|
};
|
|
|
|
isGeneric = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = "Whether the system is generic or not";
|
|
|
|
};
|
|
|
|
isGraphical = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = "Whether the system is graphical or not";
|
|
|
|
};
|
|
|
|
isGnome = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = "Whether the system is gnome or not";
|
|
|
|
};
|
|
|
|
noiseSuppression.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = "Whether to enable noise suppression or not";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
news.display = "silent";
|
|
|
|
targets.genericLinux.enable = config.machine.isGeneric;
|
|
|
|
|
|
|
|
home = {
|
|
|
|
username = "${config.machine.username}";
|
|
|
|
homeDirectory = "/home/${config.machine.username}";
|
|
|
|
stateVersion = "22.11";
|
|
|
|
file = {
|
|
|
|
".config/nano/nanorc".text = ''
|
|
|
|
set linenumbers
|
|
|
|
include "/usr/share/nano/*.nanorc"
|
|
|
|
'';
|
2024-01-09 00:51:13 +01:00
|
|
|
".ssh/config_source" = {
|
2024-02-27 02:54:02 +01:00
|
|
|
source = ./../dotfiles/ssh-config;
|
|
|
|
onChange =
|
|
|
|
"cat ~/.ssh/config_source > ~/.ssh/config && chmod 600 ~/.ssh/config";
|
2024-01-09 00:51:13 +01:00
|
|
|
};
|
2023-08-21 02:24:55 +02:00
|
|
|
".gitignore".source = ./../dotfiles/.gitignore;
|
|
|
|
".config/pipewire/pipewire.conf.d/99-noise-suppression.conf".text = ''
|
|
|
|
context.modules = [{
|
|
|
|
name = libpipewire-module-filter-chain
|
|
|
|
args = {
|
|
|
|
node.description = "Noise Canceling source"
|
|
|
|
media.name = "Noise Canceling source"
|
|
|
|
filter.graph = {
|
|
|
|
nodes = [{
|
|
|
|
type = ladspa
|
|
|
|
name = rnnoise
|
|
|
|
plugin = ${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so
|
|
|
|
label = noise_suppressor_stereo
|
|
|
|
control = {
|
|
|
|
"VAD Threshold (%)" 50.0
|
|
|
|
"VAD Grace Period (ms)" 200
|
|
|
|
"Retroactive VAD Grace (ms)" 0
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
capture.props = {
|
|
|
|
node.name = "capture.rnnoise_source"
|
|
|
|
node.passive = true
|
|
|
|
audio.rate = 48000
|
|
|
|
}
|
|
|
|
playback.props = {
|
|
|
|
node.name = "rnnoise_source"
|
|
|
|
media.class = Audio/Source
|
|
|
|
audio.rate = 48000
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
activation = {
|
|
|
|
setNodeGlobalDir = {
|
|
|
|
after = [ "writeBoundary" "createXdgUserDirectories" ];
|
|
|
|
before = [ ];
|
|
|
|
data = ''
|
|
|
|
mkdir -p ${config.home.homeDirectory}/.node-global
|
|
|
|
${pkgs.nodejs}/bin/npm config set prefix ${config.home.homeDirectory}/.node-global
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
} // mkIf config.machine.isGeneric {
|
|
|
|
linkDesktopApplications = {
|
|
|
|
after = [ "writeBoundary" "createXdgUserDirectories" ];
|
|
|
|
before = [ ];
|
|
|
|
data = ''
|
|
|
|
for dir in ${config.home.homeDirectory}/.nix-profile/share/applications/*; do
|
|
|
|
chmod +x $(realpath $dir) -v
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
sessionPath = [ "${config.home.homeDirectory}/.node-global/bin" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.home-manager.enable = true;
|
|
|
|
|
|
|
|
gtk = {
|
|
|
|
enable = config.machine.isGnome;
|
|
|
|
theme = {
|
|
|
|
name = "adw-gtk3-dark";
|
|
|
|
package = pkgs.adw-gtk3;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
2023-10-28 22:49:07 +02:00
|
|
|
|