feat: add p330 config

main
mandlm 2022-07-07 15:33:38 +02:00
parent e7711fe634
commit 0efab4c6bd
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
10 changed files with 146 additions and 12 deletions

View File

@ -36,9 +36,6 @@
services.resolved = {
enable = true;
extraConfig = ''
DNS = 192.168.178.249
'';
dnssec = "false";
};

View File

@ -50,7 +50,34 @@
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user; };
home-manager.users.${user} = {
imports = [ ./home-${user}.nix ];
imports = [
./home-${user}.nix
./machines/apache/home-${user}.nix
];
};
}
];
};
p330 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
modules = [
./configuration.nix
./users.nix
./machines/p330/configuration.nix
./machines/p330/hardware-configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user; };
home-manager.users.${user} = {
imports = [
./home-${user}.nix
./machines/p330/home-${user}.nix
];
};
}
];

View File

@ -1,5 +1,10 @@
{ config, lib, pkgs, user, ... }:
let
cfg = config.xsession.windowManager.i3;
font.name = "DejaVu Sans Mono";
font.size = 12.0;
in
{
imports = [
./i3status-rust.nix
@ -19,8 +24,8 @@
terminal = "${pkgs.kitty}/bin/kitty";
fonts = {
names = [ "DejaVu Sans Mono" ];
size = 12.0;
names = [ font.name ];
size = font.size;
};
window = {
@ -41,13 +46,17 @@
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-default.toml";
fonts = {
names = [ "DejaVu Sans Mono" ];
size = 12.0;
names = [ font.name ];
size = font.size;
};
}];
defaultWorkspace = "workspace number 1";
keybindings = lib.mkOptionDefault {
"${cfg.config.modifier}+Shift+o" = "exec xdg-open \"zoommtg://zoom.us/join?action=join&confno=4861587170&pwd=ZVk3aHphcWppY21ONjZOMVh6STN6dz09\"";
};
startup = [
{ command = "i3-msg 'workspace 1; append_layout ~/.config/i3/workspaces/workspace-1.json'"; }
{ command = "i3-msg 'workspace 2; append_layout ~/.config/i3/workspaces/workspace-2.json'"; }
@ -63,10 +72,11 @@
{ command = "telegram-desktop"; notification = false; }
{ command = "thunderbird"; notification = false; }
{ command = "whatsapp-for-linux"; notification = false; }
{ command = "zoom"; notification = false; }
];
assigns = {
"6" = [{ class = "^zoom$"; }];
"6" = [{ class = "^\.zoom $"; }];
};
};
};

View File

@ -4,10 +4,9 @@
programs = {
kitty = {
enable = true;
theme = "Solarized Light";
theme = "Solarized Dark";
font = {
name = "DejaVu Sans Mono";
size = 12;
};
settings = {
tab_bar_style = "powerline";

View File

@ -1,2 +1,2 @@
vim.opt.background = 'light'
vim.opt.background = 'dark'
vim.cmd("colorscheme solarized")

View File

@ -27,6 +27,7 @@
light
element-desktop
difftastic
zoom-us
];
stateVersion = "22.05";

View File

@ -0,0 +1,5 @@
{ config, lib, pkgs, user, ... }:
{
programs.kitty.font.size = 12;
}

View File

@ -0,0 +1,27 @@
{ config, pkgs, ... }:
{
networking.hostName = "p330";
boot.loader.grub.enableCryptodisk = true;
services.xserver = {
videoDrivers = [ "intel" ];
dpi = 144;
xrandrHeads = [
{
output = "DP2";
primary = true;
monitorConfig = ''
Option "Position" "0 790"
'';
}
{
output = "DP3";
monitorConfig = ''
Option "Position" "3840 0"
Option "Rotate" "right"
'';
}
];
};
}

View File

@ -0,0 +1,48 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices = {
crypted = {
device = "/dev/disk/by-uuid/c24c9fba-fa0b-41a2-87c1-75edc7b3f64d";
preLVM = true;
};
};
fileSystems."/" =
{
device = "/dev/disk/by-uuid/9c6e1dc3-a442-431d-8cf4-6eaf1e45c296";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/3B69-8F97";
fsType = "vfat";
};
fileSystems."/home" =
{
device = "/dev/disk/by-uuid/6a44edab-e602-40e9-85c4-cb8517862992";
fsType = "ext4";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/b90199d6-05e8-4994-bf9d-7b07f10d583e"; }];
networking.interfaces.eno1.useDHCP = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
}

View File

@ -0,0 +1,20 @@
{ config, lib, pkgs, user, ... }:
{
xsession.windowManager.i3.config = {
workspaceOutputAssign = [
{ workspace = "1"; output = "DP3"; }
{ workspace = "2"; output = "DP2"; }
{ workspace = "3"; output = "DP3"; }
{ workspace = "4"; output = "DP2"; }
{ workspace = "5"; output = "DP3"; }
{ workspace = "6"; output = "DP2"; }
{ workspace = "7"; output = "DP3"; }
{ workspace = "8"; output = "DP2"; }
{ workspace = "9"; output = "DP3"; }
{ workspace = "10"; output = "DP2"; }
];
};
programs.kitty.font.size = 16;
}