diff --git a/makefile b/makefile index ae67667..af9a2bc 100644 --- a/makefile +++ b/makefile @@ -2,10 +2,13 @@ switchHm = home-manager switch --flake switchSys = nixos-rebuild switch --flake home-me: fix-systemd - ${switchHm} .#homeMe + ${switchHm} .#home-me sys-home: - sudo ${switchSys} .#systemHome + sudo ${switchSys} .#system-home + +sys-asus-gl553vd: + sudo ${switchSys} .#system-asus-gl553vd fix-systemd: systemctl --user reset-failed diff --git a/outputs/home.nix b/outputs/home.nix index b3b74bb..6cb61eb 100644 --- a/outputs/home.nix +++ b/outputs/home.nix @@ -15,7 +15,7 @@ let }; in { - homeMe = home-manager.lib.homeManagerConfiguration { + home-me = home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ diff --git a/outputs/system.nix b/outputs/system.nix index de62cc2..24253c7 100644 --- a/outputs/system.nix +++ b/outputs/system.nix @@ -2,7 +2,7 @@ with inputs; { - systemHome = nixpkgs.lib.nixosSystem { + system-home = nixpkgs.lib.nixosSystem { inherit system; modules = [ dedsec-grub-theme.nixosModule @@ -10,11 +10,11 @@ with inputs; ../system/machine/home ]; }; - usbStick = nixpkgs.lib.nixosSystem { + system-asus-gl553vd = nixpkgs.lib.nixosSystem { inherit system; modules = [ ../system/configuration.nix - ../system/machine/usb-stick + ../system/machine/asus_gl553vd ]; }; } diff --git a/system/machine/asus_gl553vd/default.nix b/system/machine/asus_gl553vd/default.nix new file mode 100644 index 0000000..88b489a --- /dev/null +++ b/system/machine/asus_gl553vd/default.nix @@ -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; +} diff --git a/system/machine/asus_gl553vd/hardware-configuration.nix b/system/machine/asus_gl553vd/hardware-configuration.nix new file mode 100644 index 0000000..145e45c --- /dev/null +++ b/system/machine/asus_gl553vd/hardware-configuration.nix @@ -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..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; +}