This commit is contained in:
dusk 2022-09-12 02:24:41 +03:00
parent 2be3c2087d
commit c726abdce1
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
14 changed files with 189 additions and 1218 deletions

1158
flake.lock

File diff suppressed because it is too large Load Diff

View File

@ -14,19 +14,26 @@
nixinate.url = "github:matthewcroughan/nixinate";
nixinate.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
nixpkgs-wayland.flake = false;
helix.url = "github:helix-editor/helix";
hyprland.url = "github:hyprwm/Hyprland";
fufexan.url = "github:fufexan/dotfiles";
fufexan.inputs.hyprland.follows = "hyprland";
hyprland.inputs.nixpkgs.follows = "nixpkgs";
hyprland-contrib.url = "github:hyprwm/contrib";
hyprland-contrib.inputs.nixpkgs.follows = "nixpkgs";
blog.url = "git+https://git.gaze.systems/dusk/website.git";
blog.inputs.nixpkgs.follows = "nixpkgs";
bernbot.url = "github:yusdacra/bernbot";
bernbot.inputs.nixpkgs.follows = "nixpkgs";
discocss.url = "github:fufexan/discocss/flake";
discocss.inputs.nixpkgs.follows = "nixpkgs";
nil.url = "github:oxalica/nil";
nil.inputs.nixpkgs.follows = "nixpkgs";
webcord.url = "github:fufexan/webcord-flake/system-electron";
webcord.url = "github:fufexan/webcord-flake";
webcord.inputs.nixpkgs.follows = "nixpkgs";
};

4
locale/geo.nix Normal file
View File

@ -0,0 +1,4 @@
{
lat = "39.1";
long = "35.6";
}

View File

@ -1,20 +0,0 @@
{inputs}: final: prev: {
discord-open-asar = final.callPackage "${inputs.fufexan}/pkgs/discord" {
inherit (prev.discord) pname version src;
openasar = prev.callPackage "${inputs.nixpkgs}/pkgs/applications/networking/instant-messengers/discord/openasar.nix" {};
binaryName = "Discord";
desktopName = "Discord";
enableVulkan = false;
extraOptions = [
"--disable-gpu-memory-buffer-video-frames"
"--enable-accelerated-mjpeg-decode"
"--enable-accelerated-video"
"--enable-gpu-rasterization"
"--enable-native-gpu-memory-buffers"
"--enable-zero-copy"
"--ignore-gpu-blocklist"
];
};
}

View File

@ -0,0 +1 @@
{inputs}: (import "${inputs.nixpkgs-wayland}/overlay.nix")

View File

@ -4,6 +4,7 @@ pkgs: (
"fractal-next"
"obsidian"
"comic-mono"
"chromium"
]
pkgs
)

View File

@ -35,20 +35,20 @@
}:
stdenv.mkDerivation rec {
pname = "fractal-next";
version = "1206d4ed12059a298b5d918fd0a77dca034f7084";
version = "5c70961c";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = "fractal";
rev = "1206d4ed12059a298b5d918fd0a77dca034f7084";
sha256 = "sha256-ioMgVj85BKvsIjBbTAHFN6k5B/H86GLMTgAXK/5ji/k=";
rev = "5c70961cea34ac92658b59254bc3ef428ca7fa91";
sha256 = "sha256-Ai26Nwm9ujqxW0NCpxd97NiJWImitl87coS724nv27g=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-gbTljLIYAanXm1D/tNBGNMlaDatXgZDeSY5pA8s5gog=";
sha256 = "sha256-8fgQvlZGbntz2buQ/nCo90Kbel9aeC4kD3uqTdefylg=";
};
nativeBuildInputs = [

View File

@ -5,15 +5,6 @@
lib,
...
}: {
# imports = [inputs.discocss.hmModule];
# programs.discocss = {
# enable = true;
# discord = inputs.fufexan.packages.${pkgs.system}.discord-electron-openasar;
# discordAlias = true;
# css = builtins.readFile ./theme.css;
# };
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [
".config/WebCord"
];

View File

@ -5,45 +5,41 @@
}: {
imports = [
../wayland
../swaylock
../wlsunset
./swayidle.nix
inputs.hyprland.homeManagerModules.default
];
home.packages =
[
(import "${inputs.fufexan}/home/wayland/screenshot.nix" {inherit pkgs;})
]
++ (
with pkgs; [
home.packages = with pkgs; [
wf-recorder
xorg.xprop
]
);
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
light
playerctl
wlogout
];
wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
extraConfig = let
rofi = "${pkgs.rofi-wayland}/bin/rofi";
launcher = "${rofi} -show drun";
term = "${pkgs.wezterm}/bin/wezterm";
launcher = "rofi -show drun";
term = "wezterm";
swaybg = "${pkgs.swaybg}/bin/swaybg";
light = "${pkgs.light}/bin/light";
playerctl = "${pkgs.playerctl}/bin/playerctl";
pulsemixer = "${pkgs.pulsemixer}/bin/pulsemixer";
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
notify-date = with pkgs;
writers.writeBash "notify-date" ''
${libnotify}/bin/notify-send -t 1000 " $(${coreutils}/bin/date +'%H:%M %d/%m/%Y')"
'';
in ''
# should be configured per-profile
monitor=,preferred,auto,1.6
workspace=,1
monitor=eDP-1,preferred,auto,1.6
monitor=HDMI-A-1,1920x1080@75,auto,1
workspace=eDP-1,1
workspace=HDMI-A-1,2
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY HYPRLAND_INSTANCE_SIGNATURE
exec-once=systemctl --user start hyprland-session.target
exec-once=${swaybg} -i ~/.config/wallpaper
exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
exec-once=swaybg -i ~/.config/wallpaper
input {
kb_layout=tr
@ -54,12 +50,10 @@
}
}
general {
sensitivity=1
main_mod=SUPER
gaps_in=5
gaps_out=5
border_size=0
damage_tracking=full
}
decoration {
rounding=16
@ -67,12 +61,8 @@
blur_size=3
blur_passes=3
blur_new_optimizations=1
drop_shadow=1
drop_shadow=0
shadow_ignore_window=1
shadow_offset=2 2
shadow_range=2
shadow_render_power=1
col.shadow=0x55000000
}
animations {
enabled=1
@ -84,7 +74,18 @@
dwindle {
pseudotile=0 # enable pseudotiling on dwindle
}
misc {
no_vfr=0
}
windowrule=float,title:^(Media viewer)$
windowrule=float,title:^(Picture-in-Picture)$
windowrule=float,title:^(Firefox Sharing Indicator)$
windowrule=move 0 0,title:^(Firefox Sharing Indicator)$
bind=SUPER,Escape,exec,wlogout -p layer-shell
bind=SUPER,L,exec,swaylock
bind=SUPER,RETURN,exec,${term}
bind=SUPER,D,exec,${launcher}
bind=SUPER,Q,killactive,
@ -93,14 +94,18 @@
bind=SUPER,P,pseudo,
bind=SUPER,T,exec,${notify-date}
bind=SUPERSHIFT,T,togglefloating,
bind=,XF86AudioPlay,exec,${playerctl} play-pause
bind=,XF86AudioPrev,exec,${playerctl} previous
bind=,XF86AudioNext,exec,${playerctl} next
bind=,XF86AudioRaiseVolume,exec,${pulsemixer} --change-volume +6
bind=,XF86AudioLowerVolume,exec,${pulsemixer} --change-volume -6
bind=,XF86AudioMute,exec,${pulsemixer} --toggle-mute
bind=,XF86MonBrightnessUp,exec,${light} -A 5
bind=,XF86MonBrightnessDown,exec,${light} -U 5
bind=,XF86AudioPlay,exec,playerctl play-pause
bind=,XF86AudioPrev,exec,playerctl previous
bind=,XF86AudioNext,exec,playerctl next
bindle=,XF86AudioRaiseVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 6%+
bindle=,XF86AudioLowerVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 6%-
bind=,XF86AudioMute,exec,wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bind=,XF86AudioMicMute,exec,wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bind=,XF86MonBrightnessUp,exec,light -A 5
bind=,XF86MonBrightnessDown,exec,light -U 5
# move focus
bind=SUPER,left,movefocus,l
@ -139,21 +144,13 @@
bind=SUPERSHIFT,8,movetoworkspace,8
bind=SUPERSHIFT,9,movetoworkspace,9
## screenshot ##
bind=,Print,exec,screenshot area
bind=SUPERSHIFT,R,exec,screenshot area
# monitor
bind=CTRL,Print,exec,screenshot monitor
bind=SUPERSHIFTCTRL,R,exec,screenshot monitor
# all-monitors
bind=ALT,Print,exec,screenshot all
bind=SUPERSHIFTALT,R,exec,screenshot all
# screenrec
bind=ALT,Print,exec,screenshot rec area
bind=SUPERSHIFTALT,R,exec,screenshot rec area
# screenshot
bind=,Print,exec,grimblast --notify copysave area
bind=SUPERSHIFT,R,exec,grimblast --notify copysave area
bind=CTRL,Print,exec,grimblast --notify --cursor copysave output
bind=SUPERSHIFTCTRL,R,exec,grimblast --notify --cursor copysave output
bind=ALT,Print,exec,grimblast --notify --cursor copysave screen
bind=SUPERSHIFTALT,R,exec,grimblast --notify --cursor copysave screen
'';
};
}

View File

@ -0,0 +1,32 @@
{
pkgs,
lib,
...
}: {
home.packages = with pkgs; [wlopm swayidle];
services.swayidle = {
enable = true;
events = [
{
event = "before-sleep";
command = "swaylock";
}
{
event = "lock";
command = "swaylock";
}
];
timeouts = [
{
timeout = 120;
command = "wlopm --off \*";
resumeCommand = "wlopm --on \*";
}
{
timeout = 300;
command = "loginctl lock-session";
}
];
};
systemd.user.services.swayidle.Install.WantedBy = lib.mkForce ["hyprland-session.target"];
}

View File

@ -0,0 +1,17 @@
{
config,
pkgs,
...
}: {
home.packages = [pkgs.swaylock-effects];
programs.swaylock.settings = {
screenshot = true;
ignore-empty-password = true;
clock = true;
effect-scale = "0.5";
effect-greyscale = true;
effect-blur = "20x3";
font = config.fonts.settings.name;
};
}

View File

@ -6,12 +6,7 @@
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
};
services = {
gammastep = {
enable = true;
provider = "geoclue2";
};
XDG_SESSION_TYPE = "wayland";
GDK_SCALE = "2";
};
}

View File

@ -0,0 +1,11 @@
{inputs, ...}:
let
geo = import "${inputs.self}/locale/geo.nix";
in
{
services.wlsunset = {
enable = true;
latitude = geo.lat;
longitude = geo.long;
};
}

View File

@ -56,14 +56,6 @@ in {
seahorse.enable = true;
};
services = {
# provide location
geoclue2 = {
enable = true;
appConfig.gammastep = {
isAllowed = true;
isSystem = false;
};
};
syncthing.folders = {
notes = {
enable = true;
@ -72,12 +64,18 @@ in {
ignorePerms = true;
};
};
gnome.gnome-keyring.enable = true;
};
# gnome keyring better fr fr
security.pam.services.patriot = {
enableGnomeKeyring = true;
enableKwallet = false;
};
security.pam.services.swaylock = {
text = ''
auth include login
'';
};
systemd = {
targets.network-online.enable = false;
services = {
@ -135,7 +133,6 @@ in {
"zsh"
"keyrings"
"lutris"
"PolyMC"
"Terraria"
]
++ mkPaths ".config" [
@ -178,10 +175,10 @@ in {
mupdf
xdg_utils
rust-analyzer
# polymc
cloudflared
lutris
protontricks
fractal-next
];
};
programs = {