home.nix:
{ config, pkgs, ... }:
{
home.homeDirectory = "/home/ox0v0xo";
home.username = "ox0v0xo";
home.packages = with pkgs; [
neofetch
];
programs.git = {
enable = true;
userName = "ox0v0xo";
userEmail = "3874005664@qq.com";
};
# Home Manager Version
home.stateVersion = "24.11";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}
flake.nix:
{
description = "ox0v0xo's NixOS flake.nix";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self, nixpkgs, home-manager, ... }: {
nixosConfigurations = {
JINX = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.ox0v0xo = import ./home.nix;
}
];
};
};
};
}
configuration.nix:
{ config, pkgs, inputs, ... }:
{
imports =
[
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
# Set your time zone.
time.timeZone = "Asia/Shanghai";
# Select internationalisation properties
i18n.defaultLocale = "en_US.UTF-8";
# Define your hostname.
networking.hostName = "JINX";
# Enable networking
networking.networkmanager.enable = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pipewire = {
enable = true;
pulse.enable = true;
};
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = true;
PermitRootLogin = "yes";
Port = 22;
X11Forwarding = true;
};
};
# flake.nix
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Nix Package
environment.systemPackages = with pkgs; [
curl
fastfetch
git
tree
wget
];
# System Version
system.stateVersion = "24.11";
}
All three files are under /etc/nixos/.