Add starlight scripts

This commit is contained in:
Artemis Tosini 2021-08-26 18:06:46 +00:00
parent fa2011b8ae
commit a8a3368ca9
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
4 changed files with 48 additions and 8 deletions

View file

@ -15,7 +15,8 @@
security.pam.enableEcryptfs = true; security.pam.enableEcryptfs = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
ecryptfs ecryptfs-helper ecryptfs
ecryptfs-helper
foot foot
]; ];
} }

View file

@ -5,7 +5,8 @@
{ {
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "usbhid" "usb_storage" ]; boot.initrd.availableKernelModules = [ "nvme" "usbhid" "usb_storage" ];
@ -14,12 +15,14 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/ee6d20e7-03ec-462b-a28a-3e970acc5f0a"; {
device = "/dev/disk/by-uuid/ee6d20e7-03ec-462b-a28a-3e970acc5f0a";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/ef0ee32a-8ee0-4c4a-af21-d033ac2bb774"; {
device = "/dev/disk/by-uuid/ef0ee32a-8ee0-4c4a-af21-d033ac2bb774";
fsType = "ext4"; fsType = "ext4";
}; };

View file

@ -4,6 +4,7 @@
imports = [ imports = [
./boot-config.nix ./boot-config.nix
./hardware-configuration.nix ./hardware-configuration.nix
./scripts.nix
../../private/starlight.nix ../../private/starlight.nix
../../sets/builder.nix ../../sets/builder.nix
../../sets/cpu/amd.nix ../../sets/cpu/amd.nix

View file

@ -0,0 +1,35 @@
{ pkgs, lib, ... }:
let
swayPrelude = ''
#! ${pkgs.runtimeShell}
PATH=${pkgs.sway}/bin
'';
in
{
home-manager.users.artemis.home.packages = [
(pkgs.writeScriptBin "work" ''
${swayPrelude}
swaymsg "output DP-1 disable"
swaymsg "output DP-2 disable"
swaymsg "output HDMI-A-1 enable mode 3840x2160 scale 2 pos 0 0"
'')
(pkgs.writeScriptBin "miniwork" ''
${swayPrelude}
swaymsg "output DP-1 disable"
swaymsg "output DP-2 enable mode 3840x2160 scale 2 pos 0 0"
swaymsg "output HDMI-A-1 enable mode 3840x2160 scale 2 pos 1920 0"
'')
(pkgs.writeScriptBin "game" ''
${swayPrelude}
swaymsg "output DP-1 enable mode 3840x2160 scale 2 pos 0 0"
swaymsg "output DP-2 enable mode 3840x2160 scale 1 pos 1920 0"
swaymsg "output HDMI-A-1 enable mode 3840x2160 scale 2 pos 5760 0"
'')
(pkgs.writeScriptBin "nogame" ''
${swayPrelude}
swaymsg "output DP-1 enable mode 3840x2160 scale 2 pos 0 0"
swaymsg "output DP-2 enable mode 3840x2160 scale 2 pos 1920 0"
swaymsg "output HDMI-A-1 enable mode 3840x2160 scale 2 pos 3840 0"
'')
];
}