dustbowl: make swayidle a systemd service + run nixpkgs-fmt
This commit is contained in:
parent
989e4f9555
commit
9757bf7ff6
9 changed files with 41 additions and 31 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
# WARN: this file will get overwritten by $ cachix use <name>
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
|
|
@ -7,7 +6,8 @@ let
|
|||
toImport = name: value: folder + ("/" + name);
|
||||
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
|
||||
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
|
||||
in {
|
||||
in
|
||||
{
|
||||
inherit imports;
|
||||
nix.settings.trusted-substituters = ["https://cache.nixos.org/"];
|
||||
nix.settings.trusted-substituters = [ "https://cache.nixos.org/" ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
{
|
||||
nix.settings = {
|
||||
trusted-substituters = [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
{
|
||||
nix.settings = {
|
||||
trusted-substituters = [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
{
|
||||
nix.settings = {
|
||||
trusted-substituters = [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
{
|
||||
nix.settings = {
|
||||
trusted-substituters = [
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
{
|
||||
nix.settings = {
|
||||
trusted-substituters = [
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@
|
|||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
/etc/nixos/private.nix
|
||||
./cachix.nix
|
||||
|
|
@ -47,6 +48,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Enable systemd watchdog
|
||||
systemd.watchdog = {
|
||||
runtimeTime = "30s";
|
||||
rebootTime = "10m";
|
||||
};
|
||||
|
||||
boot.extraModulePackages = [
|
||||
config.boot.kernelPackages.v4l2loopback.out
|
||||
];
|
||||
|
|
@ -71,7 +78,7 @@
|
|||
services.fwupd.enable = true;
|
||||
|
||||
networking.hostName = "dustbowl"; # Define your hostname.
|
||||
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.wireless.interfaces = [ "wlp2s0" ];
|
||||
|
||||
networking.wireguard.enable = true;
|
||||
|
|
@ -189,7 +196,7 @@
|
|||
enable = true;
|
||||
extraRules = [
|
||||
{
|
||||
groups = ["wheel"];
|
||||
groups = [ "wheel" ];
|
||||
persist = true;
|
||||
keepEnv = true;
|
||||
}
|
||||
|
|
@ -201,7 +208,7 @@
|
|||
group = "root";
|
||||
capabilities = "cap_perfmon=ip";
|
||||
source = "${pkgs.rr}/bin/rr";
|
||||
};
|
||||
};
|
||||
|
||||
security.wrappers.intel_gpu_top = {
|
||||
owner = "root";
|
||||
|
|
@ -257,6 +264,24 @@
|
|||
};
|
||||
};
|
||||
|
||||
systemd.user.services.swayidle = {
|
||||
description = "swayidle idle manager for Wayland";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
path = with pkgs; [ bash sway swaylock ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 300 'swaylock -f -c 000000' \
|
||||
timeout 600 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
before-sleep 'swaylock -f -c 000000'
|
||||
'';
|
||||
RestartSec = 3;
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
|
||||
|
|
@ -319,7 +344,9 @@
|
|||
# Fonts
|
||||
fonts.fonts = with pkgs; [
|
||||
fira-code
|
||||
noto-fonts noto-fonts-emoji noto-fonts-extra
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
noto-fonts-extra
|
||||
];
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue