Got a proper setup, worked some things out with the sway bar, fixed suspend issues

This commit is contained in:
vorboyvo 2024-01-05 16:38:09 -05:00
parent c6495f053a
commit a2a259a4bc
5 changed files with 43 additions and 13 deletions

View file

@ -42,8 +42,6 @@
# useXkbConfig = true; # use xkb.options in tty.
};
# Enable Wayland and Sway this way, for now (UPDATE: just using home manager lol)
# programs.sway.enable = true;
# Enable screensharing
xdg.portal = {
enable = true;
@ -51,13 +49,27 @@
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config.common.default = "*";
};
# Set login and power management options
services.logind.lidSwitch = "suspend";
services.logind.lidSwitchDocked = "ignore"; # when an external monitor is plugged in
# Enable graphics.
hardware.opengl.enable = true;
# Allow users in group "video" to modify backlight
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="backlight" KERNEL=="amdgpu_bl0", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/amdgpu_bl0/brightness"
ACTION=="add", SUBSYSTEM=="backlight" KERNEL=="amdgpu_bl0", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/amdgpu_bl0/brightness"
'';
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable udisks (handles storage devices, e.g. usb flash drives)
services.udisks2.enable = true;
# Enable sound.
security.rtkit.enable = true; # needed for pipewire
hardware.pulseaudio.enable = false;
@ -75,14 +87,14 @@
users.users.alice = {
isNormalUser = true;
home = "/home/alice";
extraGroups = [ "wheel" "networkmanager" ]; # Enable 'sudo' for the user.
extraGroups = [ "wheel" "networkmanager" "video" ]; # Enable 'sudo' for the user.
initialPassword = "manysuchcases";
};
home-manager.users.alice = import ./home.nix;
# Make sure swaylock works (defined in home.nix)
security.pam.services.swaylock = { };
# Make sure suspend actually happens
services.logind.extraConfig = ''
InhibitDelayMaxSec=5

View file

@ -4,6 +4,9 @@
home.username = "alice";
home.homeDirectory = "/home/alice";
# stopgap, should be removed; sets nvim to default editor
home.sessionVariables.EDITOR = "nvim";
home.stateVersion = "23.11";
home.packages = with pkgs;
@ -11,8 +14,8 @@
[ kitty ] ++ # Terminal emulator
[ firefox vifm pavucontrol ] ++ # Basic graphical apps
[ signal-desktop prismlauncher ] ++ # Personalized selection of graphical apps
[ bemenu j4-dmenu-desktop ] ++
[ noto-fonts ];
[ bemenu j4-dmenu-desktop ] ++ # Sway-related packages
[ noto-fonts overpass ]; # Fonts
programs.home-manager.enable = true;
@ -83,6 +86,17 @@
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Options" = {
urls = [{
template = "https://search.nixos.org/options";
params = [
{ name = "type"; value = "options"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ];
};
"NixOS Wiki" = {
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
iconUpdateURL = "https://nixos.wiki/favicon.png";

4
todo Normal file
View file

@ -0,0 +1,4 @@
enable NUR and firefox extensions
split app configs off into separate files
fix editor issue!!!
switch to zsh

View file

@ -2,15 +2,20 @@
{
enable = true;
config = {
config = rec {
terminal = "kitty";
modifier = "Mod4";
fonts = {
names = [ "Noto Sans" ];
names = [ "Overpass" ];
style = "Regular";
size = 12.0;
};
input = { "type:touchpad" = { natural_scroll = "enabled"; }; };
bars = let config = config; in [{
position = "top";
inherit fonts;
statusCommand = "${pkgs.i3status}/bin/i3status";
}];
window = {
border = 2;
titlebar = true;

View file

@ -1,5 +0,0 @@
{ config, lib, pkgs, ... }:
{
enable = true;
}