diff --git a/flake.nix b/flake.nix index 69be60a..2fc145a 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,7 @@ inherit system; specialArgs = { inherit catppuccin; }; modules = [ - ./configuration.nix + ./hosts/all.nix hostModule catppuccin.nixosModules.catppuccin home-manager.nixosModules.home-manager @@ -38,7 +38,7 @@ home-manager.lib.homeManagerConfiguration { pkgs = import nixpkgs { inherit system; }; modules = [ - ./home.nix + ./home/all.nix catppuccin.homeModules.catppuccin ]; }; @@ -50,6 +50,7 @@ system = "aarch64-linux"; hostModule = ./hosts/peach.nix; extraModules = [ + ./hardware/peach.nix apple-silicon.nixosModules.default { nixpkgs.overlays = [ apple-silicon.overlays.apple-silicon-overlay ]; } ]; diff --git a/hardware/peach.nix b/hardware/peach.nix new file mode 100644 index 0000000..efd0ae4 --- /dev/null +++ b/hardware/peach.nix @@ -0,0 +1,30 @@ +# 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 = [ "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/8a3cb91f-2e3f-498d-8613-230976dff36e"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/FA86-1704"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +} diff --git a/home.nix b/home/all.nix similarity index 100% rename from home.nix rename to home/all.nix diff --git a/configuration.nix b/hosts/all.nix similarity index 66% rename from configuration.nix rename to hosts/all.nix index b6d755b..13087e5 100755 --- a/configuration.nix +++ b/hosts/all.nix @@ -5,25 +5,13 @@ { config, lib, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. - # ./hardware-configuration.nix - #./apple-silicon-support - ]; - - # Bootloader. - # boot.loader.systemd-boot = { - # enable = true; - # # configurationLimit = null; - # }; - # boot.loader.efi.canTouchEfiVariables = false; - + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.sckova = { imports = [ - ./home.nix + ../home/all.nix ]; }; @@ -33,14 +21,11 @@ systemd-boot = { enable = true; configurationLimit = null; - # consoleMode = "max"; }; efi = { canTouchEfiVariables = false; }; }; - # Silent Boot - # https://wiki.archlinux.org/title/Silent_boot kernelParams = [ "quiet" "splash" @@ -52,31 +37,12 @@ "apple_dcp.show_notch=1" ]; consoleLogLevel = 0; - # https://github.com/NixOS/nixpkgs/pull/108294 initrd.verbose = false; }; - swapDevices = [{ - device = "/swapfile"; - size = 32000; # 32GB - }]; - - # networking.hostName = "peach"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Enable networking networking.networkmanager.enable = true; - - # Set your time zone. time.timeZone = "America/New_York"; - - # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; - i18n.extraLocaleSettings = { LC_ADDRESS = "en_US.UTF-8"; LC_IDENTIFICATION = "en_US.UTF-8"; @@ -89,8 +55,6 @@ LC_TIME = "en_US.UTF-8"; }; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - # Enable OpenGL hardware.graphics = { enable = true; @@ -110,10 +74,8 @@ }; }; - # Enable CUPS to print documents. services.printing.enable = true; - # Enable sound with pipewire. services.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { @@ -123,7 +85,6 @@ pulse.enable = true; }; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.sckova = { isNormalUser = true; description = "Sean Kovacs"; @@ -143,14 +104,10 @@ ''; }; - # Install firefox. programs.firefox.enable = true; - # Allow unfree packages nixpkgs.config.allowUnfree = true; - # List packages installed in system profile. To search, run: - # $ nix search wget environment = { systemPackages = with pkgs; [ rclone @@ -170,30 +127,12 @@ ]; }; - - # programs.nix-ld.enable = true; - # programs.nix-ld.libraries = with pkgs; [ - # # Add any missing dynamic libraries for unpackaged programs - # # here, NOT in environment.systemPackages - # ]; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; - # List services that you want to enable: - - # Enable the OpenSSH daemon. services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. networking.firewall.enable = false; # This value determines the NixOS release from which the default diff --git a/hosts/peach.nix b/hosts/peach.nix index 126700e..bf6c36e 100644 --- a/hosts/peach.nix +++ b/hosts/peach.nix @@ -13,5 +13,10 @@ extractPeripheralFirmware = true; peripheralFirmwareDirectory = ../firmware; }; + + swapDevices = [{ + device = "/swapfile"; + size = 32000; # 32GB + }]; }