Update NixOS config.

This commit is contained in:
Elias Gasparis 2024-12-21 19:42:09 +08:00
parent 9e19dc18e8
commit 6598510ac8
4 changed files with 107 additions and 18 deletions

View file

@ -0,0 +1,45 @@
# 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).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.initrd.luks.devices."luks-b665cacd-d82b-44cd-ab4a-61018efec103".device = "/dev/disk/by-uuid/b665cacd-d82b-44cd-ab4a-61018efec103";
networking.hostName = "aspirenix"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.elias = {
isNormalUser = true;
description = "Elias Gasparis";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
# thunderbird
htop
];
};
# 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. Its 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).
system.stateVersion = "24.11"; # Did you read the comment?
}

View file

@ -0,0 +1,42 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "uas" "sd_mod" "rtsx_usb_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f4554a8a-b8d9-4c9e-bea9-c39452383e62";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-8ae34699-9999-47dc-bc01-269b01f7c9bc".device = "/dev/disk/by-uuid/8ae34699-9999-47dc-bc01-269b01f7c9bc";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/E0DA-830C";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/fcd6ecf9-3d4d-4cb1-b217-957bae8fbc3f"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -59,24 +59,6 @@ i18n.inputMethod = {
ibus.engines = with pkgs.ibus-engines; [ libpinyin table-chinese];
};
# doesn't work
# i18n.inputMethod = {
# type = "fcitx5";
# fcitx5.waylandFrontend = true;
# fcitx5.addons = with pkgs; [
# fcitx5-im #doesn't seem to help
# fcitx5-gtk # alternatively, kdePackages.fcitx5-qt
# fcitx5-chewing
# fcitx5-chinese-addons # table input method support
# fcitx5-nord # a color theme
# ];
# };
#old one didn't work
# i18n.inputMethod = {
# type = "fcitx5";
# fcitx5.addons = with pkgs; [ fcitx5-chewing fcitx5-chinese-addons ];
# };
# Enable the X11 windowing system.
services.xserver.enable = true;

View file

@ -46,6 +46,26 @@
} #close homemanager
]; #close modules
}; # close bluenix
# aspirenix - Grey Acer Aspire machine
aspirenix = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./base.nix
./aspire/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.elias = import ./home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
} #close homemanager
]; #close modules
}; # close bluenix
}; #close nixosconfigurations
}; #close outputs
}