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

@ -12,10 +12,11 @@
networking.hostName = "mistmane";
programs.light.enable = true;
system.stateVersion = "20.09";
security.pam.enableEcryptfs = true;
environment.systemPackages = with pkgs; [
ecryptfs ecryptfs-helper
ecryptfs
ecryptfs-helper
foot
];
}

View file

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

View file

@ -4,6 +4,7 @@
imports = [
./boot-config.nix
./hardware-configuration.nix
./scripts.nix
../../private/starlight.nix
../../sets/builder.nix
../../sets/cpu/amd.nix
@ -80,9 +81,9 @@
home-manager.users.artemis = {
programs.mpv.defaultProfiles = [ "gpu-hq" ];
wayland.windowManager.sway.config.output = {
"DP-1" = {pos = "0 0"; mode = "3840x2160@59.997Hz"; scale = "2"; };
"DP-2" = {pos = "1920 0"; mode = "3840x2160@59.997Hz"; scale = "2"; };
"HDMI-A-1" = {pos = "3840 0"; mode = "3840x2160@60Hz"; scale = "2"; };
"DP-1" = { pos = "0 0"; mode = "3840x2160@59.997Hz"; scale = "2"; };
"DP-2" = { pos = "1920 0"; mode = "3840x2160@59.997Hz"; scale = "2"; };
"HDMI-A-1" = { pos = "3840 0"; mode = "3840x2160@60Hz"; scale = "2"; };
};
# no toTOML generator so I guess we have to do this
xdg.configFile."rustybar/config.toml".text = ''

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"
'')
];
}