Add starlight scripts
This commit is contained in:
parent
fa2011b8ae
commit
a8a3368ca9
|
@ -12,10 +12,11 @@
|
||||||
networking.hostName = "mistmane";
|
networking.hostName = "mistmane";
|
||||||
programs.light.enable = true;
|
programs.light.enable = true;
|
||||||
system.stateVersion = "20.09";
|
system.stateVersion = "20.09";
|
||||||
|
|
||||||
security.pam.enableEcryptfs = true;
|
security.pam.enableEcryptfs = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
ecryptfs ecryptfs-helper
|
ecryptfs
|
||||||
|
ecryptfs-helper
|
||||||
foot
|
foot
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -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";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -80,9 +81,9 @@
|
||||||
home-manager.users.artemis = {
|
home-manager.users.artemis = {
|
||||||
programs.mpv.defaultProfiles = [ "gpu-hq" ];
|
programs.mpv.defaultProfiles = [ "gpu-hq" ];
|
||||||
wayland.windowManager.sway.config.output = {
|
wayland.windowManager.sway.config.output = {
|
||||||
"DP-1" = {pos = "0 0"; mode = "3840x2160@59.997Hz"; scale = "2"; };
|
"DP-1" = { pos = "0 0"; mode = "3840x2160@59.997Hz"; scale = "2"; };
|
||||||
"DP-2" = {pos = "1920 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"; };
|
"HDMI-A-1" = { pos = "3840 0"; mode = "3840x2160@60Hz"; scale = "2"; };
|
||||||
};
|
};
|
||||||
# no toTOML generator so I guess we have to do this
|
# no toTOML generator so I guess we have to do this
|
||||||
xdg.configFile."rustybar/config.toml".text = ''
|
xdg.configFile."rustybar/config.toml".text = ''
|
||||||
|
|
35
system/starlight/scripts.nix
Normal file
35
system/starlight/scripts.nix
Normal 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"
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in a new issue