This commit is contained in:
dusk 2020-11-22 18:34:10 +03:00
parent 72b9f757ed
commit 258e31048d
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
3 changed files with 94 additions and 101 deletions

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, modulesPath, nixosPersistence, ... }: { config, lib, pkgs, modulesPath, nixosPersistence, ... }:
let let
btrfsPartPath = "/dev/disk/by-uuid/9a2ac687-7937-4ffa-9b59-8b5c13026466"; btrfsPartPath = "/dev/disk/by-label/NIXOS";
btrfsOptions = [ "compress-force=zstd" "noatime" ]; btrfsOptions = [ "compress-force=zstd" "noatime" ];
btrfsDiff = pkgs.writeScriptBin "btrfs-diff" '' btrfsDiff = pkgs.writeScriptBin "btrfs-diff" ''
@ -83,6 +83,12 @@ in {
options = [ "subvol=home" ] ++ btrfsOptions; options = [ "subvol=home" ] ++ btrfsOptions;
}; };
fileSystems."/media/archive" = {
device = "/dev/disk/by-uuid/f9b5f7f3-51e8-4357-8518-986b16311c71";
fsType = "btrfs";
options = btrfsOptions;
};
fileSystems."/nix" = { fileSystems."/nix" = {
device = btrfsPartPath; device = btrfsPartPath;
fsType = "btrfs"; fsType = "btrfs";
@ -96,13 +102,6 @@ in {
neededForBoot = true; neededForBoot = true;
}; };
fileSystems."/var/log" = {
device = btrfsPartPath;
fsType = "btrfs";
options = [ "subvol=log" ] ++ btrfsOptions;
neededForBoot = true;
};
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5784-BBB1"; device = "/dev/disk/by-uuid/5784-BBB1";
fsType = "vfat"; fsType = "vfat";
@ -147,23 +146,20 @@ in {
support32Bit = true; support32Bit = true;
}; };
}; };
# virtualisation.docker.enable = true;
environment = { environment = {
systemPackages = [ btrfsDiff ]; systemPackages = [ btrfsDiff ];
persistence."/persist" = { persistence."/persist" = {
directories = [ "/etc/nixos" "/var/lib/docker/" ]; directories = [ "/etc/nixos" ];
files = [ "/etc/machine-id" ]; files = [ "/etc/machine-id" ];
}; };
}; };
networking.interfaces.enp6s0.useDHCP = true; networking.interfaces.enp6s0.useDHCP = true;
services.xserver = { # services.xserver = {
enable = true; # enable = true;
# displayManager.gdm.enable = true; # videoDrivers = [ "amdgpu" ];
# desktopManager.gnome3.enable = true; # };
videoDrivers = [ "amdgpu" ];
};
system.stateVersion = "20.09"; system.stateVersion = "20.09";
} }

View File

@ -14,12 +14,6 @@ let
fontComb = "${font} ${toString fontSize}"; fontComb = "${font} ${toString fontSize}";
fontPackage = pkgs.iosevka; fontPackage = pkgs.iosevka;
wallpaper = pkgs.fetchurl {
url = "https://static.zerochan.net/Mayer.%28Arknights%29.full.2724381.jpg";
hash = "sha256-W/nr3Ukm1pNoMWfebYiQ3v3i9OSH98PVV3tqTwRVbSU=";
name = "wallpaper";
};
kideSrc = pkgs.fetchgit { kideSrc = pkgs.fetchgit {
url = "https://gitlab.com/yusdacra/kide.git"; url = "https://gitlab.com/yusdacra/kide.git";
rev = "c4116d433add520d8e18382e0bfee9c49bf67fd0"; rev = "c4116d433add520d8e18382e0bfee9c49bf67fd0";
@ -158,11 +152,14 @@ in {
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home = { home = {
homeDirectory = nixosConfig.users.users.patriot.home; homeDirectory = nixosConfig.users.users.patriot.home;
packages = packages = with pkgs;
with pkgs;
[ [
darcs
discord discord
fontPackage fontPackage
noto-fonts-cjk
font-awesome
nerdfonts
bitwarden bitwarden
pfetch pfetch
neofetch neofetch
@ -180,16 +177,13 @@ in {
# x11 docker stuff # x11 docker stuff
# x11docker # x11docker
# weston # weston
# xwayland xwayland
# xpra # xpra
# xdotool # xdotool
# xorg.setxkbmap # xorg.setxkbmap
# xorg.xkbcomp # xorg.xkbcomp
# xorg.xauth # xorg.xauth
] ++ kideDeps; ] ++ kideDeps;
file = {
"wallpaper.png".source = ${wallpaper};
};
}; };
wayland.windowManager = { wayland.windowManager = {
@ -232,7 +226,8 @@ in {
wf-recorder = pkgBin "wf-recorder"; wf-recorder = pkgBin "wf-recorder";
wl-copy = pkgs.wl-clipboard + "/bin/wl-copy"; wl-copy = pkgs.wl-clipboard + "/bin/wl-copy";
wl-paste = pkgs.wl-clipboard + "/bin/wl-paste"; wl-paste = pkgs.wl-clipboard + "/bin/wl-paste";
shotFile = homeDir + "/shots/shot_$(date '+%Y_%m_%d_%H_%M')"; shotFile = config.home.homeDirectory
+ "/shots/shot_$(date '+%Y_%m_%d_%H_%M')";
in lib.mkOptionDefault { in lib.mkOptionDefault {
"${mod}+q" = "kill"; "${mod}+q" = "kill";
# Screenshot and copy it to clipboard # Screenshot and copy it to clipboard
@ -264,7 +259,11 @@ in {
accel_profile = "flat"; accel_profile = "flat";
}; };
}; };
output = { "*" = { bg = wallpaper + " fill"; }; }; output = {
"*" = {
bg = config.home.homeDirectory + "wallpaper.png" + " fill";
};
};
}; };
}; };
}; };
@ -299,11 +298,7 @@ in {
settings = { settings = {
content.javascript.enabled = false; content.javascript.enabled = false;
colors.webpage.darkmode.enabled = true; colors.webpage.darkmode.enabled = true;
tabs = { tabs = { show = "multiple"; };
tabs_are_windows = true;
show = "never";
};
statusbar.show = "in-mode";
}; };
extraConfig = let extraConfig = let
domains = [ domains = [
@ -393,13 +388,21 @@ in {
dotDir = ".config/zsh"; dotDir = ".config/zsh";
history.path = ".local/share/zsh/history"; history.path = ".local/share/zsh/history";
loginExtra = '' loginExtra = ''
export SDL_VIDEODRIVER=wayland
# needs qt5.qtwayland in systemPackages
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING=1
if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then
exec ${pkgBin "hikari"} exec ${pkgBin "hikari"}
fi fi
''; '';
shellAliases = nixosConfig.environment.shellAliases // { shellAliases = nixosConfig.environment.shellAliases // {
rember = '' rember = ''
${pkgs.kakoune-unwrapped}/bin/kak -e "try %(gtd-jump-today)" "${homeDir}/rember/stuff$(date '+_%m_%Y').gtd" ${pkgs.kakoune-unwrapped}/bin/kak -e "try %(gtd-jump-today)" "${config.home.homeDirectory}/rember/stuff$(date '+_%m_%Y').gtd"
''; '';
}; };
}; };
@ -449,25 +452,19 @@ in {
}; };
waybar = { waybar = {
enable = true; enable = true;
settings = [ settings = [{
{
layer = "top"; layer = "top";
position = "top"; position = "top";
modules-left = [ ]; modules-left = [ ];
modules-center = [ ]; modules-center = [ ];
modules-right = [ "pulseaudio" "cpu" "memory" "temperature" "clock" "tray" ]; modules-right =
[ "pulseaudio" "cpu" "memory" "temperature" "clock" "tray" ];
modules = { modules = {
"tray" = { "tray" = { spacing = 8; };
spacing = 8; "cpu" = { format = "/cpu {usage}/"; };
}; "memory" = { format = "/mem {}/"; };
"cpu" = {
format = "/cpu {usage}/";
};
"memory" = {
format = "/mem {}/";
};
"temperature" = { "temperature" = {
hwmon-path = "/sys/class/hwmon/hwmon2/temp2_input"; hwmon-path = "/sys/class/hwmon/hwmon1/temp2_input";
format = "/tmp {temperatureC}C/"; format = "/tmp {temperatureC}C/";
}; };
"pulseaudio" = { "pulseaudio" = {
@ -479,15 +476,14 @@ in {
format-source-muted = "/mic/"; format-source-muted = "/mic/";
}; };
}; };
} }];
];
style = '' style = ''
* { * {
border: none; border: none;
border-radius: 0; border-radius: 0;
/* `otf-font-awesome` is required to be installed for icons */ /* `otf-font-awesome` is required to be installed for icons */
font-family: ${font}; font-family: ${font};
font-size: ${toString fontSize}px; font-size: 13px;
min-height: 0; min-height: 0;
} }

View File

@ -1,7 +1,6 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }:
with lib; with lib;
let let cfg = config.wayland.windowManager.hikari;
cfg = config.wayland.windowManager.hikari;
in { in {
options.wayland.windowManager.hikari = { options.wayland.windowManager.hikari = {
enable = mkEnableOption "hikari window manager"; enable = mkEnableOption "hikari window manager";
@ -197,10 +196,12 @@ in {
} }
} }
''; '';
"hikari/autostart".source = pkgs.writeScriptBin "hikari-autostart" '' "hikari/autostart".source = "${
pkgs.writeScriptBin "hikari-autostart" ''
#!${pkgs.stdenv.shell} #!${pkgs.stdenv.shell}
${pkgs.waybar} & ${pkgs.waybar}/bin/waybar &
''; ''
}/bin/hikari-autostart";
}; };
}; };
}; };