system/machine: add asus gl553vd

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-25 23:38:57 +03:00
parent 6db911315a
commit 0ec6a2cc4f
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
5 changed files with 88 additions and 6 deletions

View file

@ -2,10 +2,13 @@ switchHm = home-manager switch --flake
switchSys = nixos-rebuild switch --flake switchSys = nixos-rebuild switch --flake
home-me: fix-systemd home-me: fix-systemd
${switchHm} .#homeMe ${switchHm} .#home-me
sys-home: sys-home:
sudo ${switchSys} .#systemHome sudo ${switchSys} .#system-home
sys-asus-gl553vd:
sudo ${switchSys} .#system-asus-gl553vd
fix-systemd: fix-systemd:
systemctl --user reset-failed systemctl --user reset-failed

View file

@ -15,7 +15,7 @@ let
}; };
in in
{ {
homeMe = home-manager.lib.homeManagerConfiguration { home-me = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = [ modules = [

View file

@ -2,7 +2,7 @@
with inputs; with inputs;
{ {
systemHome = nixpkgs.lib.nixosSystem { system-home = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
dedsec-grub-theme.nixosModule dedsec-grub-theme.nixosModule
@ -10,11 +10,11 @@ with inputs;
../system/machine/home ../system/machine/home
]; ];
}; };
usbStick = nixpkgs.lib.nixosSystem { system-asus-gl553vd = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
../system/configuration.nix ../system/configuration.nix
../system/machine/usb-stick ../system/machine/asus_gl553vd
]; ];
}; };
} }

View file

@ -0,0 +1,34 @@
{ config, pkgs, lib, ... }:
let
secrets = import ../../../secrets.nix;
in
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
kernelPackages = pkgs.linuxPackages_latest;
};
networking = {
hostName = "laptop"; # Define your hostname.
inherit (secrets.networking) extraHosts;
interfaces = {
enp3s0.useDHCP = true;
wlp2s0.useDHCP = true;
};
};
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
}

View file

@ -0,0 +1,45 @@
# 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" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/e6c0cbba-7000-4b1e-ba53-e7b5f8ae11c0";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/499C-4EBD";
fsType = "vfat";
};
};
swapDevices = [{ device = "/dev/disk/by-uuid/fa457df9-cd48-4c81-90cb-a511a7689988"; }];
# 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.enp3s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}