chore: reorganise modules

This commit is contained in:
Nico 2025-05-03 16:15:58 +10:00
parent 0662d79447
commit 292dfcfccd
10 changed files with 31 additions and 23 deletions

View file

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
{
programs.steam = {
extraPackages = [ pkgs.gamescope ];
gamescopeSession.enable = true;
extest.enable = true;
};
services.flatpak.enable = true;
systemd.user.services.kdeconnectd = {
enable = true;
after = [ "network.target" ];
wantedBy = [ "default.target" ];
description = "kdeconnectd";
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.kdePackages.kdeconnect-kde}/bin/kdeconnectd";
};
};
}

13
modules/linux/audio.nix Normal file
View file

@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }:
{
# Enable sound.
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
}

View file

@ -0,0 +1,28 @@
{ config, lib, pkgs, self, ... }:
{
programs.hyprland.enable = true;
# Optional, hint electron apps to use wayland:
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# have portals
xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
programs.hyprlock.enable = true;
environment.systemPackages = with pkgs; [
kitty
waybar
swww
grim
slurp
wl-clipboard
brightnessctl
helvum
ulauncher
playerctl
swaynotificationcenter
flameshot
];
}

13
modules/linux/login.nix Normal file
View file

@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }:
{
# display manager
programs.regreet = {
enable = true;
settings = {
GTK = {
application_prefer_dark_theme = true;
};
};
};
}

View file

@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
sbctl
];
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
}

35
modules/linux/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/linux/users.nix Normal file
View file

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