update, switched to nixpkgs-stable

This commit is contained in:
Varris 2023-12-21 18:33:57 +01:00
parent 6e6c9b5ba7
commit 8bb68610dd
25 changed files with 123 additions and 401 deletions

View File

@ -2,42 +2,17 @@
description = "My personal dotfiles";
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
nixpkgs.url = "nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager/release-23.11";
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
chaotic-nyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
nix-index-database.url = "github:Mic92/nix-index-database";
chaotic-nyx = {
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-contrib = {
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprpicker = {
url = "github:hyprwm/hyprpicker";
inputs.nixpkgs.follows = "nixpkgs";
};
ags = {
url = "github:Aylur/ags";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/hyprland";
hyprland-contrib.url = "github:hyprwm/contrib";
hyprpicker.url = "github:hyprwm/hyprpicker";
ags.url = "github:Aylur/ags";
gruvbox-kvantum = {
url = "github:thefallnn/Gruvbox-Kvantum";
@ -54,11 +29,6 @@
flake = false;
};
nixd = {
url = "github:nix-community/nixd";
inputs.nixpkgs.follows = "nixpkgs";
};
nvim-hmts = {
url = "github:calops/hmts.nvim";
flake = false;

View File

@ -26,6 +26,10 @@
# dontWrapQtApps = false;
# });
kitty = prev.kitty.overrideAttrs (old: {
patches = [./pkgs/kitty/0011-fix-test_fish_integration.patch];
});
steam = prev.steam.override {
extraPkgs = prev: [
prev.libkrb5

View File

@ -3,6 +3,7 @@
fetchFromGitHub,
inputs,
gtk3,
fd,
gnome-icon-theme,
hicolor-icon-theme,
}:
@ -12,15 +13,22 @@ stdenvNoCC.mkDerivation rec {
src = inputs.gruvbox-plus-icon-pack;
nativeBuildInputs = [gtk3];
nativeBuildInputs = [gtk3 fd];
propagatedBuildInputs = [gnome-icon-theme hicolor-icon-theme];
installPhase = ''
cd Gruvbox-Plus-Dark
fd " " -X rm
mkdir -p $out/share/icons/Gruvbox-Plus-Dark
cp -r * $out/share/icons/Gruvbox-Plus-Dark
'';
postFixup = ''
for i in $out/share/icons/*; do
gtk-update-icon-cache $i
done
'';
dontDropIconThemeCache = true;
}

View File

@ -0,0 +1,22 @@
From 4c56e768401f920bb3ce129e1883810b7e6323f7 Mon Sep 17 00:00:00 2001
From: Kovid Goyal <kovid@kovidgoyal.net>
Date: Sat, 11 Nov 2023 20:00:46 +0530
Subject: [PATCH] Fix #6812
---
.../fish/vendor_conf.d/kitty-shell-integration.fish | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish
index 77fc837c49..5f09988fb0 100644
--- a/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish
+++ b/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish
@@ -111,7 +111,7 @@ function __ksi_schedule --on-event fish_prompt -d "Setup kitty integration after
# Note that neither alias nor function is recursive in fish so if the user defines an alias/function
# for sudo it will be clobbered by us, so only install this if sudo is not already function
if not contains "no-sudo" $_ksi
- and test -n "$TERMINFO" -a "file" = (type -t sudo)
+ and test -n "$TERMINFO" -a "file" = (type -t sudo 2> /dev/null || echo "x")
and not test -r "/usr/share/terminfo/x/xterm-kitty" -o -r "/usr/share/terminfo/78/xterm-kitty"
# Ensure terminfo is available in sudo
function sudo

View File

@ -18,12 +18,12 @@
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/d57d2104-d36b-4fc9-9acd-4dd3807fb290";
device = "/dev/disk/by-uuid/7009c691-ca34-4106-b959-0d625aefb30b";
fsType = "xfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D84B-2DD9";
device = "/dev/disk/by-uuid/3A8C-A960";
fsType = "vfat";
};

View File

@ -1,6 +0,0 @@
{
services.avahi = {
enable = true;
nssmdns = true;
};
}

View File

@ -1,6 +1,5 @@
{
imports = [
./avahi
./locate
./pipewire
./podman
@ -10,10 +9,10 @@
];
services = {
avahi.enable = true;
blueman.enable = true;
flatpak.enable = true;
# fwupd.enable = true;
gnome.gnome-keyring.enable = true;
# gnome.gnome-keyring.enable = true;
gvfs.enable = true;
openssh.enable = true;
udisks2.enable = true;

View File

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
virtualisation = {
podman = {
enable = true;

View File

@ -1,6 +1,6 @@
{
programs.beets = {
enable = true; #until fixed
enable = true;
settings = {
plugins = "duplicates ftintitle fetchart embedart chroma edit replaygain badfiles fish";

25
user/configs/kitty/default.nix Executable file
View File

@ -0,0 +1,25 @@
{
config,
pkgs,
inputs,
...
}: {
programs.kitty = {
enable = true;
font = {
name = "JetBrainsMono Nerd Font";
size = 10;
};
shellIntegration.enableFishIntegration = true;
theme = "Gruvbox Dark";
settings = {
background_opacity = "0.9";
modify_font = "cell_height 2px";
shell_integration = "no-cursor";
tab_bar_style = "powerline";
window_padding_width = "14";
};
};
}

View File

@ -1,5 +1,5 @@
{
imports = [
imports = [
../../modules/mpd-notification
];
@ -96,8 +96,8 @@
# };
services.mpd-mpris = {
enable = true;
mpd.useLocal = true;
enable = true;
mpd.useLocal = true;
};
services.mpd-notification = {

View File

@ -2,7 +2,7 @@
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
terminal = "${pkgs.foot}/bin/foot";
terminal = "${pkgs.kitty}/bin/kitty";
extraConfig = {
modi = "drun,run";
};

View File

@ -1,17 +1,13 @@
import App from 'resource:///com/github/Aylur/ags/app.js'
import { exec } from 'resource://com/github/Aylur/ags/utils.js'
import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';
import Panel from './js/panel/panel.js';
import NotificationsPopupWindow from './js/notifications/notificationPopup.js';
import { NotificationCenter } from './js/notifications/notificationCenter.js';
import {
forMonitors
}
from './js/utils.js';
Notifications.clear();
const styleScss = App.configDir + '/style.scss';
const styleCss = '/tmp/style-ags.css';
@ -21,7 +17,5 @@ export default {
style: styleCss,
windows: [
forMonitors(Panel),
NotificationsPopupWindow(),
NotificationCenter(),
].flat(2),
};

View File

@ -1,121 +0,0 @@
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
import { lookUpIcon, timeout } from 'resource:///com/github/Aylur/ags/utils.js';
const NotificationIcon = ({ appEntry, appIcon, image }) => {
if (image) {
return Widget.Box({
vpack: 'start',
hexpand: false,
className: 'icon img',
css: `
background-image: url("${image}");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
min-width: 78px;
min-height: 78px;
`,
});
}
let icon = 'dialog-information-symbolic';
if(lookUpIcon(appIcon))
icon = appIcon;
if (lookUpIcon(appEntry))
icon = appEntry;
return Widget.Box({
vpack: 'start',
hexpand: false,
className: 'icon',
css: `
min-width: 78px;
min-height: 78px;
`,
children: [Widget.Icon({
icon, size: 58,
hpack: 'center', hexpand: true,
vpack: 'center', vexpand: true,
})],
});
};
export const Notification = n => Widget.EventBox({
className: `notification ${n.urgency}`,
onPrimaryClick: () => n.dismiss(),
properties: [['hovered', false]],
onHover: self => {
if (self._hovered)
return;
// if there are action buttons and they are hovered
// EventBox onHoverLost will fire off immediately,
// so to prevent this we delay it
timeout(300, () => self._hovered = true);
},
onHoverLost: self => {
if (!self._hovered)
return;
self._hovered = false;
n.dismiss();
},
vexpand: false,
child: Widget.Box({
vertical: true,
children: [
Widget.Box({
children: [
NotificationIcon(n),
Widget.Box({
hexpand: true,
vertical: true,
children: [
Widget.Box({
children: [
Widget.Label({
className: 'title',
xalign: 0,
justification: 'left',
hexpand: true,
maxWidthChars: 24,
truncate: 'end',
wrap: true,
label: n.summary,
useMarkup: true,
}),
Widget.Button({
className: 'close-button',
vpack: 'start',
child: Widget.Icon('window-close-symbolic'),
onClicked: n.close.bind(n),
}),
],
}),
Widget.Label({
className: 'description',
hexpand: true,
useMarkup: true,
xalign: 0,
justification: 'left',
label: n.body,
wrap: true,
}),
],
}),
],
}),
Widget.Box({
className: 'actions',
children: n.actions.map(({ id, label }) => Widget.Button({
className: 'action-button',
onClicked: () => n.invoke(id),
hexpand: true,
child: Widget.Label(label),
})),
}),
],
}),
});

View File

@ -1,39 +0,0 @@
import {
NotificationList, ClearButton
} from './widgets.js';
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
import App from 'resource:///com/github/Aylur/ags/app.js';
const Header = () => Widget.Box({
className: 'header',
children: [
Widget.Box({ hexpand: true }),
ClearButton(),
],
});
export const NotificationCenter = () => Widget.Window({
name: 'notification-center',
anchor: [ 'right', 'top', 'bottom'],
popup: true,
visible: false,
focusable: true,
child: Widget.Box({
children: [
Widget.EventBox({
hexpand: true,
connections: [['button-press-event', () =>
App.closeWindow('notification-center')]]
}),
Widget.Box({
vertical: true,
children: [
Header(),
NotificationList(),
],
}),
],
}),
});

View File

@ -1,18 +0,0 @@
import { Box, Window } from 'resource:///com/github/Aylur/ags/widget.js';
import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';
import { Notification } from './notification.js';
const PopupList = () => Box({
className: 'notificationPopupList',
css: 'padding: 1px;', // so it shows up
vertical: true,
binds: [['children', Notifications, 'popups',
popups => popups.map(Notification)]],
});
export default () => Window({
name: 'notificationPopupWindow',
anchor: ['right', 'top'],
child: PopupList(),
});

View File

@ -1,60 +0,0 @@
import { Notification } from './notification.js';
import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
const List = () => Widget.Box({
vertical: true,
vexpand: true,
connections: [[Notifications, self => {
self.children = Notifications.notifications
.reverse()
.map(Notification);
self.visible = Notifications.notifications.length > 0;
}]],
});
const Placeholder = () => Widget.Box({
className: 'placeholder',
vertical: true,
vexpand: true,
vpack: 'center',
children: [
Widget.Icon('notifications-disabled-symbolic'),
Widget.Label('Your inbox is empty'),
],
binds: [
['visible', Notifications, 'notifications', n => n.length === 0],
],
});
export const NotificationList = () => Widget.Scrollable({
hscroll: 'never',
vscroll: 'automatic',
child: Widget.Box({
className: 'list',
vertical: true,
children: [
List(),
Placeholder(),
],
}),
});
export const ClearButton = () => Widget.Button({
onClicked: () => Notifications.clear(),
binds: [
['sensitive', Notifications, 'notifications', n => n.length > 0],
],
child: Widget.Box({
children: [
Widget.Label('Clear'),
Widget.Icon({
binds: [
['icon', Notifications, 'notifications', n =>
`user-trash-${n.length > 0 ? 'full-' : ''}symbolic`],
],
}),
],
}),
});

View File

@ -41,7 +41,7 @@ export default () => Button({
if (!Audio.speaker)
return;
label.label = ` ${Math.floor((Audio.speaker.volume * 100) / 10) * 10}%`; // round down to nearest 10
label.label = ` ${Math.floor((Audio.speaker.volume * 100) / 5) * 5}%`; // round down to nearest 5
}, 'speaker-changed']
],
}),

View File

@ -1,15 +0,0 @@
const {
Label,
Window
} = ags.Widget;
export default () => Window({
name: `volume-osd`,
className: `osd`,
monitor: null,
focusable: false,
anchor: ['center'],
popup: true,
child: Label('hello world'),
})

View File

@ -8,9 +8,6 @@
@import './scss/panel/widgets/clock.scss';
@import './scss/panel/widgets/sysTray.scss';
@import './scss/notifications/notificationPopup.scss';
* {
min-height: unset;
}

View File

@ -1,40 +0,0 @@
{
config,
pkgs,
inputs,
...
}: {
programs.foot = {
enable = true;
settings = {
main = {
font = "JetBrainsMono Nerd Font:pixelsize=14";
pad = "16x16 center";
underline-offset = "4px";
};
colors = {
alpha = "0.90";
background = "282828";
foreground = "ebdbb2";
regular0 = "282828";
regular1 = "cc241d";
regular2 = "98971a";
regular3 = "d79921";
regular4 = "458588";
regular5 = "b16286";
regular6 = "689d6a";
regular7 = "a89984";
bright0 = "928374";
bright1 = "fb4934";
bright2 = "b8bb26";
bright3 = "fabd2f";
bright4 = "83a598";
bright5 = "d3869b";
bright6 = "8ec07c";
bright7 = "ebdbb2";
};
};
};
}

View File

@ -8,7 +8,6 @@
imports = [
./settings.nix
../ags
../foot
../wob
];

View File

@ -91,7 +91,6 @@ in {
exec-once = [
"${pkgs.openrgb}/bin/openrgb --startminimized --profile autorun.orp"
"${pkgs.blueman}/bin/blueman-applet"
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
"${pkgs.ydotool}/bin/ydotoold"
];
@ -99,7 +98,7 @@ in {
exec = [
"${pkgs.xorg.xrandr}/bin/xrandr --output ${rightMonitor.display} --primary"
"ags -q; ags"
"pkill swww-daemon && sleep 2 && ${pkgs.swww}/bin/swww-daemon && ${pkgs.swww}/bin/swww img ~/.cache/swww/wallpaper"
"sleep 2; pkill swww-daemon; swww init"
#Set cursor
"${pkgs.hyprland}/bin/hyprctl setcursor '${config.gtk.cursorTheme.name}' ${builtins.toString config.gtk.cursorTheme.size} &> /dev/null"
@ -135,10 +134,10 @@ in {
"${modKey}, Q, exec, ${pkgs.firefox}/bin/firefox"
"${modKey}, Return, exec, ${pkgs.foot}/bin/foot"
"${modKey}, Return, exec, ${pkgs.kitty}/bin/kitty"
", XF86AudioRaiseVolume, exec, ${pkgs.pamixer}/bin/pamixer -i 10 --get-volume"
", XF86AudioLowerVolume, exec, ${pkgs.pamixer}/bin/pamixer -d 10 --get-volume"
", XF86AudioRaiseVolume, exec, ${pkgs.pamixer}/bin/pamixer -i 5 --get-volume"
", XF86AudioLowerVolume, exec, ${pkgs.pamixer}/bin/pamixer -d 5 --get-volume"
"CTRL, grave, exec, ags toggle-window notification-center"

View File

@ -1,6 +1,7 @@
{
config,
pkgs,
lib,
inputs,
system,
...
@ -8,17 +9,18 @@
imports = [
./configs/beets
./configs/cava
./configs/wayland/hyprland
./configs/rofi
./configs/dircolors.nix
./configs/firefox
./configs/fish
./configs/kitty
./configs/kvantum
./configs/mpd
./configs/mpv
./configs/neovim
./configs/firefox
./configs/dircolors.nix
./configs/xdg-mime.nix
./configs/kvantum
./configs/rofi
./configs/tmux
./configs/wayland/hyprland
./configs/xdg-mime.nix
inputs.nix-index-database.hmModules.nix-index
];
@ -70,8 +72,8 @@
twemoji-color-font
vimv
vulkan-tools
xdg-utils
wqy_zenhei #fix for missing non-ascii fonts in TF2
xdg-utils
];
home.sessionVariables = {
@ -96,7 +98,7 @@
services.gpg-agent = {
enable = true;
pinentryFlavor = "gtk2";
pinentryFlavor = "qt";
};
services.udiskie.enable = true;
@ -164,7 +166,7 @@
};
};
services.gnome-keyring.enable = true;
# services.gnome-keyring.enable = true;
services.easyeffects = {
enable = true;

View File

@ -1,29 +1,32 @@
{ config, lib, pkgs, ... }:
let
cfg = config.services.mpd-notification;
{
config,
lib,
pkgs,
...
}: let
cfg = config.services.mpd-notification;
in {
meta.maintainers = [ "Varris" ];
meta.maintainers = ["Varris"];
options.services.mpd-notification = {
package = lib.mkPackageOption pkgs "mpd-notification" { };
enable = lib.mkEnableOption "the mpd-notification service";
};
config = lib.mkIf cfg.enable {
systemd.user.services.mpd-notification = {
Unit = {
Description = "A notification daemon for MPD";
Documentation = "https://github.com/eworm-de/mpd-notification";
After = [ "mpd.service" "network.target" "network-online.target" ];
Requires = [ "dbus.socket" ];
};
Service = {
Type = "simple";
Restart = "on-failure";
ExecStart = "${cfg.package}/bin/mpd-notification";
};
};
options.services.mpd-notification = {
package = lib.mkPackageOption pkgs "mpd-notification" {};
enable = lib.mkEnableOption "the mpd-notification service";
};
config = lib.mkIf cfg.enable {
systemd.user.services.mpd-notification = {
Unit = {
Description = "A notification daemon for MPD";
Documentation = "https://github.com/eworm-de/mpd-notification";
After = ["mpd.service" "network.target" "network-online.target"];
Requires = ["dbus.socket"];
};
Service = {
Type = "simple";
Restart = "on-failure";
ExecStart = "${cfg.package}/bin/mpd-notification";
};
};
};
}