2023-08-16 20:44:01 +05:30
|
|
|
|
# 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’).
|
|
|
|
|
|
2024-04-04 01:16:38 +05:30
|
|
|
|
{ lib, pkgs, systemSettings, userSettings, ... }:
|
2023-08-21 04:25:05 +05:30
|
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
let
|
|
|
|
|
nixos-wsl = import ./nixos-wsl;
|
|
|
|
|
in
|
2023-08-16 20:44:01 +05:30
|
|
|
|
{
|
|
|
|
|
imports =
|
2023-11-12 21:40:37 +05:30
|
|
|
|
[ nixos-wsl.nixosModules.wsl
|
2023-08-16 20:44:01 +05:30
|
|
|
|
../../system/hardware/kernel.nix # Kernel config
|
2023-11-12 21:40:37 +05:30
|
|
|
|
../../system/hardware/systemd.nix # systemd config
|
2023-12-24 19:08:23 +05:30
|
|
|
|
../../system/hardware/time.nix # Network time sync
|
2023-08-16 20:44:01 +05:30
|
|
|
|
../../system/hardware/opengl.nix
|
|
|
|
|
../../system/hardware/printing.nix
|
|
|
|
|
../../system/hardware/bluetooth.nix
|
|
|
|
|
../../system/security/doas.nix
|
|
|
|
|
../../system/security/gpg.nix
|
|
|
|
|
../../system/security/blocklist.nix
|
|
|
|
|
../../system/security/firewall.nix
|
|
|
|
|
../../system/security/firejail.nix
|
|
|
|
|
../../system/style/stylix.nix
|
|
|
|
|
];
|
|
|
|
|
|
2023-08-21 04:25:05 +05:30
|
|
|
|
wsl = {
|
|
|
|
|
enable = true;
|
|
|
|
|
automountPath = "/mnt";
|
2024-01-19 03:06:52 +05:30
|
|
|
|
defaultUser = userSettings.username;
|
2023-08-21 04:25:05 +05:30
|
|
|
|
startMenuLaunchers = true;
|
|
|
|
|
|
|
|
|
|
# Enable native Docker support
|
|
|
|
|
# docker-native.enable = true;
|
|
|
|
|
|
|
|
|
|
# Enable integration with Docker Desktop (needs to be installed)
|
|
|
|
|
# docker-desktop.enable = true;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
2023-08-16 20:44:01 +05:30
|
|
|
|
# Fix nix path
|
|
|
|
|
nix.nixPath = [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
|
|
|
|
|
"nixos-config=$HOME/dotfiles/system/configuration.nix"
|
|
|
|
|
"/nix/var/nix/profiles/per-user/root/channels"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Experimental features
|
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
|
2023-08-21 04:25:05 +05:30
|
|
|
|
# Ensure nix flakes are enabled
|
|
|
|
|
nix.extraOptions = ''
|
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
|
'';
|
|
|
|
|
|
2023-08-16 20:44:01 +05:30
|
|
|
|
# I'm sorry Stallman-taichou
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
|
|
|
|
# Kernel modules
|
|
|
|
|
boot.kernelModules = [ "i2c-dev" "i2c-piix4" "cpufreq_powersave" ];
|
|
|
|
|
|
|
|
|
|
# Networking
|
2024-01-19 03:06:52 +05:30
|
|
|
|
networking.hostName = systemSettings.hostname; # Define your hostname.
|
2023-08-16 20:44:01 +05:30
|
|
|
|
|
|
|
|
|
# Timezone and locale
|
2024-01-19 03:06:52 +05:30
|
|
|
|
time.timeZone = systemSettings.timezone; # time zone
|
|
|
|
|
i18n.defaultLocale = systemSettings.locale;
|
2023-08-16 20:44:01 +05:30
|
|
|
|
i18n.extraLocaleSettings = {
|
2024-01-19 03:06:52 +05:30
|
|
|
|
LC_ADDRESS = systemSettings.locale;
|
|
|
|
|
LC_IDENTIFICATION = systemSettings.locale;
|
|
|
|
|
LC_MEASUREMENT = systemSettings.locale;
|
|
|
|
|
LC_MONETARY = systemSettings.locale;
|
|
|
|
|
LC_NAME = systemSettings.locale;
|
|
|
|
|
LC_NUMERIC = systemSettings.locale;
|
|
|
|
|
LC_PAPER = systemSettings.locale;
|
|
|
|
|
LC_TELEPHONE = systemSettings.locale;
|
|
|
|
|
LC_TIME = systemSettings.locale;
|
2023-08-16 20:44:01 +05:30
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# User account
|
2024-01-19 03:06:52 +05:30
|
|
|
|
users.users.${userSettings.username} = {
|
2023-08-16 20:44:01 +05:30
|
|
|
|
isNormalUser = true;
|
2024-01-19 03:06:52 +05:30
|
|
|
|
description = userSettings.name;
|
2023-08-16 20:44:01 +05:30
|
|
|
|
extraGroups = [ "networkmanager" "wheel" ];
|
|
|
|
|
packages = with pkgs; [];
|
|
|
|
|
uid = 1000;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# System packages
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
vim
|
|
|
|
|
wget
|
|
|
|
|
zsh
|
|
|
|
|
git
|
|
|
|
|
home-manager
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# I use zsh btw
|
|
|
|
|
environment.shells = with pkgs; [ zsh ];
|
|
|
|
|
users.defaultUserShell = pkgs.zsh;
|
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
|
|
|
|
|
|
xdg.portal = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraPortals = [
|
|
|
|
|
pkgs.xdg-desktop-portal
|
|
|
|
|
pkgs.xdg-desktop-portal-gtk
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# It is ok to leave this unchanged for compatibility purposes
|
2023-08-21 04:25:05 +05:30
|
|
|
|
system.stateVersion = "22.05";
|
2023-08-16 20:44:01 +05:30
|
|
|
|
|
|
|
|
|
}
|