Made the configuration more modular

This commit is contained in:
2025-05-05 23:07:10 +02:00
parent 20ddcd892a
commit 3acb880866
7 changed files with 29 additions and 112 deletions

View File

@@ -35,7 +35,7 @@ let
machineConfig = ../machines/${name}/default.nix; machineConfig = ../machines/${name}/default.nix;
# OSConfig = ../modules/${if isDarwin then "darwin" else "nixos"}.nix; # OSConfig = ../modules/${if isDarwin then "darwin" else "nixos"}.nix;
HMConfig = ../home; HMConfig = ../home;
# systemPackages = ../modules/packages.nix; systemPackages = ../modules/packages.nix;
# TODO: make this cleaner # TODO: make this cleaner
nix-homebrew = lib.optionalAttrs isDarwin inputs.nix-homebrew.darwinModules.nix-homebrew; nix-homebrew = lib.optionalAttrs isDarwin inputs.nix-homebrew.darwinModules.nix-homebrew;
nix-homebrew-config = lib.optionalAttrs isDarwin { nix-homebrew-config = lib.optionalAttrs isDarwin {
@@ -74,6 +74,7 @@ systemFunc {
{ nixpkgs.config.allowUnfree = true; } { nixpkgs.config.allowUnfree = true; }
(if isWSL then inputs.nixos-wsl.nixosModules.wsl else { }) (if isWSL then inputs.nixos-wsl.nixosModules.wsl else { })
nixConfig nixConfig
systemPackages
nix-homebrew nix-homebrew
nix-homebrew-config nix-homebrew-config
home-manager.home-manager home-manager.home-manager

View File

@@ -1,9 +0,0 @@
{ ... }:
{
imports = [
./hardware/katana.nix
../modules
];
system.stateVersion = "24.05"; # Did you read the comment?
}

View File

@@ -5,5 +5,11 @@
./boot.nix ./boot.nix
./nvidia.nix ./nvidia.nix
./services.nix ./services.nix
./virtualisation.nix
./networking.nix
]; ];
networking.hostName = "katana"; # Define your hostname.
system.stateVersion = "24.05"; # Did you read the comment?
} }

View File

@@ -0,0 +1,8 @@
{ ... }:
{
networking.networkmanager.enable = true;
networking.firewall.allowedUDPPorts = [ 25565 ];
networking.firewall.allowedTCPPorts = [ 25565 ];
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
}

View File

@@ -8,26 +8,9 @@
services.desktopManager.plasma6.enable = true; services.desktopManager.plasma6.enable = true;
services.displayManager.sddm.wayland.enable = true; services.displayManager.sddm.wayland.enable = true;
# services.xserver.displayManager.gdm.enable = true; # Enable sound with pipewire.
# services.xserver.desktopManager.gnome.enable = true; services.pulseaudio.enable = false;
# environment.gnome.excludePackages = (with pkgs; [ security.rtkit.enable = true;
# atomix # puzzle game
# cheese # webcam tool
# epiphany # web browser
# evince # document viewer
# geary # email reader
# gedit # text editor
# gnome-characters
# gnome-music
# gnome-photos
# gnome-terminal
# gnome-tour
# hitori # sudoku game
# iagno # go game
# tali # poker game
# totem # video player
# ]);
# Configure keymap in X11 # Configure keymap in X11
services.xserver.xkb = { services.xserver.xkb = {

View File

@@ -0,0 +1,10 @@
{ ... }:
{
virtualisation.podman.enable = true;
virtualisation.podman.dockerCompat = true;
programs.virt-manager.enable = true;
users.groups.libvirtd.members = ["r3ddy"];
virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
}

View File

@@ -15,13 +15,6 @@
}; };
}; };
networking.hostName = "nixos"; # Define your hostname.
networking.networkmanager.enable = true;
networking.firewall.allowedUDPPorts = [ 25565 ];
networking.firewall.allowedTCPPorts = [ 25565 ];
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
time.timeZone = "Europe/Rome"; time.timeZone = "Europe/Rome";
@@ -46,11 +39,6 @@
GOPATH = "$HOME/.go"; GOPATH = "$HOME/.go";
}; };
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
programs.fish.enable = true; # This must be true before initializing my user programs.fish.enable = true; # This must be true before initializing my user
users.users.r3ddy = { users.users.r3ddy = {
isNormalUser = true; isNormalUser = true;
@@ -63,75 +51,5 @@
nerd-fonts.jetbrains-mono nerd-fonts.jetbrains-mono
]; ];
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
# CLI utils
appimage-run
btop
busybox
distrobox
docker
fish
fzf
git
gnumake
htop
jq
killall
md2pdf
nmap
python3
ripgrep
tree
unzip
wget
wl-clipboard
xdotool
xorg.xwininfo
yad
zip
zoxide
zulu
# Man pages
man-pages
vim # The only and one great editor
# neovim # The only and one great editor improved even further
# Video card
vulkan-tools
# Gaming
dolphin-emu
heroic
mangohud
prismlauncher
steam
vesktop
# GUI applications
baobab
brave
kdePackages.xdg-desktop-portal-kde
kitty
libresprite
mpv
nextcloud-client
spotube
telegram-desktop
];
programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;
virtualisation.podman.enable = true;
virtualisation.podman.dockerCompat = true;
programs.virt-manager.enable = true;
users.groups.libvirtd.members = ["r3ddy"];
virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
} }