diff --git a/hosts/fruitbook/configuration.nix b/hosts/fruitbook/configuration.nix index d67dd64..17f6c4d 100644 --- a/hosts/fruitbook/configuration.nix +++ b/hosts/fruitbook/configuration.nix @@ -11,7 +11,6 @@ wifi.enable = true; stylix.enable = true; niri.enable = true; - xbacklight-permissions.enable = true; users.users = [ "crumb" ]; diff --git a/hosts/fruitbook/disks.nix b/hosts/fruitbook/disks.nix new file mode 100755 index 0000000..9d4f33a --- /dev/null +++ b/hosts/fruitbook/disks.nix @@ -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"; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/modules/home/users/crumb/niri.nix b/modules/home/users/crumb/niri.nix index 12806ca..972042a 100644 --- a/modules/home/users/crumb/niri.nix +++ b/modules/home/users/crumb/niri.nix @@ -73,7 +73,7 @@ in { spawn-at-startup = [{ 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"]; }] ++ lib.optional (! builtins.isNull cfg.wallpaper) @@ -175,7 +175,7 @@ in { { title = "Discord.*@"; } ]; excludes = [ - # ...except when explicitly targeting the window. + # ... except when explicitly targeting the window. { is-window-cast-target = true; } ]; block-out-from = "screen-capture"; @@ -226,9 +226,8 @@ in { binds = { "Mod+Q".action.close-window = []; "Mod+Shift+Q".action.quit = []; - "Mod+Ctrl+L".action.spawn = [ (lib.getExe pkgs.swaylock) ]; - "Mod+D".action.spawn = [ (lib.getExe pkgs.fuzzel) ]; - "XF86LaunchB".action.spawn = [ (lib.getExe pkgs.fuzzel) ]; + "Mod+Ctrl+L".action.spawn = ["${pkgs.swaylock}/bin/swaylock"]; + "Mod+D".action.spawn = ["${pkgs.fuzzel}/bin/fuzzel"]; "Mod+Shift+Slash".action.show-hotkey-overlay = []; # 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+K".action.move-window-up = []; "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+2".action.focus-workspace = [2]; "Mod+3".action.focus-workspace = [3]; diff --git a/modules/nixos/xbacklight-permissions.nix b/modules/nixos/xbacklight-permissions.nix deleted file mode 100644 index 7080816..0000000 --- a/modules/nixos/xbacklight-permissions.nix +++ /dev/null @@ -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); - }; -} diff --git a/users/crumb/default.nix b/users/crumb/default.nix index 42f3102..04c99ef 100755 --- a/users/crumb/default.nix +++ b/users/crumb/default.nix @@ -3,13 +3,7 @@ isNormalUser = true; # TODO: Don't hard-code `persist`. Use # config.sydnix.impermanence.persistGroupName. - extraGroups = [ - "wheel" - "persist" - "input" - "networkmanager" - "xbacklight" - ]; + extraGroups = [ "wheel" "persist" "input" "networkmanager" ]; initialHashedPassword = "$y$j9T$aEFDDwdTZbAc6VQRXrkBJ0$K8wxTGTWDihyX1wxJ.ZMH//wmQFfrGGUkLkxIU0Lyq8";