diff --git a/default.nix b/default.nix index 71c9213..527368c 100644 --- a/default.nix +++ b/default.nix @@ -1,26 +1,16 @@ # This is AlukardBF's configuration file. -# # Thanks for original config - balsoft. -# # https://github.com/AlukardBF/nixos-config -# -# This is main nixos configuration -# To use this configuration: -# 1. Add your own secret.nix to this folder -# 2. Replace /etc/nixos/configuration.nix with the following: -# import /path/to/this/nixos-config "Vendor-Type" -# 3. Log in to application and services where neccesary device: { config, pkgs, lib, ... }: let sources = import ./nix/sources.nix; in { - imports = - [ - /etc/nixos/hardware-configuration.nix + imports = [ + "${./hardware-configuration}/${device}.nix" "${sources.home-manager}/nixos" - ./modules + (import ./modules device) ]; inherit device; diff --git a/hardware-configuration/Dell-Laptop.nix b/hardware-configuration/Dell-Laptop.nix new file mode 100644 index 0000000..ae9b849 --- /dev/null +++ b/hardware-configuration/Dell-Laptop.nix @@ -0,0 +1,51 @@ +# 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, ... }: + +{ + imports = + [ + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/43364c66-885f-4fc3-8138-95bd2d0d8d36"; + fsType = "btrfs"; + options = [ "subvol=@nixos" ]; + }; + + boot.initrd.luks.devices."cryptnixos".device = "/dev/disk/by-uuid/c9a08672-55fd-42d7-8903-c6ea06462c49"; + + fileSystems."/.snapshots" = + { device = "/dev/disk/by-uuid/43364c66-885f-4fc3-8138-95bd2d0d8d36"; + fsType = "btrfs"; + options = [ "subvol=@snapshots" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/43364c66-885f-4fc3-8138-95bd2d0d8d36"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + + fileSystems."/nix/store" = + { device = "/dev/disk/by-uuid/43364c66-885f-4fc3-8138-95bd2d0d8d36"; + fsType = "btrfs"; + options = [ "subvol=@nix-store" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/7294-A273"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + nix.maxJobs = lib.mkDefault 8; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +} diff --git a/modules/default.nix b/modules/default.nix index 707956a..0d3865b 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,3 +1,4 @@ +device: { config, lib, ... }: { imports = [ ./applications.nix