Merge branch 'flake' of https://git.atagen.co/atagen/nix into flake

This commit is contained in:
atagen 2023-05-18 16:58:19 +10:00
commit 5c3b5277e8
3 changed files with 161 additions and 0 deletions

View file

@ -128,4 +128,6 @@ bind=,XF86AudioStop,exec,playerctl stop
bind=,XF86AudioPlay,exec,playerctl play-pause
bind=,XF86AudioPrev,exec,playerctl previous
bind=,XF86AudioNext,exec,playerctl next
bind=,XF86MonBrightnessUp,exec,brightnessctl,s +10%
bind=,XF86MonBrightnessDown,exec,brightnessctl,s -10%

17
home/plank.nix Normal file
View file

@ -0,0 +1,17 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [
./home.nix
];
home = {
username = "plank";
homeDirectory = "/home/plank";
};
}

142
system/adrift.nix Normal file
View file

@ -0,0 +1,142 @@
{
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.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/1C5C-8FF4";
fsType = "vfat";
};
fileSystems."/" = {
device = "/dev/mapper/nix-os";
fsType = "ext4";
};
fileSystems."/home" = {
device = "/dev/mapper/nix-home";
fsType = "ext4";
};
swapDevices = [ ];
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;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
services.power-profiles-daemon.enable = false;
services.tlp.enable = true;
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.
};
}