feat: Added both AStA autorandr configs

WIP: Started Polybar config
This commit is contained in:
Patrick Großmann 2023-02-04 15:40:33 +01:00
parent 06cc119912
commit 2bd1e6b785
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
8 changed files with 106 additions and 28 deletions

View file

@ -39,9 +39,6 @@
file = ./secrets/iwd/devolo-og.psk.age; file = ./secrets/iwd/devolo-og.psk.age;
path = "/etc/iwd/devolo-og.psk"; path = "/etc/iwd/devolo-og.psk";
}; };
rekey.secrets.test = {
file = ./secrets/test.age;
};
networking.useNetworkd = true; networking.useNetworkd = true;
networking.dhcpcd.enable = false; networking.dhcpcd.enable = false;
@ -87,7 +84,6 @@
}; };
services.autorandr.enable = true; services.autorandr.enable = true;
#TODO sollte nur bestimmte packages sein nicht alle
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
powerManagement.powertop.enable = true; powerManagement.powertop.enable = true;
@ -197,10 +193,6 @@
]; ];
cores = 0; cores = 0;
max-jobs = "auto"; max-jobs = "auto";
# If the yubikey is needed for rekeying my secrets the sandbox need acces to the pcscd daemon socket
# TODO only give the one derivation access to this path
extra-sandbox-paths = lib.mkIf (lib.elem pkgs.age-plugin-yubikey config.rekey.plugins) ["/run/pcscd/"];
}; };
daemonCPUSchedPolicy = "batch"; daemonCPUSchedPolicy = "batch";
daemonIOSchedPriority = 5; daemonIOSchedPriority = 5;

View file

@ -2,16 +2,17 @@
"nodes": { "nodes": {
"agenix": { "agenix": {
"inputs": { "inputs": {
"darwin": "darwin",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1673301561, "lastModified": 1675176355,
"narHash": "sha256-gRUWHbBAtMuPDJQXotoI8u6+3DGBIUZHkyQWpIv7WpM=", "narHash": "sha256-Qjxh5cmN56siY97mzmBLI1+cdjXSPqmfPVsKxBvHmwI=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "42d371d861a227149dc9a7e03350c9ab8b8ddd68", "rev": "b7ffcfe77f817d9ee992640ba1f270718d197f28",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -20,6 +21,28 @@
"type": "github" "type": "github"
} }
}, },
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673295039,
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1667395993,
@ -43,11 +66,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1674771519, "lastModified": 1675462931,
"narHash": "sha256-U0W3S1nX6yEvLh3Vq70EORbmXecAKXfmEfCfaA4A+I8=", "narHash": "sha256-JiOUSERBtA1lN/s9YTKGZoZ3XUicHDwr+C8swaPSh3M=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "bb4b25b302dbf0f527f190461b080b5262871756", "rev": "e2c1756e3ae001ca8696912016dd31cb1503ccf3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -58,11 +81,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1674641431, "lastModified": 1675362331,
"narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=", "narHash": "sha256-VmcnKPj5gJLxWK7Bxlhg2LoQvhKRss7Ax+uoFjd3qKY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9b97ad7b4330aacda9b2343396eb3df8a853b4fc", "rev": "a100acd7bbf105915b0004427802286c37738fef",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -34,7 +34,7 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
} }
agenix.nixosModule agenix.nixosModules.default
{ {
nix.registry = { nix.registry = {
nixpkgs.flake = nixpkgs; nixpkgs.flake = nixpkgs;

View file

@ -1 +0,0 @@
cetiscienrst gnrs ciet

View file

@ -5,18 +5,14 @@
}: { }: {
programs.autorandr = let programs.autorandr = let
dpi_hd = 96; dpi_hd = 96;
dpi_uhd = 192; dpi_uhd = 216;
set_dpi = dpi: "echo 'Xft.dpi: ${toString dpi}' | ${pkgs.xorg.xrdb}/bin/xrdb -merge"; set_dpi = dpi: "echo 'Xft.dpi: ${toString dpi}' | ${pkgs.xorg.xrdb}/bin/xrdb -merge";
eDP-1 = "00ffffffffffff0006afeb3000000000251b0104a5221378020925a5564f9b270c50540000000101010101010101010101010101010152d000a0f0703e803020350058c11000001852d000a0f07095843020350025a51000001800000000000000000000000000000000000000000002001430ff123caa8f0e29aa202020003e"; eDP-1 = "00ffffffffffff0006afeb3000000000251b0104a5221378020925a5564f9b270c50540000000101010101010101010101010101010152d000a0f0703e803020350058c11000001852d000a0f07095843020350025a51000001800000000000000000000000000000000000000000002001430ff123caa8f0e29aa202020003e";
in { # AStA config as function as we want to enable it for two different setups
enable = true; asta_conf = {DP-1-1, DP-1-2}:
profiles.AStA = { {
fingerprint = { fingerprint = {
inherit eDP-1; inherit eDP-1 DP-1-1 DP-1-2;
# AStA linker arbeitsplatz linker Monitor
DP-1-1 = "00ffffffffffff000472ed0688687101111e010380351e782aa135a35b4fa327115054b30c00714f818081c081009500b300d1c001012a4480a070382740082098040f282100001a023a801871382d40582c45000f282100001e000000fd00304b1e5512000a202020202020000000fc00423234375920430a202020202001cf020327f14b9002030411121300001f01230907078301000065030c001000681a00000101304be6023a801871382d40582c45000f282100001e8c0ad08a20e02d10103e96000f2821000018011d007251d01e206e2855000f282100001e8c0ad090204031200c4055000f282100001800000000000000000000000000000000d0";
# AStA linker arbeitsplatz rechter Monitor
DP-1-2 = "00ffffffffffff000472ed0682687101111e010380351e782aa135a35b4fa327115054b30c00714f818081c081009500b300d1c001012a4480a070382740082098040f282100001a023a801871382d40582c45000f282100001e000000fd00304b1e5512000a202020202020000000fc00423234375920430a202020202001d5020327f14b9002030411121300001f01230907078301000065030c001000681a00000101304be6023a801871382d40582c45000f282100001e8c0ad08a20e02d10103e96000f2821000018011d007251d01e206e2855000f282100001e8c0ad090204031200c4055000f282100001800000000000000000000000000000000d0";
}; };
config = { config = {
eDP-1 = { eDP-1 = {
@ -43,6 +39,20 @@
}; };
hooks.postswitch = set_dpi dpi_hd; hooks.postswitch = set_dpi dpi_hd;
}; };
in {
enable = true;
profiles.AStA_links = asta_conf {
# AStA linker arbeitsplatz linker Monitor
DP-1-1 = "00ffffffffffff000472ed0688687101111e010380351e782aa135a35b4fa327115054b30c00714f818081c081009500b300d1c001012a4480a070382740082098040f282100001a023a801871382d40582c45000f282100001e000000fd00304b1e5512000a202020202020000000fc00423234375920430a202020202001cf020327f14b9002030411121300001f01230907078301000065030c001000681a00000101304be6023a801871382d40582c45000f282100001e8c0ad08a20e02d10103e96000f2821000018011d007251d01e206e2855000f282100001e8c0ad090204031200c4055000f282100001800000000000000000000000000000000d0";
# AStA linker arbeitsplatz rechter Monitor
DP-1-2 = "00ffffffffffff000472ed0682687101111e010380351e782aa135a35b4fa327115054b30c00714f818081c081009500b300d1c001012a4480a070382740082098040f282100001a023a801871382d40582c45000f282100001e000000fd00304b1e5512000a202020202020000000fc00423234375920430a202020202001d5020327f14b9002030411121300001f01230907078301000065030c001000681a00000101304be6023a801871382d40582c45000f282100001e8c0ad08a20e02d10103e96000f2821000018011d007251d01e206e2855000f282100001e8c0ad090204031200c4055000f282100001800000000000000000000000000000000d0";
};
profiles.AStA_rechts = asta_conf{
# AStA rechter arbeitsplatz linker Monitor
DP-1-1 = "00ffffffffffff000472ed068d687101111e010380351e782aa135a35b4fa327115054b30c00714f818081c081009500b300d1c001012a4480a070382740082098040f282100001a023a801871382d40582c45000f282100001e000000fd00304b1e5512000a202020202020000000fc00423234375920430a202020202001ca020327f14b9002030411121300001f01230907078301000065030c001000681a00000101304be6023a801871382d40582c45000f282100001e8c0ad08a20e02d10103e96000f2821000018011d007251d01e206e2855000f282100001e8c0ad090204031200c4055000f282100001800000000000000000000000000000000d0";
# AStA rechter arbeitsplatz rechter Monitor
DP-1-2 = "00ffffffffffff000472ed0680687101111e010380351e782aa135a35b4fa327115054b30c00714f818081c081009500b300d1c001012a4480a070382740082098040f282100001a023a801871382d40582c45000f282100001e000000fd00304b1e5512000a202020202020000000fc00423234375920430a202020202001d7020327f14b9002030411121300001f01230907078301000065030c001000681a00000101304be6023a801871382d40582c45000f282100001e8c0ad08a20e02d10103e96000f2821000018011d007251d01e206e2855000f282100001e8c0ad090204031200c4055000f282100001800000000000000000000000000000000d0";
};
profiles.laptop = { profiles.laptop = {
fingerprint = { fingerprint = {
inherit eDP-1; inherit eDP-1;

View file

@ -66,6 +66,9 @@
"localhost" = { "localhost" = {
inherit identityFile; inherit identityFile;
}; };
"gitlab.lrz.de" = {
inherit identityFile;
};
"*" = { "*" = {
identitiesOnly = true; identitiesOnly = true;
}; };

50
users/common/polybar.nix Normal file
View file

@ -0,0 +1,50 @@
{
config,
...
}:
let
color = {
bground = ;
fground = ;
in
{
services.polybar = {
enable = true;
settings = {
"bar/main" = {
monitor = "DP-1";
monitro.fallback = "eDP-1";
bottom = true;
dpi = 96;
heigh = 22;
background = color.bground;
foreground = color.fground;
font = {
0 = "FiraCode Nerd Font Mono:style=Medium:size=13";
1 = "";
2 = "Iosevka Nerd Font:style=Medium:size=16";
3 = "Font Awesome 5 Pro:style=Solid:size=13";
4 = "Font Awesome 5 Pro:style=Regular:size=13";
5 = "Font Awesome 5 Pro:style=Light:size=13";
};
modules = {
left = [ "icon" "left1" "title" "left2" ];
center = [ "workspaces" ];
right = [ "right5" "alsa" "right4" "battery" "right3" "network" "date" "right1" "keyboardswitcher" ];
};
tray = {
position = "right";
background = color.shade1;
};
enable.ipc = true;
};
};
}

View file

@ -8,6 +8,7 @@
common/herbstluftwm.nix common/herbstluftwm.nix
common/autorandr.nix common/autorandr.nix
common/desktop.nix common/desktop.nix
# common/polybar.nix
./common ./common
]; ];