Revert "feat(niri,xbacklight): Brightness control"
This reverts commit 9b0e21d04d786116d2578cb4e4a526619e79a7c4.
This commit is contained in:
@@ -11,7 +11,6 @@
|
|||||||
wifi.enable = true;
|
wifi.enable = true;
|
||||||
stylix.enable = true;
|
stylix.enable = true;
|
||||||
niri.enable = true;
|
niri.enable = true;
|
||||||
xbacklight-permissions.enable = true;
|
|
||||||
users.users = [
|
users.users = [
|
||||||
"crumb"
|
"crumb"
|
||||||
];
|
];
|
||||||
|
|||||||
73
hosts/fruitbook/disks.nix
Executable file
73
hosts/fruitbook/disks.nix
Executable file
@@ -0,0 +1,73 @@
|
|||||||
|
# sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode disko /persist/dots/hosts/nixos-testbed/disko-config.nix
|
||||||
|
# time sudo nixos-install --flake /persist/dots#nixos-testbed
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
# imports = [ disko.nixosModules.disko ];
|
||||||
|
boot.initrd.supportedFilesystems.btrfs = true;
|
||||||
|
boot.supportedFilesystems.btrfs = true;
|
||||||
|
|
||||||
|
# From Impermanence's README: "Important note: Make sure your persistent
|
||||||
|
# volumes are marked with neededForBoot, otherwise you will run into
|
||||||
|
# problems."
|
||||||
|
fileSystems."/persist".neededForBoot = true;
|
||||||
|
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
bootroot = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/disk/by-id/ata-APPLE_SSD_SM0512G_S29ANYAH526520-part4";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
ESP = {
|
||||||
|
size = "512M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
|
||||||
|
mountpoint = "/partition-root";
|
||||||
|
swap.swapfile.size = "4G";
|
||||||
|
|
||||||
|
# Override existing partitions.
|
||||||
|
extraArgs = [ "-f" ];
|
||||||
|
|
||||||
|
# Subvolumes must set a mountpoint in order to be mounted,
|
||||||
|
# *unless their parent is mounted*.
|
||||||
|
subvolumes = {
|
||||||
|
# Subvolume names do not necessarily correspond to
|
||||||
|
# mountpoints, despite the structural resemblance to a file
|
||||||
|
# path.
|
||||||
|
"/rootfs" = {
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
"/nix" = {
|
||||||
|
mountpoint = "/nix";
|
||||||
|
};
|
||||||
|
"/persist" = {
|
||||||
|
mountpoint = "/persist";
|
||||||
|
};
|
||||||
|
"/persist/home" = {
|
||||||
|
mountpoint = "/persist/home";
|
||||||
|
};
|
||||||
|
"/swap" = {
|
||||||
|
mountpoint = "/.swapvol";
|
||||||
|
swap.swapfile.size = "4G";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -73,7 +73,7 @@ in {
|
|||||||
|
|
||||||
spawn-at-startup =
|
spawn-at-startup =
|
||||||
[{ command = [ "${pkgs.swaynotificationcenter}/bin/swaync" ]; }
|
[{ command = [ "${pkgs.swaynotificationcenter}/bin/swaync" ]; }
|
||||||
{ command = [ (lib.getExe pkgs.gammastep) "-o" "-O" "4000k"
|
{ command = [ "${pkgs.gammastep}/bin/gammastep" "-o" "-O" "4000k"
|
||||||
"-b" "0.9:0.9" "-l" "0:0"]; }]
|
"-b" "0.9:0.9" "-l" "0:0"]; }]
|
||||||
++ lib.optional
|
++ lib.optional
|
||||||
(! builtins.isNull cfg.wallpaper)
|
(! builtins.isNull cfg.wallpaper)
|
||||||
@@ -175,7 +175,7 @@ in {
|
|||||||
{ title = "Discord.*@"; }
|
{ title = "Discord.*@"; }
|
||||||
];
|
];
|
||||||
excludes = [
|
excludes = [
|
||||||
# ...except when explicitly targeting the window.
|
# ... except when explicitly targeting the window.
|
||||||
{ is-window-cast-target = true; }
|
{ is-window-cast-target = true; }
|
||||||
];
|
];
|
||||||
block-out-from = "screen-capture";
|
block-out-from = "screen-capture";
|
||||||
@@ -226,9 +226,8 @@ in {
|
|||||||
binds = {
|
binds = {
|
||||||
"Mod+Q".action.close-window = [];
|
"Mod+Q".action.close-window = [];
|
||||||
"Mod+Shift+Q".action.quit = [];
|
"Mod+Shift+Q".action.quit = [];
|
||||||
"Mod+Ctrl+L".action.spawn = [ (lib.getExe pkgs.swaylock) ];
|
"Mod+Ctrl+L".action.spawn = ["${pkgs.swaylock}/bin/swaylock"];
|
||||||
"Mod+D".action.spawn = [ (lib.getExe pkgs.fuzzel) ];
|
"Mod+D".action.spawn = ["${pkgs.fuzzel}/bin/fuzzel"];
|
||||||
"XF86LaunchB".action.spawn = [ (lib.getExe pkgs.fuzzel) ];
|
|
||||||
"Mod+Shift+Slash".action.show-hotkey-overlay = [];
|
"Mod+Shift+Slash".action.show-hotkey-overlay = [];
|
||||||
|
|
||||||
# Powers off the monitors. They will be powered back on upon any
|
# Powers off the monitors. They will be powered back on upon any
|
||||||
@@ -280,12 +279,7 @@ in {
|
|||||||
"Mod+Shift+J".action.move-window-down = [];
|
"Mod+Shift+J".action.move-window-down = [];
|
||||||
"Mod+Shift+K".action.move-window-up = [];
|
"Mod+Shift+K".action.move-window-up = [];
|
||||||
"Mod+Shift+L".action.move-column-right = [];
|
"Mod+Shift+L".action.move-column-right = [];
|
||||||
|
|
||||||
"XF86MonBrightnessDown".action.spawn =
|
|
||||||
["${lib.getExe pkgs.acpilight}" "-dec" "10"];
|
|
||||||
"XF86MonBrightnessUp".action.spawn =
|
|
||||||
["${lib.getExe pkgs.acpilight}" "-inc" "10"];
|
|
||||||
|
|
||||||
"Mod+1".action.focus-workspace = [1];
|
"Mod+1".action.focus-workspace = [1];
|
||||||
"Mod+2".action.focus-workspace = [2];
|
"Mod+2".action.focus-workspace = [2];
|
||||||
"Mod+3".action.focus-workspace = [3];
|
"Mod+3".action.focus-workspace = [3];
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
let cfg = config.sydnix.xbacklight-permissions;
|
|
||||||
in {
|
|
||||||
options.sydnix.xbacklight-permissions = {
|
|
||||||
enable =
|
|
||||||
lib.mkEnableOption "the user group that is allowed to use xbacklight";
|
|
||||||
group = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "xbacklight";
|
|
||||||
};
|
|
||||||
paths = lib.mkOption {
|
|
||||||
type = with lib.types; listOf str;
|
|
||||||
default = [
|
|
||||||
"/sys/class/backlight/intel_backlight/brightness"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
users.groups.${cfg.group} = {};
|
|
||||||
|
|
||||||
systemd.tmpfiles.settings."50-xbacklight" =
|
|
||||||
lib.mergeAttrsList
|
|
||||||
(builtins.map
|
|
||||||
(path: {
|
|
||||||
${path}.z = {
|
|
||||||
inherit (cfg) group;
|
|
||||||
mode = "0664";
|
|
||||||
user = "root";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
cfg.paths);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -3,13 +3,7 @@
|
|||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
# TODO: Don't hard-code `persist`. Use
|
# TODO: Don't hard-code `persist`. Use
|
||||||
# config.sydnix.impermanence.persistGroupName.
|
# config.sydnix.impermanence.persistGroupName.
|
||||||
extraGroups = [
|
extraGroups = [ "wheel" "persist" "input" "networkmanager" ];
|
||||||
"wheel"
|
|
||||||
"persist"
|
|
||||||
"input"
|
|
||||||
"networkmanager"
|
|
||||||
"xbacklight"
|
|
||||||
];
|
|
||||||
initialHashedPassword =
|
initialHashedPassword =
|
||||||
"$y$j9T$aEFDDwdTZbAc6VQRXrkBJ0$K8wxTGTWDihyX1wxJ.ZMH//wmQFfrGGUkLkxIU0Lyq8";
|
"$y$j9T$aEFDDwdTZbAc6VQRXrkBJ0$K8wxTGTWDihyX1wxJ.ZMH//wmQFfrGGUkLkxIU0Lyq8";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user