From 7c7819b1c22091bb9d12e30d7a7203e8a7fdc568 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 19 Jul 2024 11:03:21 -0400 Subject: [PATCH] thelio76: home manager + fmt --- flake.nix | 6 +++++ nixos76/system/hardware-configuration.nix | 12 +++++---- thelio76/configuration.nix | 33 ++++++++++++----------- thelio76/hardware-configuration.nix | 15 ++++++----- 4 files changed, 39 insertions(+), 27 deletions(-) diff --git a/flake.nix b/flake.nix index 3ef4b8b..3282ffd 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,12 @@ system = "x86_64-linux"; modules = [ ./thelio76/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.alex = import ./nixos76/alex/home.nix; + } ]; }; nixosConfigurations.ursa-minor = nixpkgs.lib.nixosSystem diff --git a/nixos76/system/hardware-configuration.nix b/nixos76/system/hardware-configuration.nix index 0075508..3b5ca8d 100644 --- a/nixos76/system/hardware-configuration.nix +++ b/nixos76/system/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ]; @@ -14,18 +15,19 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/6d62467a-ccc1-44ed-a1cc-f473b3962c64"; + { + device = "/dev/disk/by-uuid/6d62467a-ccc1-44ed-a1cc-f473b3962c64"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/2330-1A62"; + { + device = "/dev/disk/by-uuid/2330-1A62"; fsType = "vfat"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/fda4f9fe-383f-477c-b2a2-c07f7efcc161"; } - ]; + [{ device = "/dev/disk/by-uuid/fda4f9fe-383f-477c-b2a2-c07f7efcc161"; }]; # 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 diff --git a/thelio76/configuration.nix b/thelio76/configuration.nix index 09572bf..42428c1 100644 --- a/thelio76/configuration.nix +++ b/thelio76/configuration.nix @@ -6,7 +6,8 @@ { imports = - [ # Include the results of the hardware scan. + [ + # Include the results of the hardware scan. ./hardware-configuration.nix ]; @@ -17,22 +18,22 @@ boot.loader.efi.canTouchEfiVariables = true; boot.initrd.systemd.enable = true; - boot.kernelParams = ["quiet"]; - + boot.kernelParams = [ "quiet" ]; + boot.plymouth.enable = true; - boot.plymouth.theme="fade-in"; + boot.plymouth.theme = "fade-in"; boot.initrd.luks.devices."luks-7d758c82-9079-46a6-8bb2-05d5016ed623".device = "/dev/disk/by-uuid/7d758c82-9079-46a6-8bb2-05d5016ed623"; environment.etc.crypttab.text = '' luks-9870176e-53f3-493e-94d8-560994fa8f35 UUID=9870176e-53f3-493e-94d8-560994fa8f35 /luks-9870176e-53f3-493e-94d8-560994fa8f35 nofail -''; + ''; + - fileSystems."/home/alex/Documents" = { - device = "/run/media/alex/External/Documents"; - options = [ "bind" ]; - }; - + device = "/run/media/alex/External/Documents"; + options = [ "bind" ]; + }; + networking.hostName = "thelio76"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -96,10 +97,10 @@ # services.xserver.libinput.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. - nixpkgs.config.permittedInsecurePackages = [ - "electron-25.9.0" - ]; - + nixpkgs.config.permittedInsecurePackages = [ + "electron-25.9.0" + ]; + users.users.alex = { @@ -147,8 +148,8 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget ]; # Some programs need SUID wrappers, can be configured further or are diff --git a/thelio76/hardware-configuration.nix b/thelio76/hardware-configuration.nix index 5c56b16..f1e4ad7 100644 --- a/thelio76/hardware-configuration.nix +++ b/thelio76/hardware-configuration.nix @@ -5,7 +5,8 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; @@ -14,23 +15,25 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/5b17c208-6c1b-4317-b59c-6596b1857f1f"; + { + device = "/dev/disk/by-uuid/5b17c208-6c1b-4317-b59c-6596b1857f1f"; fsType = "ext4"; }; boot.initrd.luks.devices."luks-b748a776-5e2c-4809-927e-1f4c051b9460".device = "/dev/disk/by-uuid/b748a776-5e2c-4809-927e-1f4c051b9460"; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/EB52-074B"; + { + device = "/dev/disk/by-uuid/EB52-074B"; fsType = "vfat"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/19de8142-e695-4425-a8cc-27e062204882"; } - ]; + [{ device = "/dev/disk/by-uuid/19de8142-e695-4425-a8cc-27e062204882"; }]; fileSystems."/run/media/alex/External" = - { device = "/dev/disk/by-uuid/5057a0e6-649f-487f-a17c-11e379f9af19"; + { + device = "/dev/disk/by-uuid/5057a0e6-649f-487f-a17c-11e379f9af19"; fsType = "auto"; }; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking