move home-manager to a module, move programs to a separate file

This commit is contained in:
jacekpoz 2024-02-14 15:29:00 +01:00
parent a2891699f4
commit 01a5b312b9
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C
5 changed files with 253 additions and 1 deletions

View file

@ -367,6 +367,12 @@
programs.noisetorch.enable = true;
myOptions = {
other = {
home-manager = {
enable = true;
enableDirenv = true;
};
};
programs = {
git = {
enable = true;

View file

@ -3,8 +3,8 @@ _: {
./configuration.nix
./fcitx5.nix
./hardware-configuration.nix
./home-manager.nix
#./mullvad.nix
./programs.nix
#./restic.nix
./waydroid.nix
];

207
hosts/niks/programs.nix Normal file
View file

@ -0,0 +1,207 @@
{
config',
inputs,
pkgs,
...
}: {
home-manager.users.${config'.username} = {
home.packages = let
hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system};
shadower = inputs.shadower.packages.${pkgs.system};
fenix = inputs.fenix.packages.${pkgs.system};
nixpkgs-wayland = inputs.nixpkgs-wayland.packages.${pkgs.system};
agenix = inputs.agenix.packages.${pkgs.system};
nh = inputs.nh.packages.${pkgs.system};
in with pkgs; [
git
librewolf-wayland
keepassxc
eza
ripgrep
libnotify
rofi-wayland
rofi-calc
session-desktop
signal-desktop-beta
element-desktop
obs-studio
heroic
steam
ungoogled-chromium
amdgpu_top
tor-browser-bundle-bin
mullvad-browser
thunderbird
telegram-desktop
#livecaptions
gimp
helvum
ddccontrol
ddccontrol-db
bluez
blueman
easyeffects
lbry
libreoffice-fresh
minetest
airshipper
onionshare-gui
prismlauncher
qbittorrent
ventoy-full
zellij
nodejs
unzip
cmake
gcc
nixpkgs-wayland.sway-unwrapped
caprine-bin
libsForQt5.kdenlive
telegram-desktop
waypipe
trash-cli
bibata-cursors
nixpkgs-wayland.swww
opentabletdriver
networkmanagerapplet
nixpkgs-wayland.wl-clipboard
nixpkgs-wayland.wlsunset
xdg-utils
hyprpicker
hyprcontrib.hyprprop
hyprcontrib.grimblast
shadower.shadower
pamixer
brightnessctl
dig
swappy
nixpkgs-wayland.imv
pcmanfm
xdg-ninja
auto-cpufreq
gnupg
pinentry-qt
age
rage
fd
udisks
ffmpeg_6-full
ghc
ghcid
cabal-install
yt-dlp
filelight
(fenix.complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
wayland
showmethekey
polkit
libsForQt5.polkit-kde-agent
asciinema
asciinema-agg
du-dust
appimage-run
file
virt-manager
weechat
flowblade
hyfetch
git-annex
gamemode
croc
uutils-coreutils
anki
alsa-utils
speechd
espeak
ezquake
imagemagick
weston
pavucontrol
psmisc
mesa-demos
nnn
aseprite-unfree
jq
fq
nixpkgs-wayland.eww-wayland
gnumake
gdb
tea
codeberg-cli
progress
parallel
p7zip
xxd
tldr
mpc-cli
playerctl
xdg-user-dirs
meson
wiki-tui
lshw
tree
ydotool
piper
smartmontools
agenix.default
nh.default
nyxt
exiv2
krita
mypaint
logseq
gamescope
vitetris
gtetrinet
# tp
jetbrains.idea-community
maven
libsForQt5.umbrello
plantuml
umlet
#graphviz
jdk21
gradle
dbeaver
# akiso
subversion
linuxKernel.packages.linux_zen.cpupower
usbutils
libsForQt5.dolphin
kiwix
inkscape
gomuks
nushell
twitch-tui
hugo
ytfzf
mat2
simplex-chat-desktop
libsixel
lsix
ollama
qmk
python3
wev
enigma
via
vial
rustdesk
superTuxKart
solaar
glfw-wayland-minecraft
httpie
mangohud
nix-index
];
};
}

View file

@ -1,5 +1,6 @@
_: {
imports = [
./home-manager.nix
./pin-registry.nix
./preserve-system.nix
./xdg.nix

View file

@ -0,0 +1,38 @@
{
config,
config',
inputs,
lib,
self,
...
}: with lib; let
cfg = config.myOptions.other.home-manager;
in {
options.myOptions.other.home-manager = {
enable = mkEnableOption "enable home-manager";
enableDirenv = mkEnableOption "enable direnv";
};
config = mkIf cfg.enable {
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = {inherit inputs self config';};
users.${config'.username} = {
programs = {
home-manager.enable = true;
direnv = mkIf cfg.enableDirenv {
enable = true;
nix-direnv.enable = true;
};
};
home = {
inherit (config') username;
homeDirectory = "/home/${config'.username}";
stateVersion = lib.mkDefault "23.11";
};
};
};
};
}