add work laptop

This commit is contained in:
tristan 2023-04-15 12:46:15 +01:00
parent f96e27fecd
commit c0466602b7
8 changed files with 83 additions and 20 deletions

View file

@ -20,6 +20,7 @@
in { in {
nixosConfigurations = { nixosConfigurations = {
zenix = mkConf "zenix" { inherit nixpkgs system user home-manager; }; zenix = mkConf "zenix" { inherit nixpkgs system user home-manager; };
FCS-Tristan-Nixbook = mkConf "work" { inherit nixpkgs system user home-manager; };
}; };
}; };
} }

View file

@ -32,6 +32,8 @@
security.doas.enable = true; security.doas.enable = true;
i18n.defaultLocale = "en_GB.UTF-8";
# Configure graphical stuff # Configure graphical stuff
services.xserver = { services.xserver = {
enable = true; enable = true;

48
hardware/work.nix Normal file
View file

@ -0,0 +1,48 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/48a07e82-1090-448c-a751-3a410afba0f7";
fsType = "btrfs";
options = [ "subvol=@" "compress=zstd" "autodefrag" ];
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/570cc51f-bd5c-4bee-a18f-f6aabaf60881";
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/48a07e82-1090-448c-a751-3a410afba0f7";
fsType = "btrfs";
options = [ "subvol=@home" "compress=zstd" "autodefrag" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/EED9-A165";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp53s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp54s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -201,6 +201,7 @@
]; ];
userSettings = { userSettings = {
"vscode-neovim.neovimExecutablePaths.linux" = "/run/current-system/sw/bin/nvim"; "vscode-neovim.neovimExecutablePaths.linux" = "/run/current-system/sw/bin/nvim";
"keyboard.dispatch" = "keyCode";
}; };
}; };
@ -211,6 +212,7 @@
notmuch.enable = true; notmuch.enable = true;
neomutt.enable = true; neomutt.enable = true;
mbsync.enable = true; mbsync.enable = true;
mbsync.create = "maildir";
userName = "tristan@tristans.cloud"; userName = "tristan@tristans.cloud";
realName = "Tristan"; realName = "Tristan";
address = "tristan@tristans.cloud"; address = "tristan@tristans.cloud";

View file

@ -7,15 +7,15 @@ monitor=HDMI-A-1,1920x1080@60,1920x0,1
input { input {
kb_file= kb_file=
kb_layout=gb kb_layout=gb
#kb_variant=dvorak kb_variant=dvorak
kb_model= kb_model=
#kb_options=caps:escape kb_options=caps:escape
kb_rules= kb_rules=
follow_mouse=1 follow_mouse=1
touchpad { touchpad {
natural_scroll=no natural_scroll=yes
} }
sensitivity=0 sensitivity=0
@ -57,24 +57,14 @@ dwindle {
} }
gestures { gestures {
workspace_swipe=no workspace_swipe=yes
} }
# example window rules
# for windows named/classed as abc and xyz
#windowrule=move 69 420,abc
#windowrule=size 420 69,abc
#windowrule=tile,xyz
#windowrule=float,abc
#windowrule=pseudo,abc
#windowrule=monitor 0,xyz
# some nice mouse binds
bindm=SUPER,mouse:272,movewindow bindm=SUPER,mouse:272,movewindow
bindm=SUPER,mouse:273,resizewindow bindm=SUPER,mouse:273,resizewindow
bind=SUPER,RETURN,exec,foot bind=SUPER,RETURN,exec,foot
bind=SUPER_SHIFT,X,killactive, bind=SUPER_SHIFT,Q,killactive,
bind=SUPER,M,exec,foot -e ncmpcpp bind=SUPER,M,exec,foot -e ncmpcpp
bind=SUPER,E,exec,foot -e neomutt bind=SUPER,E,exec,foot -e neomutt
bind=SUPER,O,exec,pcmanfm bind=SUPER,O,exec,pcmanfm
@ -88,7 +78,6 @@ bind=SUPER,slash,exec,brave
bind=SUPER,V,togglefloating, bind=SUPER,V,togglefloating,
bind=SUPER,F,fullscreen, bind=SUPER,F,fullscreen,
bind=SUPER,d,exec,wofi --show drun bind=SUPER,d,exec,wofi --show drun
#bind=SUPER,d,exec,nwg-drawer
bind=SUPER_SHIFT,P,exec,bwmenu bind=SUPER_SHIFT,P,exec,bwmenu
bind=SUPER,apostrophe,exec,notify-send -i mpv "$(playerctl metadata --format '{{title}}')" "$(playerctl metadata --format '{{album}}')" -t 3000 bind=SUPER,apostrophe,exec,notify-send -i mpv "$(playerctl metadata --format '{{title}}')" "$(playerctl metadata --format '{{album}}')" -t 3000
bind=SUPER_SHIFT,E,exit, bind=SUPER_SHIFT,E,exit,

View file

@ -4,11 +4,10 @@ nextcloud &
waybar & waybar &
swaybg \ swaybg \
-o eDP-1 -i ~/Pictures/backgrounds/nix-wallpaper-waterfall.png \
-o DP-1 -i ~/Pictures/backgrounds/demonslayer.jpg \ -o DP-1 -i ~/Pictures/backgrounds/demonslayer.jpg \
-o HDMI-A-1 -i ~/Pictures/backgrounds/nier.jpg & -o HDMI-A-1 -i ~/Pictures/backgrounds/nier.jpg &
swayidle -w \ swayidle -w \
timeout 600 'swaylock &' & # swaymsg dunt work \ timeout 600 'swaylock &' &
# timeout 400 'swaymsg "output * dpms off"' \
# resume 'swaymsg "output * dpms on"' &

23
system/work.nix Normal file
View file

@ -0,0 +1,23 @@
# https://search.nixos.org/options
{ config, pkgs, ... }:
{
networking.hostName = "FCS-Tristan-Nixbook";
console = {
font = "Lat2-Terminus16";
useXkbConfig = true;
};
services.xserver = {
layout = "gb";
xkbVariant = "dvorak";
xkbOptions = "caps:escape";
};
networking.firewall.allowedTCPPorts = [ ];
system.stateVersion = "22.11"; # do not change
}

View file

@ -5,7 +5,6 @@
networking.hostName = "zenix"; networking.hostName = "zenix";
i18n.defaultLocale = "en_GB.UTF-8";
console = { console = {
font = "Lat2-Terminus16"; font = "Lat2-Terminus16";
}; };