first stage of laptop flake

This commit is contained in:
atagen 2023-05-17 21:02:01 +10:00
parent 4aa5519043
commit 739acea0a2
3 changed files with 137 additions and 0 deletions

118
system/adrift.nix Normal file
View file

@ -0,0 +1,118 @@
{
inputs,
outputs,
config,
lib,
pkgs,
overlays,
modulesPath,
...
}: {
nix.settings = {
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
imports = [
./configuration.nix
inputs.hyprland.nixosModules.default
];
boot.kernelParams = [
"mitigations=off"
"quiet"
"loglevel=3"
"systemd.show_status=auto"
"rd.udev.log_level=3"
"vt.global_cursor_default=0"
];
boot.loader.systemd-boot.configurationLimit = 2;
boot.loader.efi.canTouchEfiVariables = true;
# boot.plymouth.enable = true;
networking.useDHCP = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
environment.sessionVariables = rec {
EDITOR = "hx";
};
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
};
programs.hyprland = {
enable = true;
xwayland = {
enable = true;
hidpi = false;
};
nvidiaPatches = true;
};
services.xserver.videoDrivers = ["i915"];
programs.xwayland.enable = true;
systemd.services."com.system76.Scheduler" = {
wantedBy = ["multi-user.target"];
description = "the system76 process scheduler";
serviceConfig = {
Type = "dbus";
ExecStart = ''${pkgs.system76-scheduler}/bin/system76-scheduler daemon'';
ExecReload = ''${pkgs.system76-scheduler}/bin/system76-scheduler daemon reload'';
BusName = "com.system76.Scheduler";
};
};
services.dbus.packages = [
pkgs.system76-scheduler
];
systemd.packages = [
pkgs.system76-scheduler
];
environment.etc = {
"system76-scheduler".source = "${pkgs.system76-scheduler}/etc/system76-scheduler";
};
xdg.portal = {
enable = true;
wlr = {
enable = true;
# settings = {
# screencast = {
# output_name = "DP-1";
# max_fps = 60;
# chooser_type = "simple";
# chooser_nvidia = "${pkgs.slurp}/bin/slurp -f %o -or";
# };
# };
};
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
};
environment.systemPackages = with pkgs; [
ckb-next
openrgb
wl-clipboard
wl-clipboard-x11
xclip
brightnessctl
];
networking.hostName = "adrift"; # Define your hostname.
users.users.plank = {
isNormalUser = true;
extraGroups = ["wheel"]; # Enable sudo for the user.
};
}