Got a proper setup, worked some things out with the sway bar, fixed suspend issues
This commit is contained in:
parent
c6495f053a
commit
a2a259a4bc
|
|
@ -42,8 +42,6 @@
|
||||||
# useXkbConfig = true; # use xkb.options in tty.
|
# 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
|
# Enable screensharing
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -51,13 +49,27 @@
|
||||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
config.common.default = "*";
|
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.
|
# Enable graphics.
|
||||||
hardware.opengl.enable = true;
|
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.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable udisks (handles storage devices, e.g. usb flash drives)
|
||||||
|
services.udisks2.enable = true;
|
||||||
|
|
||||||
# Enable sound.
|
# Enable sound.
|
||||||
security.rtkit.enable = true; # needed for pipewire
|
security.rtkit.enable = true; # needed for pipewire
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
|
|
@ -75,14 +87,14 @@
|
||||||
users.users.alice = {
|
users.users.alice = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
home = "/home/alice";
|
home = "/home/alice";
|
||||||
extraGroups = [ "wheel" "networkmanager" ]; # Enable 'sudo' for the user.
|
extraGroups = [ "wheel" "networkmanager" "video" ]; # Enable 'sudo' for the user.
|
||||||
initialPassword = "manysuchcases";
|
initialPassword = "manysuchcases";
|
||||||
};
|
};
|
||||||
home-manager.users.alice = import ./home.nix;
|
home-manager.users.alice = import ./home.nix;
|
||||||
|
|
||||||
# Make sure swaylock works (defined in home.nix)
|
# Make sure swaylock works (defined in home.nix)
|
||||||
security.pam.services.swaylock = { };
|
security.pam.services.swaylock = { };
|
||||||
|
|
||||||
# Make sure suspend actually happens
|
# Make sure suspend actually happens
|
||||||
services.logind.extraConfig = ''
|
services.logind.extraConfig = ''
|
||||||
InhibitDelayMaxSec=5
|
InhibitDelayMaxSec=5
|
||||||
|
|
|
||||||
18
home.nix
18
home.nix
|
|
@ -4,6 +4,9 @@
|
||||||
home.username = "alice";
|
home.username = "alice";
|
||||||
home.homeDirectory = "/home/alice";
|
home.homeDirectory = "/home/alice";
|
||||||
|
|
||||||
|
# stopgap, should be removed; sets nvim to default editor
|
||||||
|
home.sessionVariables.EDITOR = "nvim";
|
||||||
|
|
||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs;
|
||||||
|
|
@ -11,8 +14,8 @@
|
||||||
[ kitty ] ++ # Terminal emulator
|
[ kitty ] ++ # Terminal emulator
|
||||||
[ firefox vifm pavucontrol ] ++ # Basic graphical apps
|
[ firefox vifm pavucontrol ] ++ # Basic graphical apps
|
||||||
[ signal-desktop prismlauncher ] ++ # Personalized selection of graphical apps
|
[ signal-desktop prismlauncher ] ++ # Personalized selection of graphical apps
|
||||||
[ bemenu j4-dmenu-desktop ] ++
|
[ bemenu j4-dmenu-desktop ] ++ # Sway-related packages
|
||||||
[ noto-fonts ];
|
[ noto-fonts overpass ]; # Fonts
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
|
@ -83,6 +86,17 @@
|
||||||
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
definedAliases = [ "@np" ];
|
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" = {
|
"NixOS Wiki" = {
|
||||||
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
|
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
|
||||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
||||||
|
|
|
||||||
4
todo
Normal file
4
todo
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
enable NUR and firefox extensions
|
||||||
|
split app configs off into separate files
|
||||||
|
fix editor issue!!!
|
||||||
|
switch to zsh
|
||||||
|
|
@ -2,15 +2,20 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = rec {
|
||||||
terminal = "kitty";
|
terminal = "kitty";
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
fonts = {
|
fonts = {
|
||||||
names = [ "Noto Sans" ];
|
names = [ "Overpass" ];
|
||||||
style = "Regular";
|
style = "Regular";
|
||||||
size = 12.0;
|
size = 12.0;
|
||||||
};
|
};
|
||||||
input = { "type:touchpad" = { natural_scroll = "enabled"; }; };
|
input = { "type:touchpad" = { natural_scroll = "enabled"; }; };
|
||||||
|
bars = let config = config; in [{
|
||||||
|
position = "top";
|
||||||
|
inherit fonts;
|
||||||
|
statusCommand = "${pkgs.i3status}/bin/i3status";
|
||||||
|
}];
|
||||||
window = {
|
window = {
|
||||||
border = 2;
|
border = 2;
|
||||||
titlebar = true;
|
titlebar = true;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
}
|
|
||||||
Loading…
Reference in a new issue