2024-07-08 15:02:54 +02:00
|
|
|
{ config, pkgs, lib, extendedLib, inputs, machineVars, ... } @ args: let
|
2022-11-19 16:14:18 +01:00
|
|
|
inherit (lib) mkForce mkIf optionals;
|
2022-08-19 14:50:03 +02:00
|
|
|
graphics = !machineVars.headless;
|
2022-04-03 18:03:55 +02:00
|
|
|
in {
|
2022-03-07 16:01:52 +01:00
|
|
|
imports = [
|
2023-07-29 12:36:44 +02:00
|
|
|
./shell.nix
|
2022-03-07 16:01:52 +01:00
|
|
|
./packages.nix
|
|
|
|
|
2022-08-19 12:53:48 +02:00
|
|
|
./config/xdg
|
2022-03-07 16:01:52 +01:00
|
|
|
|
2024-08-24 01:58:39 +02:00
|
|
|
./programs/aria2.nix
|
2023-05-08 01:48:38 +02:00
|
|
|
./programs/atuin.nix
|
2024-09-26 09:56:38 +02:00
|
|
|
./programs/beets.nix
|
2022-03-07 16:01:52 +01:00
|
|
|
./programs/comma.nix
|
2024-08-12 17:36:13 +02:00
|
|
|
./programs/direnv
|
2023-10-06 17:18:49 +02:00
|
|
|
./programs/gdb.nix
|
2022-03-07 16:01:52 +01:00
|
|
|
./programs/gh.nix
|
2024-09-26 09:56:38 +02:00
|
|
|
./programs/gh-dash.nix
|
2024-07-03 23:35:52 +02:00
|
|
|
./programs/git
|
2024-08-02 17:24:25 +02:00
|
|
|
./programs/gpg
|
2024-09-26 09:56:38 +02:00
|
|
|
./programs/jq.nix
|
2022-08-19 12:54:32 +02:00
|
|
|
./programs/less.nix
|
2024-08-12 17:36:15 +02:00
|
|
|
./programs/neovim
|
2024-08-02 17:39:59 +02:00
|
|
|
./programs/nix-index
|
2024-11-19 10:26:21 +01:00
|
|
|
./programs/pandoc.nix
|
|
|
|
./programs/ripgrep.nix
|
2024-08-13 10:19:48 +02:00
|
|
|
./programs/ssh
|
2024-08-12 17:36:14 +02:00
|
|
|
./programs/tealdeer
|
2024-09-26 09:56:38 +02:00
|
|
|
./programs/thunderbird.nix
|
2024-11-18 14:21:53 +01:00
|
|
|
./programs/tmux
|
2024-11-19 10:26:21 +01:00
|
|
|
./programs/yt-dlp.nix
|
2022-04-03 18:03:55 +02:00
|
|
|
./programs/zsh
|
|
|
|
|
2024-08-05 16:37:17 +02:00
|
|
|
./services/nix-channel-update.nix
|
2024-08-05 16:37:19 +02:00
|
|
|
./services/pueue.nix
|
2024-06-30 14:39:36 +02:00
|
|
|
|
2023-07-28 21:48:15 +02:00
|
|
|
./modules/colors.nix
|
2023-07-29 12:36:44 +02:00
|
|
|
./modules/shellAliases.nix
|
2024-11-13 17:04:21 +01:00
|
|
|
./modules/uidGid.nix
|
2022-04-03 18:03:55 +02:00
|
|
|
] ++ optionals graphics [
|
2022-08-19 12:53:48 +02:00
|
|
|
./config/gtk.nix
|
2022-04-03 18:03:55 +02:00
|
|
|
|
|
|
|
./programs/alacritty.nix
|
|
|
|
./programs/emacs
|
2024-06-26 20:23:24 +02:00
|
|
|
./programs/firefox.nix
|
|
|
|
./programs/ncmpcpp.nix
|
|
|
|
./programs/newsboat
|
2022-03-07 16:01:52 +01:00
|
|
|
./programs/qutebrowser.nix
|
|
|
|
./programs/rofi.nix
|
2024-06-26 20:23:24 +02:00
|
|
|
./programs/taskwarrior.nix
|
2024-08-12 17:36:13 +02:00
|
|
|
./programs/vscode
|
2024-06-26 20:23:41 +02:00
|
|
|
# ./programs/xmobar
|
2022-04-03 16:14:28 +02:00
|
|
|
./programs/xmonad
|
2022-03-07 16:01:52 +01:00
|
|
|
./programs/zathura.nix
|
2024-08-12 17:37:18 +02:00
|
|
|
./programs/zed
|
2022-03-07 16:01:52 +01:00
|
|
|
|
2024-08-05 14:09:02 +02:00
|
|
|
./services/copyq.nix
|
2022-03-07 16:01:52 +01:00
|
|
|
./services/dunst.nix
|
2024-06-25 18:51:18 +02:00
|
|
|
./services/fcitx5.nix
|
2024-11-19 10:26:21 +01:00
|
|
|
./services/keybase.nix
|
2022-03-07 16:01:52 +01:00
|
|
|
./services/mpd.nix
|
|
|
|
./services/picom.nix
|
2022-08-19 01:54:13 +02:00
|
|
|
./services/polybar.nix
|
2024-06-08 12:42:12 +02:00
|
|
|
./services/screen-locker.nix
|
2024-06-26 20:23:41 +02:00
|
|
|
# ./services/stalonetray.nix
|
2022-03-07 16:01:52 +01:00
|
|
|
./services/sxhkd.nix
|
2024-08-05 16:37:17 +02:00
|
|
|
./services/tumblerd.nix
|
2022-03-07 16:01:52 +01:00
|
|
|
];
|
|
|
|
|
2024-07-08 15:02:54 +02:00
|
|
|
sops.defaultSopsFile = ../secrets/home.yaml;
|
|
|
|
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519_home_sops" ];
|
2024-06-25 20:10:58 +02:00
|
|
|
|
|
|
|
sops.secrets."nix/access-tokens" = {
|
|
|
|
sopsFile = ../secrets/common.yaml;
|
|
|
|
};
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
settings.use-xdg-base-directories = true;
|
|
|
|
extraOptions = ''
|
|
|
|
!include ${config.sops.secrets."nix/access-tokens".path}
|
|
|
|
'';
|
2024-06-08 12:37:01 +02:00
|
|
|
};
|
|
|
|
|
2022-03-07 16:01:52 +01:00
|
|
|
home = {
|
|
|
|
username = "h7x4";
|
|
|
|
homeDirectory = "/home/h7x4";
|
2022-06-02 16:39:12 +02:00
|
|
|
|
2024-06-08 12:37:01 +02:00
|
|
|
sessionPath = [
|
|
|
|
"$HOME/.local/bin"
|
|
|
|
];
|
2022-11-11 21:23:25 +01:00
|
|
|
|
2024-06-29 12:38:54 +02:00
|
|
|
# TODO: fix overriding home.file in home-manager
|
|
|
|
# file = mkIf graphics {
|
|
|
|
# ".icons/default/index.theme".source = lib.mkForce null;
|
|
|
|
# ".icons/default/${config.home.pointerCursor.name}.theme".source = lib.mkForce null;
|
|
|
|
# };
|
|
|
|
|
2022-06-02 16:39:12 +02:00
|
|
|
pointerCursor = mkIf graphics {
|
|
|
|
package = pkgs.capitaine-cursors;
|
|
|
|
name = "capitaine-cursors";
|
|
|
|
size = 16;
|
|
|
|
};
|
2024-01-23 08:53:47 +01:00
|
|
|
|
|
|
|
keyboard.options = [ "caps:escape" ];
|
2024-06-08 12:37:01 +02:00
|
|
|
|
|
|
|
sessionVariables = {
|
2024-06-26 20:26:51 +02:00
|
|
|
CARGO_NET_GIT_FETCH_WITH_CLI = "true";
|
2024-06-08 12:37:01 +02:00
|
|
|
PYTHONSTARTUP = "${config.xdg.configHome}/python/pyrc";
|
2024-09-04 10:28:54 +02:00
|
|
|
_JAVA_AWT_WM_NONREPARENTING = "1";
|
2024-06-08 12:37:01 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-09-26 09:58:09 +02:00
|
|
|
xsession = {
|
|
|
|
enable = true;
|
|
|
|
# TODO: declare using xdg config home
|
|
|
|
scriptPath = ".config/X11/xsession";
|
|
|
|
profilePath = ".config/X11/xprofile";
|
|
|
|
};
|
|
|
|
|
2024-06-08 12:37:01 +02:00
|
|
|
xdg.configFile = {
|
|
|
|
"ghc/ghci.conf".text = ''
|
|
|
|
:set prompt "${extendedLib.termColors.front.magenta "[GHCi]λ"} "
|
|
|
|
'';
|
|
|
|
|
|
|
|
"python/pyrc".text = ''
|
|
|
|
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
|
|
|
|
|
|
# You also need \x01 and \x02 to separate escape sequence, due to:
|
|
|
|
# https://stackoverflow.com/a/9468954/1147688
|
|
|
|
sys.ps1='\x01\x1b${extendedLib.termColors.front.blue "[Python]> "}\x02>>>\x01\x1b[0m\x02 ' # bright yellow
|
|
|
|
sys.ps2='\x01\x1b[1;49;31m\x02...\x01\x1b[0m\x02 ' # bright red
|
|
|
|
'';
|
2022-03-07 16:01:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
news.display = "silent";
|
|
|
|
|
2022-04-03 18:03:55 +02:00
|
|
|
fonts.fontconfig.enable = mkForce true;
|
2022-03-07 16:01:52 +01:00
|
|
|
|
|
|
|
programs = {
|
|
|
|
home-manager.enable = true;
|
2024-06-08 12:37:01 +02:00
|
|
|
|
|
|
|
bash = {
|
|
|
|
enable = true;
|
|
|
|
historyFile = "${config.xdg.dataHome}/bash_history";
|
|
|
|
historySize = 100000;
|
2024-07-18 15:13:00 +02:00
|
|
|
bashrcExtra = ''
|
|
|
|
source "${config.xdg.configHome}/mutable_env.sh"
|
|
|
|
'';
|
2024-06-08 12:37:01 +02:00
|
|
|
};
|
2022-03-07 16:01:52 +01:00
|
|
|
|
|
|
|
bat.enable = true;
|
2024-06-08 12:42:36 +02:00
|
|
|
bottom = {
|
|
|
|
enable = true;
|
|
|
|
settings.flags.enable_gpu = true;
|
|
|
|
};
|
2023-12-18 20:59:48 +01:00
|
|
|
eza.enable = true;
|
2022-04-03 18:03:55 +02:00
|
|
|
feh.enable = mkIf graphics true;
|
2022-03-07 16:01:52 +01:00
|
|
|
fzf = {
|
|
|
|
enable = true;
|
|
|
|
defaultCommand = "fd --type f";
|
|
|
|
};
|
|
|
|
man = {
|
|
|
|
enable = true;
|
|
|
|
generateCaches = true;
|
|
|
|
};
|
2022-04-03 18:03:55 +02:00
|
|
|
mpv.enable = mkIf graphics true;
|
|
|
|
obs-studio.enable = mkIf graphics true;
|
2022-11-11 21:23:25 +01:00
|
|
|
ssh = {
|
|
|
|
enable = true;
|
|
|
|
includes = [ "mutable_config" ];
|
|
|
|
};
|
2022-03-07 16:01:52 +01:00
|
|
|
texlive = {
|
|
|
|
enable = true;
|
|
|
|
# packageSet = pkgs.texlive.combined.scheme-medium;
|
|
|
|
};
|
|
|
|
zoxide.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
2022-04-03 18:03:55 +02:00
|
|
|
gnome-keyring.enable = mkIf graphics true;
|
|
|
|
network-manager-applet.enable = mkIf graphics true;
|
2022-03-07 16:01:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
manual = {
|
|
|
|
html.enable = true;
|
|
|
|
manpages.enable = true;
|
|
|
|
json.enable = true;
|
|
|
|
};
|
|
|
|
|
2022-04-03 18:03:55 +02:00
|
|
|
qt = mkIf graphics {
|
2022-03-07 16:01:52 +01:00
|
|
|
enable = true;
|
2024-09-26 09:58:24 +02:00
|
|
|
platformTheme.name = "adwaita";
|
|
|
|
style.name = "adwaita-dark";
|
2022-03-07 16:01:52 +01:00
|
|
|
};
|
|
|
|
}
|