2022-09-21 10:43:19 +00:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
2023-12-24 03:33:19 +00:00
|
|
|
|
# flake-overlays:
|
2022-09-21 10:43:19 +00:00
|
|
|
|
{
|
2024-04-04 05:11:19 +00:00
|
|
|
|
config,
|
|
|
|
|
pkgs,
|
|
|
|
|
lib,
|
|
|
|
|
inputs,
|
|
|
|
|
...
|
|
|
|
|
}: {
|
|
|
|
|
imports = [
|
|
|
|
|
# Include the results of the hardware scan.
|
2024-02-17 09:54:55 +00:00
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
inputs.home-manager.nixosModules.default
|
2024-04-04 05:11:19 +00:00
|
|
|
|
];
|
2022-09-21 10:43:19 +00:00
|
|
|
|
|
2023-05-22 10:26:59 +00:00
|
|
|
|
# Enable Bluetooth
|
|
|
|
|
|
2023-11-08 17:32:00 +00:00
|
|
|
|
# Allow non-free firmware
|
|
|
|
|
|
2022-09-21 10:43:19 +00:00
|
|
|
|
# Bootloader.
|
|
|
|
|
|
2023-07-10 12:07:30 +00:00
|
|
|
|
# Kernel modules
|
2024-02-29 17:40:00 +00:00
|
|
|
|
|
2023-05-22 11:54:14 +00:00
|
|
|
|
# Setup keyfile
|
2024-02-17 09:54:55 +00:00
|
|
|
|
# boot.initrd.secrets = {
|
|
|
|
|
# "/crypto_keyfile.bin" = null;
|
|
|
|
|
# };
|
2023-05-22 11:54:14 +00:00
|
|
|
|
|
2022-09-21 10:43:19 +00:00
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Asia/Kolkata";
|
|
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
|
|
|
|
|
# Enable the X11 windowing system.
|
2024-03-17 16:26:31 +00:00
|
|
|
|
# Debug infod
|
|
|
|
|
services.nixseparatedebuginfod.enable = true;
|
|
|
|
|
|
2024-03-17 16:16:58 +00:00
|
|
|
|
# Enable hyprland
|
|
|
|
|
programs.hyprland = {
|
|
|
|
|
enable = true;
|
|
|
|
|
xwayland.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
2024-04-04 05:11:19 +00:00
|
|
|
|
# Change DNS
|
|
|
|
|
|
|
|
|
|
# Enable dde
|
2023-05-27 09:55:00 +00:00
|
|
|
|
# services.xserver.desktopManager.deepin.enable = true;
|
|
|
|
|
# services.deepin = {
|
|
|
|
|
# dde-daemon.enable = true;
|
|
|
|
|
# dde-api.enable = true;
|
|
|
|
|
# app-services.enable = true;
|
|
|
|
|
# };
|
|
|
|
|
|
2023-05-22 10:26:59 +00:00
|
|
|
|
# Enable dconf
|
|
|
|
|
programs.dconf.enable = true;
|
2022-09-21 10:43:19 +00:00
|
|
|
|
|
|
|
|
|
# Configure keymap in X11
|
2024-03-17 16:16:58 +00:00
|
|
|
|
|
2022-09-21 10:43:19 +00:00
|
|
|
|
# Enable CUPS to print documents.
|
|
|
|
|
services.printing.enable = true;
|
|
|
|
|
|
|
|
|
|
# Enable sound with pipewire.
|
|
|
|
|
|
|
|
|
|
# Enable touchpad support (enabled default in most desktopManager).
|
|
|
|
|
# services.xserver.libinput.enable = true;
|
|
|
|
|
|
2023-05-22 10:26:59 +00:00
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
|
|
2024-04-04 05:11:19 +00:00
|
|
|
|
nix.settings.trusted-users = ["root" "user"];
|
2023-06-22 13:37:26 +00:00
|
|
|
|
|
2022-09-21 10:43:19 +00:00
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.users.user = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
description = "user";
|
|
|
|
|
shell = pkgs.zsh;
|
2024-04-04 05:11:19 +00:00
|
|
|
|
extraGroups = ["networkmanager" "wheel" "libvirtd" "qemu" "qemu-kvm" "vo" "docker" "lxc" "incus-admin"];
|
2022-09-21 10:43:19 +00:00
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
kate
|
2023-05-25 13:59:49 +00:00
|
|
|
|
vim
|
|
|
|
|
libvirt
|
|
|
|
|
spice-gtk
|
|
|
|
|
qemu
|
|
|
|
|
qemu_kvm
|
|
|
|
|
virt-viewer
|
|
|
|
|
virt-manager
|
|
|
|
|
OVMF
|
2024-01-03 06:46:26 +00:00
|
|
|
|
dnsmasq
|
2024-03-24 11:49:41 +00:00
|
|
|
|
networkmanagerapplet
|
2022-09-21 10:43:19 +00:00
|
|
|
|
];
|
2024-04-04 05:11:19 +00:00
|
|
|
|
};
|
2024-03-25 14:33:03 +00:00
|
|
|
|
|
|
|
|
|
users.users.root = {
|
|
|
|
|
subUidRanges = [
|
|
|
|
|
{
|
|
|
|
|
count = 1000;
|
|
|
|
|
startUid = 1000;
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
subGidRanges = [
|
|
|
|
|
{
|
|
|
|
|
count = 1000;
|
|
|
|
|
startGid = 1000;
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
};
|
2024-04-04 05:11:19 +00:00
|
|
|
|
|
2024-02-17 09:54:55 +00:00
|
|
|
|
home-manager = {
|
2024-04-04 05:11:19 +00:00
|
|
|
|
extraSpecialArgs = {inherit inputs;};
|
2024-02-17 09:54:55 +00:00
|
|
|
|
users = {
|
|
|
|
|
"user" = import ./home.nix;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2023-05-30 15:45:18 +00:00
|
|
|
|
environment = {
|
2024-04-04 05:11:19 +00:00
|
|
|
|
homeBinInPath = true; # Include ~/bin/ in $PATH
|
|
|
|
|
localBinInPath = true; # Include ~/.local/bin in $PATH
|
|
|
|
|
sessionVariables = {
|
|
|
|
|
# tell electron apps to use wayland
|
|
|
|
|
NIXOS_OZONW_WL = "1";
|
|
|
|
|
};
|
2022-09-21 10:43:19 +00:00
|
|
|
|
};
|
|
|
|
|
|
2023-05-25 13:59:49 +00:00
|
|
|
|
virtualisation.libvirtd.enable = true;
|
2023-12-24 03:33:19 +00:00
|
|
|
|
virtualisation.waydroid.enable = true;
|
2023-12-31 13:03:22 +00:00
|
|
|
|
virtualisation.docker.enable = true;
|
2024-02-29 17:40:00 +00:00
|
|
|
|
virtualisation.lxc.enable = true;
|
|
|
|
|
virtualisation.lxc.lxcfs.enable = true;
|
|
|
|
|
virtualisation.incus.enable = true;
|
2023-05-25 13:59:49 +00:00
|
|
|
|
|
2022-09-21 10:43:19 +00:00
|
|
|
|
# Allow unfree packages
|
2023-11-08 17:32:00 +00:00
|
|
|
|
nixpkgs.config = {
|
|
|
|
|
allowUnfree = true;
|
|
|
|
|
|
|
|
|
|
packageOverrides = pkgs: {
|
2024-04-04 05:11:19 +00:00
|
|
|
|
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
|
2023-11-08 17:32:00 +00:00
|
|
|
|
};
|
2024-04-04 05:11:19 +00:00
|
|
|
|
};
|
2022-09-21 10:43:19 +00:00
|
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
|
# $ nix search wget
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2023-05-22 10:26:59 +00:00
|
|
|
|
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
|
|
|
wget
|
|
|
|
|
git
|
2024-04-04 05:11:19 +00:00
|
|
|
|
];
|
2022-09-21 10:43:19 +00:00
|
|
|
|
|
2023-05-22 17:31:57 +00:00
|
|
|
|
programs.neovim = {
|
|
|
|
|
enable = true;
|
|
|
|
|
defaultEditor = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-21 10:43:19 +00:00
|
|
|
|
# Some programs need SUID wrappers, can be configured further or are
|
|
|
|
|
# started in user sessions.
|
|
|
|
|
# programs.mtr.enable = true;
|
|
|
|
|
# programs.gnupg.agent = {
|
|
|
|
|
# enable = true;
|
|
|
|
|
# enableSSHSupport = true;
|
|
|
|
|
# };
|
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
|
|
|
|
|
# Enable the OpenSSH daemon.
|
2023-05-22 10:26:59 +00:00
|
|
|
|
services.openssh.enable = true;
|
2022-09-21 10:43:19 +00:00
|
|
|
|
|
|
|
|
|
# Open ports in the firewall.
|
2024-04-04 05:11:19 +00:00
|
|
|
|
networking.firewall.allowedTCPPorts = [80 443 7860];
|
2022-09-21 10:43:19 +00:00
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
|
# Or disable the firewall altogether.
|
|
|
|
|
# networking.firewall.enable = false;
|
|
|
|
|
|
2023-05-22 10:26:59 +00:00
|
|
|
|
# Nix extra options
|
|
|
|
|
nix.extraOptions = ''
|
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
|
'';
|
|
|
|
|
|
2022-09-21 10:43:19 +00:00
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
2023-05-22 10:26:59 +00:00
|
|
|
|
system.stateVersion = "22.11"; # Did you read the comment?
|
2022-09-21 10:43:19 +00:00
|
|
|
|
}
|