spotlights-macbook-air: Init Linux configuration
This commit is contained in:
parent
4aac7da0e8
commit
041bc7d3c0
5 changed files with 228 additions and 9 deletions
97
hosts/linux/spotlights-macbook-air/configuration.nix
Normal file
97
hosts/linux/spotlights-macbook-air/configuration.nix
Normal file
|
@ -0,0 +1,97 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [ "flakes" "nix-command" ];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
# GPU enablement
|
||||
hardware.asahi = {
|
||||
peripheralFirmwareDirectory = ./firmware;
|
||||
# GPU enablement
|
||||
useExperimentalGPUDriver = true;
|
||||
experimentalGPUInstallMode = "replace";
|
||||
withRust = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "spotlights-macbook-air";
|
||||
wireless.iwd = {
|
||||
enable = true;
|
||||
settings.General.EnableNetworkConfiguration = true;
|
||||
};
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
# Enable GNOME
|
||||
xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
avahi = {
|
||||
enable = true;
|
||||
# Enable .local resolution
|
||||
nssmdns4 = true;
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
printing.enable = true;
|
||||
};
|
||||
|
||||
# Our user account.
|
||||
programs.zsh.enable = true;
|
||||
users.users.spotlight = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
cachix
|
||||
firefox
|
||||
git
|
||||
htop
|
||||
gnomeExtensions.appindicator
|
||||
legcord
|
||||
minicom
|
||||
nix-output-monitor
|
||||
python3
|
||||
seafile-client
|
||||
telegram-desktop
|
||||
tmux
|
||||
usbutils
|
||||
vim
|
||||
vscode
|
||||
wget
|
||||
];
|
||||
|
||||
# :(
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"vscode"
|
||||
];
|
||||
|
||||
# Allow location services.
|
||||
location.provider = "geoclue2";
|
||||
services.geoclue2.enable = true;
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "usb_storage" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/f6ce0d1f-a66d-4481-b338-611dc326efb6";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/395D-1117";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/8def60e1-8298-4f5d-ac1f-52ed948aa3c1"; }];
|
||||
|
||||
# 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.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue