Compare commits

..

No commits in common. "b3d9c448460d0ed46596954f6f3b20a6bd2ad8f6" and "2be3c2087d464633e2052195c7ee1139f5bd7783" have entirely different histories.

23 changed files with 1239 additions and 316 deletions

1168
flake.lock

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -1 +0,0 @@
../../../modules/ananicy/default.nix

View File

@ -1,12 +0,0 @@
{
services.tlp = {
enable = true;
settings = {
RADEON_DPM_PERF_LEVEL_ON_AC = "auto";
RADEON_DPM_PERF_LEVEL_ON_BAT = "low";
RADEON_DPM_STATE_ON_AC = "performance";
RADEON_DPM_STATE_ON_BAT = "battery";
NMI_WATCHDOG = 0;
};
};
}

View File

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

View File

@ -1,47 +0,0 @@
{
pkgs,
lib,
...
}: let
l = lib // builtins;
mkRule = name: type:
l.toJSON {
inherit name type;
};
in {
services.ananicy = {
enable = true;
package = pkgs.ananicy-cpp;
extraRules = l.concatStringsSep "\n" [
# coompilers
(mkRule "g++" "BG_CPUIO")
(mkRule "gcc" "BG_CPUIO")
(mkRule "clang" "BG_CPUIO")
(mkRule "mold" "BG_CPUIO")
(mkRule "ld" "BG_CPUIO")
(mkRule "gold" "BG_CPUIO")
(mkRule "rustc" "BG_CPUIO")
(mkRule "cargo" "BG_CPUIO")
(mkRule "rust-analyzer" "BG_CPUIO")
(mkRule "go" "BG_CPUIO")
(mkRule "nix" "BG_CPUIO")
(mkRule "nix-daemon" "BG_CPUIO")
# editors
(mkRule "hx" "Doc-View")
(mkRule ".hx-wrapped" "Doc-View")
# browser
(mkRule "firefox" "Doc-View")
(mkRule ".firefox-wrapped" "Doc-View")
# wm
(mkRule "Hyprland" "LowLatency_RT")
(mkRule "rofi" "LowLatency_RT")
(mkRule "wlsunset" "BG_CPUIO")
(mkRule "swayidle" "BG_CPUIO")
# term
(mkRule "wezterm-gui" "Doc-View")
(mkRule "foot" "Doc-View")
# other
(mkRule "syncthing" "BG_CPUIO")
];
};
}

View File

@ -7,7 +7,6 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.sharedModules = [ home-manager.sharedModules = [
"${inputs.self}/users/modules/settings"
{ {
home = { home = {
inherit (config.environment) shellAliases sessionVariables; inherit (config.environment) shellAliases sessionVariables;

View File

@ -0,0 +1,20 @@
{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

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

View File

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

View File

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

View File

@ -5,6 +5,15 @@
lib, 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 = [ home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [
".config/WebCord" ".config/WebCord"
]; ];

View File

@ -1,23 +1,12 @@
{ {
config,
lib, lib,
config,
... ...
}: let }: let
cfg = config.settings; cfg = config.fonts.settings;
inherit in
(lib) with lib; {
types options.fonts.settings = {
mkOption
mkIf
;
in {
options = {
settings.terminal = {
name = mkOption {
type = types.str;
};
};
settings.font = {
enable = mkOption { enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
@ -32,9 +21,8 @@ in {
type = types.ints.unsigned; type = types.ints.unsigned;
}; };
}; };
};
config = mkIf cfg.font.enable { config = mkIf cfg.enable {
home.packages = [cfg.font.package]; home.packages = [cfg.package];
}; };
} }

View File

@ -1,33 +0,0 @@
{config, ...}: {
settings.terminal.name = "foot";
programs.foot = {
enable = true;
server.enable = false;
settings = {
main = {
font = "${config.settings.font.name}:size=${toString config.settings.font.size}";
dpi-aware = "yes";
};
colors = {
foreground = "cdd6f4"; # Text
background = "1e1e2e"; # Base
regular0 = "45475a"; # Surface 1
regular1 = "f38ba8"; # red
regular2 = "a6e3a1"; # green
regular3 = "f9e2af"; # yellow
regular4 = "89b4fa"; # blue
regular5 = "f5c2e7"; # pink
regular6 = "94e2d5"; # teal
regular7 = "bac2de"; # Subtext 1
bright0 = "585b70"; # Surface 2
bright1 = "f38ba8"; # red
bright2 = "a6e3a1"; # green
bright3 = "f9e2af"; # yellow
bright4 = "89b4fa"; # blue
bright5 = "f5c2e7"; # pink
bright6 = "94e2d5"; # teal
bright7 = "a6adc8"; # Subtext 0
};
};
};
}

View File

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

View File

@ -1,32 +0,0 @@
{
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

@ -6,7 +6,7 @@
programs.mako = { programs.mako = {
enable = true; enable = true;
anchor = "top-center"; anchor = "top-center";
font = "${config.settings.font.name} ${toString config.settings.font.size}"; font = "${config.fonts.settings.name} ${toString config.fonts.settings.size}";
borderRadius = 16; borderRadius = 16;
extraConfig = builtins.readFile ( extraConfig = builtins.readFile (
builtins.fetchurl { builtins.fetchurl {

View File

@ -16,7 +16,7 @@
configuration{ configuration{
modi: "drun"; modi: "drun";
lines: 5; lines: 5;
font: "${config.settings.font.name} ${toString config.settings.font.size}"; font: "${config.fonts.settings.name} ${toString config.fonts.settings.size}";
show-icons: true; show-icons: true;
terminal: "st"; terminal: "st";
drun-display-format: "{icon} {name}"; drun-display-format: "{icon} {name}";

View File

@ -1,17 +0,0 @@
{
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.settings.font.name;
};
}

View File

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

View File

@ -3,7 +3,6 @@
config, config,
... ...
}: { }: {
settings.terminal.name = "wezterm";
home.packages = [pkgs.wezterm]; home.packages = [pkgs.wezterm];
xdg.enable = true; xdg.enable = true;
xdg.configFile = { xdg.configFile = {
@ -17,8 +16,8 @@
} }
return { return {
font = wezterm.font("${config.settings.font.name}"), font = wezterm.font("${config.fonts.settings.name}"),
font_size = ${builtins.toJSON config.settings.font.size}, font_size = ${builtins.toJSON config.fonts.settings.size},
default_cursor_style = "BlinkingBar", default_cursor_style = "BlinkingBar",
enable_wayland = true, enable_wayland = true,
enable_tab_bar = false, enable_tab_bar = false,

View File

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

View File

@ -56,6 +56,14 @@ in {
seahorse.enable = true; seahorse.enable = true;
}; };
services = { services = {
# provide location
geoclue2 = {
enable = true;
appConfig.gammastep = {
isAllowed = true;
isSystem = false;
};
};
syncthing.folders = { syncthing.folders = {
notes = { notes = {
enable = true; enable = true;
@ -64,18 +72,12 @@ in {
ignorePerms = true; ignorePerms = true;
}; };
}; };
gnome.gnome-keyring.enable = true;
}; };
# gnome keyring better fr fr # gnome keyring better fr fr
security.pam.services.patriot = { security.pam.services.patriot = {
enableGnomeKeyring = true; enableGnomeKeyring = true;
enableKwallet = false; enableKwallet = false;
}; };
security.pam.services.swaylock = {
text = ''
auth include login
'';
};
systemd = { systemd = {
targets.network-online.enable = false; targets.network-online.enable = false;
services = { services = {
@ -96,7 +98,7 @@ in {
imports = let imports = let
modulesToEnable = l.flatten [ modulesToEnable = l.flatten [
# desktop stuff # desktop stuff
["firefox" "hyprland" "foot" "rofi" "mako" "discord"] ["firefox" "hyprland" "wezterm" "font" "rofi" "mako" "discord"]
# cli stuff # cli stuff
["zoxide" "zsh" "fzf" "starship" "direnv"] ["zoxide" "zsh" "fzf" "starship" "direnv"]
# dev stuff # dev stuff
@ -133,6 +135,7 @@ in {
"zsh" "zsh"
"keyrings" "keyrings"
"lutris" "lutris"
"PolyMC"
"Terraria" "Terraria"
] ]
++ mkPaths ".config" [ ++ mkPaths ".config" [
@ -147,7 +150,7 @@ in {
}; };
fonts.fontconfig.enable = l.mkForce true; fonts.fontconfig.enable = l.mkForce true;
settings.font = { fonts.settings = {
enable = true; enable = true;
name = "Comic Mono"; name = "Comic Mono";
size = 13; size = 13;
@ -175,10 +178,10 @@ in {
mupdf mupdf
xdg_utils xdg_utils
rust-analyzer rust-analyzer
# polymc
cloudflared cloudflared
lutris lutris
protontricks protontricks
fractal-next
]; ];
}; };
programs = { programs = {
@ -210,7 +213,7 @@ in {
defaultCacheTtlSsh = defaultCacheTtl; defaultCacheTtlSsh = defaultCacheTtl;
maxCacheTtlSsh = maxCacheTtl; maxCacheTtlSsh = maxCacheTtl;
grabKeyboardAndMouse = false; grabKeyboardAndMouse = false;
pinentryFlavor = "gnome3"; pinentryFlavor = "gtk2";
}; };
}; };
}; };