Add squirrelflight

This commit is contained in:
asonix 2024-02-19 11:02:55 -06:00
parent a23f066f92
commit 2bd6ee1d21
4 changed files with 130 additions and 0 deletions

View file

@ -23,6 +23,19 @@
# Select internationalisation properties.
i18n.defaultLocale = "en_US.utf8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;

View file

@ -45,5 +45,23 @@
}
];
};
nixosConfigurations.squirrelflight = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = [
nixos-hardware.nixosModules.framework-11th-gen-intel
./desktop.nix
./fonts.nix
./squirrelflight
./packages.nix
(import ./user.nix { name = "Tavi"; })
{
services.openssh = {
enable = true;
settings.PermitRootLogin = "no";
};
}
];
};
};
}

View file

@ -0,0 +1,58 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.luks.devices."luks-f2fdbf84-2c4b-47d5-b663-dec3abb173c9".device = "/dev/disk/by-uuid/f2fdbf84-2c4b-47d5-b663-dec3abb173c9";
boot.kernelParams = [ "mem_sleep_default=s2idle" ];
systemd.sleep.extraConfig = ''
HibernateDelaySec=30m
SuspendState=mem
'';
# Don't sleep if charging or docked
services.logind.lidSwitchDocked = "ignore";
services.logind.lidSwitchExternalPower = "ignore";
# suspend-then-hibernate if lid closed on battery or power button pressed
services.logind.lidSwitch = "suspend-then-hibernate";
services.logind.extraConfig = ''
HandleSuspendKey=suspend-then-hibernate
'';
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
networking.hostName = "squirrelflight"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

View file

@ -0,0 +1,41 @@
# 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 = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/18d694c3-82b9-481f-a20e-bd649c17313b";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-a2d80e6b-3626-41ee-b1c1-78d26e7e6ffb".device = "/dev/disk/by-uuid/a2d80e6b-3626-41ee-b1c1-78d26e7e6ffb";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/A02C-4946";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/9305d76d-06ab-4566-9ba3-fd0931a3288f"; }
];
# 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.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}