nixos/common.nix

51 lines
1.1 KiB
Nix
Raw Normal View History

2025-12-03 09:55:43 +00:00
# Common.nix
2025-12-02 21:44:07 +00:00
{ config, pkgs, lib, ... }:
{
2025-12-03 15:48:10 +00:00
imports = [
2025-12-04 13:33:00 +00:00
./settings/gnome.nix
2025-12-03 15:50:10 +00:00
./settings/locale.nix
2025-12-03 15:52:25 +00:00
./settings/audio.nix
2025-12-03 16:14:14 +00:00
./settings/users.nix
2025-12-03 19:55:22 +00:00
./apps/fastfetch.nix
2025-12-03 15:48:10 +00:00
# Add all your hosts here
];
2025-12-03 09:55:43 +00:00
# Use latest kernel
2025-12-02 21:44:07 +00:00
boot.kernelPackages = pkgs.linuxPackages_latest;
2025-12-03 10:02:45 +00:00
2025-12-03 16:14:14 +00:00
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Services
services.flatpak.enable = true;
2025-12-04 13:07:19 +00:00
# Enable network-manager
2025-12-03 16:14:14 +00:00
networking.networkmanager.enable = true;
2025-12-03 10:07:54 +00:00
# Shell aliases
2025-12-04 11:51:43 +00:00
environment.shellAliases = {
2025-12-04 12:30:15 +00:00
update = ''
2025-12-04 12:34:23 +00:00
CHANNEL=$(sudo nix-channel --list | grep "^nixos " | awk '{print $2}')
if [[ "$CHANNEL" != *"nixos-unstable"* ]]; then
2025-12-04 12:30:15 +00:00
echo "Switching to nixos-unstable channel..."
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
sudo nix-channel --update
fi
sudo nixos-rebuild switch --upgrade --option tarball-ttl 0
'';
clean = "sudo nix-collect-garbage -d";
ll = "ls -alh";
2025-12-04 13:47:10 +00:00
clear = "command clear && fastfetch --config /etc/fastfetch/config.jsonc";
2025-12-04 11:51:43 +00:00
};
2025-12-03 10:07:54 +00:00
2025-12-03 10:02:45 +00:00
# Add packages
2025-12-03 11:38:23 +00:00
environment.systemPackages = with pkgs; [
git
2025-12-03 10:02:45 +00:00
];
2025-12-03 12:01:28 +00:00
2025-12-03 10:07:54 +00:00
2025-12-02 21:44:07 +00:00
}