refactor homeModules
This commit is contained in:
parent
0603a85579
commit
4a870d4a18
26 changed files with 126 additions and 65 deletions
15
homeModules/chat.nix
Normal file
15
homeModules/chat.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
self,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
self.homeModules.dotfiles
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [ senpai ];
|
||||
|
||||
xdg.configFile."senpai".source = "${config.dotfiles.path}/.config/senpai";
|
||||
}
|
||||
99
homeModules/cli.nix
Normal file
99
homeModules/cli.nix
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
self,
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
shellAliases = {
|
||||
ls = "eza";
|
||||
lsa = "ls -A";
|
||||
ll = "ls -lh";
|
||||
lla = "ls -lAh";
|
||||
h = "hx";
|
||||
g = "git";
|
||||
cd = "z";
|
||||
tree = "eza --tree";
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
self.homeModules.dotfiles
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
age
|
||||
age-plugin-yubikey
|
||||
bottom
|
||||
btop
|
||||
comma
|
||||
difftastic
|
||||
doggo
|
||||
duf
|
||||
eza
|
||||
fd
|
||||
glow
|
||||
jjui
|
||||
lazygit
|
||||
nh
|
||||
passage
|
||||
rage
|
||||
ripgrep
|
||||
skim
|
||||
tealdeer
|
||||
vivid
|
||||
yazi
|
||||
zoxide
|
||||
];
|
||||
|
||||
programs.zoxide.enable = true;
|
||||
programs.starship.enable = true;
|
||||
programs.bat.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
inherit shellAliases;
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
inherit shellAliases;
|
||||
};
|
||||
|
||||
programs.zellij.enable = true;
|
||||
|
||||
# programs.khal = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
# accounts.calendar.basePath = ".calendar";
|
||||
|
||||
# programs.pimsync.enable = true;
|
||||
|
||||
# accounts.calendar.accounts.personal = {
|
||||
# pimsync.enable = true;
|
||||
# khal.enable = true;
|
||||
# thunderbird.enable = true;
|
||||
# remote = {
|
||||
# url = "https://cloud.rpqt.fr/remote.php/dav/calendars/rpqt/personal/";
|
||||
|
||||
# type = "caldav";
|
||||
# userName = "rpqt@rpqt.fr";
|
||||
# passwordCommand = [
|
||||
# "sh"
|
||||
# "-c"
|
||||
# "passage web/cloud.rpqt.fr | head -n 1"
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
|
||||
xdg.configFile."git".source = "${config.dotfiles.path}/.config/git";
|
||||
xdg.configFile."jj/config.toml".source = "${config.dotfiles.path}/.config/jj/config.toml";
|
||||
xdg.configFile."task/taskrc".source = "${config.dotfiles.path}/.config/task/taskrc";
|
||||
|
||||
home.sessionPath = [ "${config.dotfiles.path}/bin" ];
|
||||
}
|
||||
16
homeModules/common.nix
Normal file
16
homeModules/common.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
home.username = "rpqt";
|
||||
home.homeDirectory = "/home/rpqt";
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
# Let Home Manager install and manage itself
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
33
homeModules/desktop/default.nix
Normal file
33
homeModules/desktop/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./fonts.nix
|
||||
./pass.nix
|
||||
./terminal.nix
|
||||
./wayland.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
discord
|
||||
seahorse
|
||||
];
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 24;
|
||||
};
|
||||
|
||||
gtk.enable = true;
|
||||
gtk.iconTheme = {
|
||||
name = "WhiteSur";
|
||||
package = pkgs.whitesur-icon-theme.override {
|
||||
alternativeIcons = true;
|
||||
boldPanelIcons = true;
|
||||
};
|
||||
};
|
||||
|
||||
qt.enable = true;
|
||||
qt.platformTheme.name = "gtk";
|
||||
}
|
||||
7
homeModules/desktop/fonts.nix
Normal file
7
homeModules/desktop/fonts.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.nerd-fonts.jetbrains-mono
|
||||
pkgs.noto-fonts-color-emoji
|
||||
];
|
||||
}
|
||||
20
homeModules/desktop/pass.nix
Normal file
20
homeModules/desktop/pass.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
pass-alias = pkgs.writeShellScriptBin "pass" ''
|
||||
exec ${pkgs.passage}/bin/passage "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
# pkgs.pass
|
||||
pass-alias
|
||||
pkgs.gnupg
|
||||
pkgs.pinentry-gnome3
|
||||
];
|
||||
|
||||
# programs.gpg.enable = true;
|
||||
services.gpg-agent = {
|
||||
enable = false;
|
||||
pinentry.package = pkgs.pinentry-gnome3;
|
||||
};
|
||||
}
|
||||
21
homeModules/desktop/terminal.nix
Normal file
21
homeModules/desktop/terminal.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
self.homeModules.dotfiles
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
pkgs.alacritty
|
||||
pkgs.ghostty
|
||||
];
|
||||
|
||||
programs.alacritty.enable = true;
|
||||
xdg.configFile."alacritty".source = "${config.dotfiles.path}/.config/alacritty";
|
||||
|
||||
xdg.configFile."ghostty/config".source = "${config.dotfiles.path}/.config/ghostty/config";
|
||||
}
|
||||
6
homeModules/desktop/wayland.nix
Normal file
6
homeModules/desktop/wayland.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
];
|
||||
}
|
||||
46
homeModules/dev.nix
Normal file
46
homeModules/dev.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
self,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./cli.nix
|
||||
./helix.nix
|
||||
self.homeModules.dotfiles
|
||||
self.inputs.direnv-instant.homeModules.direnv-instant
|
||||
self.homeModules.atuin-config
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
delta
|
||||
direnv
|
||||
gh
|
||||
hut
|
||||
jujutsu
|
||||
nix-output-monitor
|
||||
python3
|
||||
radicle-desktop
|
||||
radicle-node
|
||||
radicle-tui
|
||||
typescript-language-server
|
||||
nil # Nix language server
|
||||
nixd
|
||||
nixfmt
|
||||
nixpkgs-review
|
||||
];
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.direnv-instant.enable = true;
|
||||
|
||||
xdg.configFile."direnv/direnv.toml".source = "${config.dotfiles.path}/.config/direnv/direnv.toml";
|
||||
|
||||
xdg.configFile."hut/config".source = "${config.dotfiles.path}/.config/hut/config";
|
||||
home.file.".ssh/config".source = "${config.dotfiles.path}/.ssh/config";
|
||||
}
|
||||
14
homeModules/dotfiles.nix
Normal file
14
homeModules/dotfiles.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options = {
|
||||
dotfiles = {
|
||||
path = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
apply = toString;
|
||||
default = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/rep/flocon/home";
|
||||
example = "${config.home.homeDirectory}/.dotfiles";
|
||||
description = "Location of the dotfiles working copy";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
27
homeModules/flake-module.nix
Normal file
27
homeModules/flake-module.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
flake.homeModules =
|
||||
(builtins.readDir ./.)
|
||||
|> lib.filterAttrs (
|
||||
path: type:
|
||||
(type == "directory" && lib.filesystem.pathIsRegularFile (./${path}/default.nix))
|
||||
|| (type == "regular" && (lib.hasSuffix ".nix" path))
|
||||
)
|
||||
|> lib.mapAttrs' (
|
||||
path: type:
|
||||
if type == "directory" then
|
||||
{
|
||||
name = path;
|
||||
value = {
|
||||
imports = [ ./${path} ];
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
name = lib.removeSuffix ".nix" path;
|
||||
value = {
|
||||
imports = [ ./${path} ];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
13
homeModules/gnome.nix
Normal file
13
homeModules/gnome.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs.gnomeExtensions; [
|
||||
blur-my-shell
|
||||
paperwm
|
||||
];
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/nautilus/preferences" = {
|
||||
show-image-thumbnails = "always";
|
||||
};
|
||||
};
|
||||
}
|
||||
24
homeModules/helix.nix
Normal file
24
homeModules/helix.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
self,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
self.homeModules.dotfiles
|
||||
];
|
||||
|
||||
home.packages = [ pkgs.helix ];
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
home.sessionVariables.EDITOR = "hx";
|
||||
|
||||
xdg.configFile."helix/config.toml".source = "${config.dotfiles.path}/.config/helix/config.toml";
|
||||
xdg.configFile."helix/languages.toml".source =
|
||||
"${config.dotfiles.path}/.config/helix/languages.toml";
|
||||
}
|
||||
110
homeModules/mail/default.nix
Normal file
110
homeModules/mail/default.nix
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
pass = "passage";
|
||||
in
|
||||
{
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
main = {
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.aerc = {
|
||||
enable = true;
|
||||
# safe since the accounts file just contains commands for retrieving passwords and is readonly in the nix store
|
||||
extraConfig.general.unsafe-accounts-conf = true;
|
||||
};
|
||||
|
||||
accounts.email.accounts = {
|
||||
"rpqt@rpqt.fr" = rec {
|
||||
address = "rpqt@rpqt.fr";
|
||||
realName = "Romain Paquet";
|
||||
primary = true;
|
||||
flavor = "migadu.com";
|
||||
thunderbird.enable = config.programs.thunderbird.enable;
|
||||
aerc.enable = config.programs.aerc.enable;
|
||||
passwordCommand = [
|
||||
pass
|
||||
"show"
|
||||
"mail/${address}"
|
||||
];
|
||||
folders.inbox = "INBOX";
|
||||
};
|
||||
|
||||
"admin@rpqt.fr" = rec {
|
||||
address = "admin@rpqt.fr";
|
||||
aliases = [ "postmaster@rpqt.fr" ];
|
||||
realName = "Postmaster";
|
||||
flavor = "migadu.com";
|
||||
thunderbird.enable = config.programs.thunderbird.enable;
|
||||
aerc.enable = config.programs.aerc.enable;
|
||||
passwordCommand = [
|
||||
pass
|
||||
"show"
|
||||
"mail/${address}"
|
||||
];
|
||||
folders.inbox = "INBOX";
|
||||
};
|
||||
|
||||
"romain.paquet@grenoble-inp.org" = rec {
|
||||
address = "romain.paquet@grenoble-inp.org";
|
||||
realName = "Romain Paquet";
|
||||
userName = "romain.paquet@grenoble-inp.org";
|
||||
imap = {
|
||||
host = "imap.partage.renater.fr";
|
||||
port = 993;
|
||||
};
|
||||
smtp = {
|
||||
host = "smtp.partage.renater.fr";
|
||||
port = 465;
|
||||
};
|
||||
thunderbird.enable = config.programs.thunderbird.enable;
|
||||
aerc.enable = config.programs.aerc.enable;
|
||||
passwordCommand = [
|
||||
pass
|
||||
"show"
|
||||
"mail/${address}"
|
||||
];
|
||||
folders.inbox = "INBOX";
|
||||
};
|
||||
|
||||
"admin@turifer.dev" = rec {
|
||||
address = "admin@turifer.dev";
|
||||
aliases = [ "postmaster@turifer.dev" ];
|
||||
realName = "Postmaster";
|
||||
flavor = "migadu.com";
|
||||
thunderbird.enable = config.programs.thunderbird.enable;
|
||||
aerc.enable = config.programs.aerc.enable;
|
||||
passwordCommand = [
|
||||
pass
|
||||
"mail/${address}"
|
||||
];
|
||||
};
|
||||
|
||||
"romain@student.agh.edu.pl" = {
|
||||
address = "romain@student.agh.edu.pl";
|
||||
aliases = [ "382799@student.agh.edu.pl" ];
|
||||
realName = "Romain Paquet";
|
||||
userName = "romain@student.agh.edu.pl";
|
||||
imap = {
|
||||
host = "poczta.agh.edu.pl";
|
||||
port = 993;
|
||||
};
|
||||
smtp = {
|
||||
host = "poczta.agh.edu.pl";
|
||||
port = 465;
|
||||
};
|
||||
thunderbird.enable = config.programs.thunderbird.enable;
|
||||
};
|
||||
|
||||
"romain.pqt@gmail.com" = {
|
||||
address = "romain.pqt@gmail.com";
|
||||
realName = "Romain Paquet";
|
||||
flavor = "gmail.com";
|
||||
thunderbird.enable = config.programs.thunderbird.enable;
|
||||
};
|
||||
};
|
||||
}
|
||||
7
homeModules/minecraft.nix
Normal file
7
homeModules/minecraft.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.hmcl
|
||||
pkgs.openjdk21
|
||||
];
|
||||
}
|
||||
8
homeModules/niri.nix
Normal file
8
homeModules/niri.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ self, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
self.homeModules.dotfiles
|
||||
];
|
||||
|
||||
xdg.configFile."niri".source = "${config.dotfiles.path}/.config/niri";
|
||||
}
|
||||
19
homeModules/vicinae.nix
Normal file
19
homeModules/vicinae.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.vicinae = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
systemd.autoStart = true;
|
||||
};
|
||||
|
||||
xdg.configFile."vicinae/vicinae.json".source =
|
||||
lib.mkForce "${config.dotfiles.path}/.config/vicinae/vicinae.json";
|
||||
|
||||
xdg.configFile."matugen/config.toml".source = "${config.dotfiles.path}/.config/matugen/config.toml";
|
||||
xdg.configFile."matugen/templates/vicinae.toml".source =
|
||||
"${config.dotfiles.path}/.config/matugen/templates/vicinae.toml";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue