Changes
This commit is contained in:
parent
534e199de1
commit
50d5f6b778
@ -1 +1 @@
|
|||||||
Subproject commit 213169b97b2e2d20366339708b310f560013b669
|
Subproject commit a7d4b8e513a06846aa6f320e181d5b9dc53dc07a
|
@ -30,7 +30,11 @@ btrfs subvolume create /mnt/var
|
|||||||
mkdir /mnt/boot
|
mkdir /mnt/boot
|
||||||
mount $BOOT_PARTITION /mnt/boot
|
mount $BOOT_PARTITION /mnt/boot
|
||||||
# create swap
|
# create swap
|
||||||
mkfs.ext2 -L $SWAP_NAME $SWAP_PARTITION 1M
|
dd count=1 bs=256 if=/dev/urandom of=/mnt/root/swap.key
|
||||||
|
cryptsetup --type luks2 --cipher aes-xts-plain64 --key-size 256 --hash sha512 --key-file /mnt/root/swap.key luksFormat $SWAP_PARTITION
|
||||||
|
cryptsetup --key-file /mnt/root/swap.key luksOpen $SWAP_PARTITION $SWAP_NAME
|
||||||
|
mkswap -L swap /dev/mapper/cryptswap
|
||||||
|
swapon -L swap
|
||||||
nixos-generate-config --root /mnt/
|
nixos-generate-config --root /mnt/
|
||||||
cp ./min-config.nix /mnt/etc/nixos/configuration.nix
|
cp ./min-config.nix /mnt/etc/nixos/configuration.nix
|
||||||
nano /mnt/etc/nixos/configuration.nix
|
nano /mnt/etc/nixos/configuration.nix
|
||||||
|
@ -22,6 +22,8 @@ with deviceSpecific; {
|
|||||||
# Samba support
|
# Samba support
|
||||||
cifs-utils
|
cifs-utils
|
||||||
# Utils
|
# Utils
|
||||||
|
pciutils
|
||||||
|
usbutils
|
||||||
nix-prefetch-git
|
nix-prefetch-git
|
||||||
hdparm
|
hdparm
|
||||||
vdpauinfo
|
vdpauinfo
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
with rec {
|
with rec {
|
||||||
inherit (config) deviceSpecific secrets;
|
inherit (config) device deviceSpecific secrets;
|
||||||
};
|
};
|
||||||
with deviceSpecific; {
|
with deviceSpecific; {
|
||||||
|
boot.resumeDevice = "/dev/mapper/cryptswap";
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/" = {
|
"/" = {
|
||||||
options = if isSSD then
|
options = if isSSD then
|
||||||
@ -67,4 +68,18 @@ with deviceSpecific; {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/dev/mapper/cryptswap";
|
||||||
|
encrypted = {
|
||||||
|
enable = true;
|
||||||
|
keyFile = "/mnt-root/root/swap.key";
|
||||||
|
label = "cryptswap";
|
||||||
|
blkDev = if device == "Dell-Laptop" then
|
||||||
|
"/dev/disk/by-uuid/c623d956-d0ea-4626-8e0c-5092bbbf3b0c"
|
||||||
|
else
|
||||||
|
"";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
@ -39,11 +39,13 @@ with deviceSpecific; {
|
|||||||
pkgs.linuxPackages
|
pkgs.linuxPackages
|
||||||
else
|
else
|
||||||
pkgs.linuxPackages_latest;
|
pkgs.linuxPackages_latest;
|
||||||
boot.zfs.enableUnstable = true; # For latest kernel
|
|
||||||
boot.supportedFilesystems = [ "ntfs" ];
|
boot.supportedFilesystems = [ "ntfs" ];
|
||||||
boot.blacklistedKernelModules = lib.mkIf (device == "Dell-Laptop") [
|
boot.blacklistedKernelModules = lib.mkIf (device == "Dell-Laptop") [
|
||||||
"psmouse"
|
"psmouse"
|
||||||
];
|
];
|
||||||
|
boot.kernelParams = lib.mkIf (device == "Dell-Laptop") [
|
||||||
|
"mem_sleep_default=deep"
|
||||||
|
];
|
||||||
|
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
|
@ -72,12 +72,12 @@ in {
|
|||||||
script = name: content: "exec ${pkgs.writeScript name content}";
|
script = name: content: "exec ${pkgs.writeScript name content}";
|
||||||
workspaces = (builtins.genList (x: [ (toString x) (toString x) ]) 10)
|
workspaces = (builtins.genList (x: [ (toString x) (toString x) ]) 10)
|
||||||
++ [ [ "c" "" ] [ "t" "" ] [ "m" "ﱘ" ] ];
|
++ [ [ "c" "" ] [ "t" "" ] [ "m" "ﱘ" ] ];
|
||||||
moveMouse = ''
|
# moveMouse = ''
|
||||||
"sh -c 'eval `${pkgs.xdotool}/bin/xdotool \
|
# "sh -c 'eval `${pkgs.xdotool}/bin/xdotool \
|
||||||
getactivewindow \
|
# getactivewindow \
|
||||||
getwindowgeometry --shell`; ${pkgs.xdotool}/bin/xdotool \
|
# getwindowgeometry --shell`; ${pkgs.xdotool}/bin/xdotool \
|
||||||
mousemove \
|
# mousemove \
|
||||||
$((X+WIDTH/2)) $((Y+HEIGHT/2))'"'';
|
# $((X+WIDTH/2)) $((Y+HEIGHT/2))'"'';
|
||||||
in ({
|
in ({
|
||||||
"${modifier}+q" = "kill";
|
"${modifier}+q" = "kill";
|
||||||
"${modifier}+w" = "exec ${apps.dmenu.cmd}";
|
"${modifier}+w" = "exec ${apps.dmenu.cmd}";
|
||||||
@ -85,14 +85,22 @@ in {
|
|||||||
"${modifier}+e" = "exec ${apps.editor.cmd}";
|
"${modifier}+e" = "exec ${apps.editor.cmd}";
|
||||||
"${modifier}+l" = "layout toggle all";
|
"${modifier}+l" = "layout toggle all";
|
||||||
|
|
||||||
"${modifier}+Left" = "focus child; focus left; ${moveMouse}";
|
"${modifier}+Left" = "focus child; focus left";
|
||||||
"${modifier}+Right" = "focus child; focus right; ${moveMouse}";
|
"${modifier}+Right" = "focus child; focus right";
|
||||||
"${modifier}+Up" = "focus child; focus up; ${moveMouse}";
|
"${modifier}+Up" = "focus child; focus up";
|
||||||
"${modifier}+Down" = "focus child; focus down; ${moveMouse}";
|
"${modifier}+Down" = "focus child; focus down";
|
||||||
"${modifier}+Control+Left" = "focus parent; focus left; ${moveMouse}";
|
"${modifier}+Control+Left" = "focus parent; focus left";
|
||||||
"${modifier}+Control+Right" = "focus parent; focus right; ${moveMouse}";
|
"${modifier}+Control+Right" = "focus parent; focus right";
|
||||||
"${modifier}+Control+Up" = "focus parent; focus up; ${moveMouse}";
|
"${modifier}+Control+Up" = "focus parent; focus up";
|
||||||
"${modifier}+Control+Down" = "focus parent; focus down; ${moveMouse}";
|
# "${modifier}+Control+Down" = "focus parent; focus down; ${moveMouse}";
|
||||||
|
# "${modifier}+Left" = "focus child; focus left; ${moveMouse}";
|
||||||
|
# "${modifier}+Right" = "focus child; focus right; ${moveMouse}";
|
||||||
|
# "${modifier}+Up" = "focus child; focus up; ${moveMouse}";
|
||||||
|
# "${modifier}+Down" = "focus child; focus down; ${moveMouse}";
|
||||||
|
# "${modifier}+Control+Left" = "focus parent; focus left; ${moveMouse}";
|
||||||
|
# "${modifier}+Control+Right" = "focus parent; focus right; ${moveMouse}";
|
||||||
|
# "${modifier}+Control+Up" = "focus parent; focus up; ${moveMouse}";
|
||||||
|
# "${modifier}+Control+Down" = "focus parent; focus down; ${moveMouse}";
|
||||||
"${modifier}+Shift+Up" = "move up";
|
"${modifier}+Shift+Up" = "move up";
|
||||||
"${modifier}+Shift+Down" = "move down";
|
"${modifier}+Shift+Down" = "move down";
|
||||||
"${modifier}+Shift+Right" = "move right";
|
"${modifier}+Shift+Right" = "move right";
|
||||||
|
@ -12,6 +12,11 @@
|
|||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
|
|
||||||
services.udiskie.enable = true;
|
services.udiskie.enable = true;
|
||||||
|
services.screen-locker = {
|
||||||
|
enable = true;
|
||||||
|
inactiveInterval = 15; # Minutes
|
||||||
|
lockCmd = "${pkgs.i3lock-fancy}/bin/i3lock-fancy -f Roboto-Medium";
|
||||||
|
};
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userEmail = "alukard.develop@gmail.com";
|
userEmail = "alukard.develop@gmail.com";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user