127 lines
3.5 KiB
Nix
127 lines
3.5 KiB
Nix
{
|
||
config,
|
||
lib,
|
||
pkgs,
|
||
...
|
||
}:
|
||
{
|
||
imports = [
|
||
./hardware-configuration.nix
|
||
../disk-config.nix
|
||
];
|
||
|
||
environment.shellAliases = {
|
||
rebuild = "sudo nixos-rebuild switch --flake ~/nixos/.#nvidia";
|
||
c = "nix-shell ~/nixos/shells/c.nix";
|
||
js = "nix-shell ~/nixos/shells/js.nix";
|
||
nix = "nix-shell ~/nixos/shells/nix.nix";
|
||
rust = "nix-shell ~/nixos/shells/rust.nix";
|
||
python = "nix-shell ~/nixos/shells/python.nix";
|
||
};
|
||
|
||
programs.steam.enable = true;
|
||
|
||
nixpkgs.config.allowUnfree = true;
|
||
|
||
# Use the systemd-boot EFI boot loader.
|
||
boot.loader.systemd-boot.enable = true;
|
||
boot.loader.efi.canTouchEfiVariables = true;
|
||
|
||
networking.hostName = "iamhome"; # Define your hostname.
|
||
|
||
# Configure network connections interactively with nmcli or nmtui.
|
||
networking.networkmanager.enable = true;
|
||
|
||
# Set your time zone.
|
||
time.timeZone = "America/New_York";
|
||
|
||
nix.settings.experimental-features = [
|
||
"nix-command"
|
||
"flakes"
|
||
];
|
||
|
||
# Enable Desktop Environment.
|
||
services.displayManager.cosmic-greeter.enable = true;
|
||
services.desktopManager.cosmic.enable = true;
|
||
|
||
services.flatpak.enable = true;
|
||
hardware.graphics.enable = true;
|
||
|
||
# Enable CUPS to print documents.
|
||
services.printing.enable = true;
|
||
services.printing.cups-pdf.enable = true;
|
||
services.printing.webInterface = false;
|
||
services.printing.drivers = with pkgs; [ brlaser ];
|
||
services.avahi = {
|
||
enable = true;
|
||
nssmdns4 = true;
|
||
openFirewall = true;
|
||
};
|
||
|
||
# Enable sound.
|
||
services.pipewire = {
|
||
enable = true;
|
||
pulse.enable = true;
|
||
};
|
||
|
||
# Enable touchpad support (enabled default in most desktopManager).
|
||
services.libinput.enable = true;
|
||
|
||
programs.bash.enable = true;
|
||
programs.bash.completion.enable = true;
|
||
|
||
users.users.ifrahim = {
|
||
isNormalUser = true;
|
||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||
initialPassword = "Smsia2004";
|
||
};
|
||
|
||
environment.systemPackages = with pkgs; [
|
||
home-manager
|
||
];
|
||
|
||
# Enable the OpenSSH daemon.
|
||
services.openssh.enable = true;
|
||
|
||
networking.firewall.enable = true;
|
||
networking.firewall.allowedTCPPorts = [
|
||
631
|
||
22
|
||
];
|
||
|
||
# /etc/nixos/configuration.nix snippet
|
||
|
||
virtualisation.docker.enable = true; # or podman
|
||
|
||
# OCI Container configuration
|
||
virtualisation.oci-containers = {
|
||
backend = "docker"; # or "podman"
|
||
containers = {
|
||
my-nginx = {
|
||
image = "nginx:latest";
|
||
autoStart = true;
|
||
ports = [
|
||
"8080:80" # Host:Container port mapping
|
||
];
|
||
};
|
||
};
|
||
};
|
||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||
#
|
||
# Most users should NEVER change this value after the initial install, for any reason,
|
||
# even if you've upgraded your system to a new NixOS release.
|
||
#
|
||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||
# to actually do that.
|
||
#
|
||
# This value being lower than the current NixOS release does NOT mean your system is
|
||
# out of date, out of support, or vulnerable.
|
||
#
|
||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||
# and migrated your data accordingly.
|
||
#
|
||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||
system.stateVersion = "25.11"; # Did you read the comment?
|
||
}
|