chore: reorganise nix files into base dir

This commit is contained in:
Nico 2025-05-03 16:15:57 +10:00
parent 0fdd56c432
commit 104a0ccd4a
13 changed files with 2 additions and 2 deletions

23
modules/applications.nix Normal file
View file

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
gimp
audacity
obsidian
element-desktop
thunderbird
];
programs.kdeconnect.enable = true;
systemd.user.services.kdeconnectd = {
enable = true;
after = [ "network.target" ];
wantedBy = [ "default.target" ];
description = "kdeconnectd";
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.kdePackages.kdeconnect-kde}/libexec/kdeconnectd";
};
};
}

19
modules/boot.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, lib, pkgs, ... }:
# theming of grub
{
boot.loader.grub = {
theme = pkgs.stdenv.mkDerivation {
pname = "hyperfluent";
version = "v1.0.1";
src = pkgs.fetchFromGitHub {
owner = "Coopydood";
repo = "HyperFluent-GRUB-Theme";
rev = "62e525ea2aa250e3f37669d68eb355b6cc997d64";
hash = "sha256-Als4Tp6VwzwHjUyC62mYyiej1pZL9Tzj4uhTRoL+U9Q=";
};
installPhase = "cp -r nixos $out";
};
};
}

7
modules/firefox.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, lib, pkgs, ... }:
{
programs.firefox = {
enable = true;
};
}

7
modules/games.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
osu-lazer
];
}

55
modules/hyprland.nix Normal file
View file

@ -0,0 +1,55 @@
{ config, lib, pkgs, self, ... }:
{
programs.hyprland.enable = true;
# Optional, hint electron apps to use wayland:
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# display manager
programs.regreet = {
enable = true;
settings = {
GTK = {
application_prefer_dark_theme = true;
};
};
};
# have portals
xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
# install basic fonts
fonts = {
fontDir.enable = true; # fixes some programs
packages = with pkgs; [
noto-fonts # most langs and emojis
nerdfonts # programming fonts
corefonts # basic web fonts
];
};
programs.hyprlock.enable = true;
# Enable sound.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
environment.systemPackages = with pkgs; [
kitty
waybar
swww
grim
slurp
wl-clipboard
brightnessctl
helvum
ulauncher
];
}

44
modules/shell.nix Normal file
View file

@ -0,0 +1,44 @@
{ config, lib, pkgs, ...}:
{
programs.zsh.enable = true;
environment.systemPackages = with pkgs; [
git
zoxide
tmux
tlrc
file
stow
btop
jq
fzf
killall
ripgrep
wget
ffmpeg
imagemagick
];
programs.nh = {
enable = true;
flake = "/home/nico/dots";
};
programs.direnv = {
enable = true;
silent = true;
loadInNixShell = true;
nix-direnv.enable = true;
};
programs.neovim = {
enable = true;
vimAlias = true;
viAlias = true;
withRuby = true;
withPython3 = true;
withNodeJs = true;
};
}

35
modules/stow.nix Normal file
View file

@ -0,0 +1,35 @@
{ config, lib, pkgs, ... }:
{
systemd.user.services.stowinit = {
enable = true;
after = [ "network.target" ];
wantedBy = [ "default.target" ];
description = "apply stow configurations and pull dotfiles.";
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
script = ''
export installdir="$HOME/dots"
export repo="https://codeberg.org/nico/dots"
if [ ! -d "$installdir" ]; then
echo "cloning repo"
${pkgs.git}/bin/git clone $repo $installdir
else
echo "pulling latest dotfiles"
pushd $installdir
${pkgs.git}/bin/git pull $repo # works if repo is cloned using ssh
popd
fi
${pkgs.stow}/bin/stow --target=$HOME --dir=$installdir stow
echo "stowed configuration!"
'';
};
}

9
modules/users.nix Normal file
View file

@ -0,0 +1,9 @@
{ config, lib, pkgs, ...}:
{
users.users.nico = {
isNormalUser = true;
extraGroups = [ "wheel" ];
shell = pkgs.zsh;
};
}