From ddab834b69d7140309becba8cbea4e21e7eafe5d Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 22 Aug 2024 19:08:11 -0700 Subject: [PATCH] fix: build successfully on adrastea --- flake.nix | 6 ++-- hosts/adrastea/configuration.nix | 13 ------- hosts/adrastea/default.nix | 10 +++++- hosts/callisto/hardware-configuration.nix | 42 +++++++++++++---------- 4 files changed, 36 insertions(+), 35 deletions(-) diff --git a/flake.nix b/flake.nix index 1528d7b..ec33f20 100755 --- a/flake.nix +++ b/flake.nix @@ -98,8 +98,10 @@ ]; }; adrastea = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - system = "x86_64-linux"; + specialArgs = { + inherit inputs; + system = "x86_64-linux"; + }; modules = [ ./hosts/adrastea ]; diff --git a/hosts/adrastea/configuration.nix b/hosts/adrastea/configuration.nix index be473ef..4a06b15 100755 --- a/hosts/adrastea/configuration.nix +++ b/hosts/adrastea/configuration.nix @@ -179,19 +179,6 @@ wget git curl - librewolf - gnumake - gcc - cachix - gnupg - openssh - python3 - steam-run - - # deps for neovim compilation - lua51Packages.lua - lua51Packages.luarocks - tree-sitter ]; environment.variables = { diff --git a/hosts/adrastea/default.nix b/hosts/adrastea/default.nix index f7c9779..d9e8804 100644 --- a/hosts/adrastea/default.nix +++ b/hosts/adrastea/default.nix @@ -1,4 +1,8 @@ -{inputs, ...}: { +{ + inputs, + system, + ... +}: { imports = with inputs; [ ./configuration.nix ../../modules/nixos/gaming @@ -17,6 +21,10 @@ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.backupFileExtension = "backup"; + home-manager.extraSpecialArgs = { + inherit inputs; + inherit system; + }; home-manager.users.youwen = { imports = [ ./home-manager-extras diff --git a/hosts/callisto/hardware-configuration.nix b/hosts/callisto/hardware-configuration.nix index b32d2d8..a891889 100644 --- a/hosts/callisto/hardware-configuration.nix +++ b/hosts/callisto/hardware-configuration.nix @@ -1,32 +1,36 @@ # 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") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "usb_storage" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["usb_storage" "sdhci_pci"]; + boot.initrd.kernelModules = []; + boot.kernelModules = []; + boot.extraModulePackages = []; - fileSystems."/" = - { device = "/dev/mapper/crypted"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/mapper/crypted"; + fsType = "ext4"; + }; boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/f4c552be-a4c2-4ca0-aec6-ed692d78fe24"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/852F-07F1"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/852F-07F1"; + fsType = "vfat"; + options = ["fmask=0022" "dmask=0022"]; + }; - swapDevices = [ ]; + swapDevices = []; # 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