Merge branch 'end-4:main' into main

This commit is contained in:
jwihardi
2025-11-05 00:06:43 -05:00
committed by GitHub
26 changed files with 286 additions and 880 deletions
@@ -1,92 +0,0 @@
import qs.modules.common
import qs.services
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Qt.labs.synchronizer
ColumnLayout {
id: root
spacing: 0
required property var tabButtonList // Something like [{"icon": "notifications", "name": Translation.tr("Notifications")}, {"icon": "volume_up", "name": Translation.tr("Volume mixer")}]
property alias currentIndex: tabBar.currentIndex
property bool enableIndicatorAnimation: false
property color colIndicator: Appearance?.colors.colPrimary ?? "#65558F"
property color colBorder: Appearance?.m3colors.m3outlineVariant ?? "#C6C6D0"
onCurrentIndexChanged: {
enableIndicatorAnimation = true
}
property bool centerTabBar: parent.width > 500
Layout.fillWidth: !centerTabBar
Layout.alignment: Qt.AlignHCenter
implicitWidth: Math.max(tabBar.implicitWidth, 600)
TabBar {
id: tabBar
Layout.fillWidth: true
background: Item {
WheelHandler {
onWheel: (event) => {
if (event.angleDelta.y < 0)
tabBar.incrementCurrentIndex()
else if (event.angleDelta.y > 0)
tabBar.decrementCurrentIndex()
}
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
}
}
Repeater {
model: root.tabButtonList
delegate: PrimaryTabButton {
selected: (index == root.currentIndex)
buttonText: modelData.name
buttonIcon: modelData.icon
minimumWidth: 160
onClicked: tabBar.setCurrentIndex(index)
}
}
}
Item { // Tab indicator
id: tabIndicator
Layout.fillWidth: true
height: 3
Rectangle {
id: indicator
property int tabCount: root.tabButtonList.length
property real fullTabSize: root.width / tabCount;
property real targetWidth: tabBar.contentItem?.children[0]?.children[tabBar.currentIndex]?.tabContentWidth ?? 0
implicitWidth: targetWidth
anchors {
top: parent.top
bottom: parent.bottom
}
x: tabBar.currentIndex * fullTabSize + (fullTabSize - targetWidth) / 2
color: root.colIndicator
radius: Appearance?.rounding.full ?? 9999
Behavior on x {
animation: Appearance?.animation.elementMove.numberAnimation.createObject(this)
}
Behavior on implicitWidth {
animation: Appearance?.animation.elementMove.numberAnimation.createObject(this)
}
}
}
Rectangle { // Tabbar bottom border
id: tabBarBottomBorder
Layout.fillWidth: true
implicitHeight: 1
color: root.colBorder
}
}
@@ -1,172 +0,0 @@
import qs.modules.common
import qs.modules.common.widgets
import qs.modules.common.functions
import Qt5Compat.GraphicalEffects
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
TabButton {
id: button
property string buttonText
property string buttonIcon
property real minimumWidth: 110
property bool selected: false
property int tabContentWidth: contentItem.children[0].implicitWidth
property int rippleDuration: 1200
height: buttonBackground.height
implicitWidth: Math.max(tabContentWidth, buttonBackground.implicitWidth, minimumWidth)
property color colBackground: ColorUtils.transparentize(Appearance?.colors.colLayer1Hover, 1) || "transparent"
property color colBackgroundHover: Appearance?.colors.colLayer1Hover ?? "#E5DFED"
property color colRipple: Appearance?.colors.colLayer1Active ?? "#D6CEE2"
property color colActive: Appearance?.colors.colPrimary ?? "#65558F"
property color colInactive: Appearance?.colors.colOnLayer1 ?? "#45464F"
component RippleAnim: NumberAnimation {
duration: rippleDuration
easing.type: Appearance?.animation.elementMoveEnter.type
easing.bezierCurve: Appearance?.animationCurves.standardDecel
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onPressed: (event) => {
button.click() // Because the MouseArea already consumed the event
const {x,y} = event
const stateY = buttonBackground.y;
rippleAnim.x = x;
rippleAnim.y = y - stateY;
const dist = (ox,oy) => ox*ox + oy*oy
const stateEndY = stateY + buttonBackground.height
rippleAnim.radius = Math.sqrt(Math.max(dist(0, stateY), dist(0, stateEndY), dist(width, stateY), dist(width, stateEndY)))
rippleFadeAnim.complete();
rippleAnim.restart();
}
onReleased: (event) => {
rippleFadeAnim.restart();
}
}
RippleAnim {
id: rippleFadeAnim
duration: rippleDuration * 2
target: ripple
property: "opacity"
to: 0
}
SequentialAnimation {
id: rippleAnim
property real x
property real y
property real radius
PropertyAction {
target: ripple
property: "x"
value: rippleAnim.x
}
PropertyAction {
target: ripple
property: "y"
value: rippleAnim.y
}
PropertyAction {
target: ripple
property: "opacity"
value: 1
}
ParallelAnimation {
RippleAnim {
target: ripple
properties: "implicitWidth,implicitHeight"
from: 0
to: rippleAnim.radius * 2
}
}
}
background: Rectangle {
id: buttonBackground
radius: Appearance?.rounding.small
implicitHeight: 50
color: (button.hovered ? button.colBackgroundHover : button.colBackground)
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Rectangle {
width: buttonBackground.width
height: buttonBackground.height
radius: buttonBackground.radius
}
}
Behavior on color {
animation: Appearance?.animation.elementMoveFast.colorAnimation.createObject(this)
}
Item {
id: ripple
width: ripple.implicitWidth
height: ripple.implicitHeight
opacity: 0
property real implicitWidth: 0
property real implicitHeight: 0
visible: width > 0 && height > 0
Behavior on opacity {
animation: Appearance?.animation.elementMoveFast.colorAnimation.createObject(this)
}
RadialGradient {
anchors.fill: parent
gradient: Gradient {
GradientStop { position: 0.0; color: button.colRipple }
GradientStop { position: 0.3; color: button.colRipple }
GradientStop { position: 0.5 ; color: Qt.rgba(button.colRipple.r, button.colRipple.g, button.colRipple.b, 0) }
}
}
transform: Translate {
x: -ripple.width / 2
y: -ripple.height / 2
}
}
}
contentItem: Item {
anchors.centerIn: buttonBackground
ColumnLayout {
anchors.centerIn: parent
spacing: 0
MaterialSymbol {
visible: buttonIcon?.length > 0
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
text: buttonIcon
iconSize: Appearance?.font.pixelSize.hugeass ?? 25
fill: selected ? 1 : 0
color: selected ? button.colActive : button.colInactive
Behavior on color {
animation: Appearance?.animation.elementMoveFast.colorAnimation.createObject(this)
}
}
StyledText {
id: buttonTextWidget
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
font.pixelSize: Appearance?.font.pixelSize.small
color: selected ? button.colActive : button.colInactive
text: buttonText
Behavior on color {
animation: Appearance?.animation.elementMoveFast.colorAnimation.createObject(this)
}
}
}
}
}
@@ -38,6 +38,7 @@ Scope {
root.resetTargetAction(); root.resetTargetAction();
root.clearText(); root.clearText();
root.unlockInProgress = false; root.unlockInProgress = false;
stopFingerPam();
} }
Timer { Timer {
@@ -69,7 +70,9 @@ Scope {
} }
function stopFingerPam() { function stopFingerPam() {
fingerPam.abort(); if (fingerPam.running) {
fingerPam.abort();
}
} }
Process { Process {
@@ -119,6 +119,7 @@ MouseArea {
ToolbarTextField { ToolbarTextField {
id: passwordBox id: passwordBox
Layout.rightMargin: -Layout.leftMargin
placeholderText: GlobalStates.screenUnlockFailed ? Translation.tr("Incorrect password") : Translation.tr("Enter password") placeholderText: GlobalStates.screenUnlockFailed ? Translation.tr("Incorrect password") : Translation.tr("Enter password")
// Style // Style
@@ -156,11 +157,11 @@ MouseArea {
// Shake when wrong password // Shake when wrong password
SequentialAnimation { SequentialAnimation {
id: wrongPasswordShakeAnim id: wrongPasswordShakeAnim
NumberAnimation { target: passwordBox; property: "x"; to: -30; duration: 50 } NumberAnimation { target: passwordBox; property: "Layout.leftMargin"; to: -30; duration: 50 }
NumberAnimation { target: passwordBox; property: "x"; to: 30; duration: 50 } NumberAnimation { target: passwordBox; property: "Layout.leftMargin"; to: 30; duration: 50 }
NumberAnimation { target: passwordBox; property: "x"; to: -15; duration: 40 } NumberAnimation { target: passwordBox; property: "Layout.leftMargin"; to: -15; duration: 40 }
NumberAnimation { target: passwordBox; property: "x"; to: 15; duration: 40 } NumberAnimation { target: passwordBox; property: "Layout.leftMargin"; to: 15; duration: 40 }
NumberAnimation { target: passwordBox; property: "x"; to: 0; duration: 30 } NumberAnimation { target: passwordBox; property: "Layout.leftMargin"; to: 0; duration: 30 }
} }
Connections { Connections {
target: GlobalStates target: GlobalStates
@@ -224,8 +224,8 @@ Item {
} }
z: Drag.active ? root.windowDraggingZ : (root.windowZ + windowData?.floating) z: Drag.active ? root.windowDraggingZ : (root.windowZ + windowData?.floating)
Drag.hotSpot.x: targetWindowWidth / 2 Drag.hotSpot.x: width / 2
Drag.hotSpot.y: targetWindowHeight / 2 Drag.hotSpot.y: height / 2
MouseArea { MouseArea {
id: dragArea id: dragArea
anchors.fill: parent anchors.fill: parent
@@ -17,7 +17,7 @@ PanelWindow {
color: "transparent" color: "transparent"
WlrLayershell.namespace: "quickshell:regionSelector" WlrLayershell.namespace: "quickshell:regionSelector"
WlrLayershell.layer: WlrLayer.Overlay WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
exclusionMode: ExclusionMode.Ignore exclusionMode: ExclusionMode.Ignore
anchors { anchors {
left: true left: true
@@ -30,12 +30,7 @@ def image_colorfulness(image):
# scheme-content respects the image's colors very well, but it might # scheme-content respects the image's colors very well, but it might
# look too saturated, so we only use it for not very colorful images to be safe # look too saturated, so we only use it for not very colorful images to be safe
def pick_scheme(colorfulness): def pick_scheme(colorfulness):
if colorfulness < 10: if colorfulness < 40:
# return "scheme-monochrome"
return "scheme-content"
elif colorfulness < 20:
return "scheme-content"
elif colorfulness < 50:
return "scheme-neutral" return "scheme-neutral"
else: else:
return "scheme-tonal-spot" return "scheme-tonal-spot"
@@ -86,6 +86,10 @@ Singleton {
return str.toLowerCase().replace(/\s+/g, "-"); return str.toLowerCase().replace(/\s+/g, "-");
} }
function getUndescoreToKebabAppName(str) {
return str.toLowerCase().replace(/_/g, "-");
}
function guessIcon(str) { function guessIcon(str) {
if (!str || str.length == 0) return "image-missing"; if (!str || str.length == 0) return "image-missing";
@@ -124,6 +128,8 @@ Singleton {
const kebabNormalizedGuess = getKebabNormalizedAppName(str); const kebabNormalizedGuess = getKebabNormalizedAppName(str);
if (iconExists(kebabNormalizedGuess)) return kebabNormalizedGuess; if (iconExists(kebabNormalizedGuess)) return kebabNormalizedGuess;
const undescoreToKebabGuess = getUndescoreToKebabAppName(str);
if (iconExists(undescoreToKebabGuess)) return undescoreToKebabGuess;
// Search in desktop entries // Search in desktop entries
const iconSearchResults = Fuzzy.go(str, preppedIcons, { const iconSearchResults = Fuzzy.go(str, preppedIcons, {
@@ -5,7 +5,6 @@ pkgdesc='Illogical Impulse Basic Dependencies'
arch=(any) arch=(any)
license=(None) license=(None)
depends=( depends=(
axel
bc bc
coreutils coreutils
cliphist cliphist
@@ -14,7 +13,6 @@ depends=(
wget wget
ripgrep ripgrep
jq jq
meson
xdg-user-dirs xdg-user-dirs
# Used in install script # Used in install script
rsync rsync
@@ -6,16 +6,10 @@ arch=(any)
license=(None) license=(None)
depends=( depends=(
hypridle hypridle
hyprcursor
hyprland hyprland
hyprland-qtutils
hyprland-qt-support
hyprlang
hyprlock hyprlock
hyprpicker hyprpicker
hyprsunset hyprsunset
hyprutils
hyprwayland-scanner
xdg-desktop-portal-hyprland xdg-desktop-portal-hyprland
wl-clipboard wl-clipboard
) )
@@ -12,5 +12,4 @@ depends=(
libsoup3 libsoup3
libportal-gtk4 libportal-gtk4
gobject-introspection gobject-introspection
sassc
) )
@@ -9,7 +9,7 @@ conflicts=("quickshell-git")
_pkgname=quickshell _pkgname=quickshell
pkgname="$_prefix-$_pkgname-git" pkgname="$_prefix-$_pkgname-git"
pkgver=0.1.0.r1 pkgver=0.1.0.r1
pkgrel=3 pkgrel=4
pkgdesc="$_pkgname-git which version pinned for $_prefix" pkgdesc="$_pkgname-git which version pinned for $_prefix"
arch=(x86_64 aarch64) arch=(x86_64 aarch64)
url='https://git.outfoxxed.me/quickshell/quickshell' url='https://git.outfoxxed.me/quickshell/quickshell'
@@ -26,6 +26,21 @@ depends=(
'libdrm' 'libdrm'
'mesa' 'mesa'
'google-breakpad' 'google-breakpad'
# NOTE: Below are custom dependencies of illogical-impulse
qt6-5compat
qt6-avif-image-plugin
qt6-imageformats
qt6-multimedia
qt6-positioning
qt6-quicktimeline
qt6-sensors
qt6-svg
qt6-tools
qt6-translations
qt6-virtualkeyboard
qt6-wayland
kdialog
syntax-highlighting
) )
makedepends=( makedepends=(
'spirv-tools' 'spirv-tools'
@@ -1,26 +1,10 @@
pkgname=illogical-impulse-toolkit pkgname=illogical-impulse-toolkit
pkgver=1.0 pkgver=1.0
pkgrel=1 pkgrel=2
pkgdesc='Illogical Impulse GTK/Qt Dependencies' pkgdesc='Illogical Impulse Toolkit Dependencies'
arch=(any) arch=(any)
license=(None) license=(None)
depends=( depends=(
kdialog
qt6-5compat
qt6-avif-image-plugin
qt6-base
qt6-declarative
qt6-imageformats
qt6-multimedia
qt6-positioning
qt6-quicktimeline
qt6-sensors
qt6-svg
qt6-tools
qt6-translations
qt6-virtualkeyboard
qt6-wayland
syntax-highlighting
upower upower
wtype wtype
ydotool ydotool
@@ -6,13 +6,11 @@ arch=(any)
license=(None) license=(None)
depends=( depends=(
fuzzel fuzzel
glib2 # for `gsettings` it seems? glib2
imagemagick imagemagick
hypridle hypridle
hyprutils
hyprlock hyprlock
hyprpicker hyprpicker
nm-connection-editor
songrec songrec
translate-shell translate-shell
wlogout wlogout
@@ -2,7 +2,6 @@
### Must be one package per line as it needs to be compared against the explicitly installed list from pacman ### Must be one package per line as it needs to be compared against the explicitly installed list from pacman
illogical-impulse-ags illogical-impulse-ags
archlinux-xdg-menu archlinux-xdg-menu
axel
bc bc
coreutils coreutils
cliphist cliphist
@@ -14,7 +13,6 @@ wget
ripgrep ripgrep
gojq gojq
npm npm
meson
typescript typescript
gjs gjs
xdg-user-dirs xdg-user-dirs
+6 -1
View File
@@ -9,7 +9,12 @@
Note that this script must be idempotent. Note that this script must be idempotent.
TODO: TODO:
- [ ] Write a proper `flake.nix` and `home.nix` and other files under `dist-nix/home-manager/` to install all dependencies that `dist-arch/` does. (**excluding** the screenlock) - [ ] Fix all TODOs inside `dist-nix`.
- [ ] Warn user if inode-limited filesystem (typically ext4) is used.
- [ ] Deal with error when running `systemctl --user enable ydotool --now`:
```plain
Failed to connect to user scope bus via local transport: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)
```
## Attentions ## Attentions
### PAM ### PAM
+25 -429
View File
@@ -1,57 +1,8 @@
{ {
"nodes": { "nodes": {
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1760101617,
"narHash": "sha256-8jf/3ZCi+B7zYpIyV04+3wm72BD7Z801IlOzsOACR7I=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "1826a9923881320306231b1c2090379ebf9fa4f8",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
@@ -67,28 +18,6 @@
"type": "github" "type": "github"
} }
}, },
"gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -96,290 +25,31 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758463745, "lastModified": 1762296971,
"narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=", "narHash": "sha256-Jyv3L5rrUYpecON+9zyFz2VqgTSTsIG35fXuCyuCQv0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3", "rev": "34fe48801d2a5301b814eaa1efb496499d06cebc",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-25.05", "ref": "master",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1753964049,
"narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprgraphics": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1760445448,
"narHash": "sha256-fXGjL6dw31FPFRrmIemzGiNSlfvEJTJNsmadZi+qNhI=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "50fb9f069219f338a11cf0bcccb9e58357d67757",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprgraphics",
"type": "github"
}
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprgraphics": "hyprgraphics",
"hyprland-protocols": "hyprland-protocols",
"hyprland-qtutils": "hyprland-qtutils",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems",
"xdph": "xdph"
},
"locked": {
"lastModified": 1761780088,
"narHash": "sha256-ylKrWQeIAGyysfHbgZpcWUs9UsbiOBIVXTPqaiV3lf0=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "6ade4d58cab67e18aa758ef664e36421cab4d8b2",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1759610243,
"narHash": "sha256-+KEVnKBe8wz+a6dTLq8YDcF3UrhQElwsYJaVaHXJtoI=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "bd153e76f751f150a09328dbdeb5e4fab9d23622",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprland-qt-support": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprland-qtutils",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"hyprland-qtutils",
"nixpkgs"
],
"systems": [
"hyprland",
"hyprland-qtutils",
"systems"
]
},
"locked": {
"lastModified": 1749154592,
"narHash": "sha256-DO7z5CeT/ddSGDEnK9mAXm1qlGL47L3VAHLlLXoCjhE=",
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"rev": "4c8053c3c888138a30c3a6c45c2e45f5484f2074",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"type": "github"
}
},
"hyprland-qtutils": {
"inputs": {
"hyprland-qt-support": "hyprland-qt-support",
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprland-qtutils",
"hyprlang",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1759080228,
"narHash": "sha256-RgDoAja0T1hnF0pTc56xPfLfFOO8Utol2iITwYbUhTk=",
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"rev": "629b15c19fa4082e4ce6be09fdb89e8c3312aed7",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1758927902,
"narHash": "sha256-LZgMds7M94+vuMql2bERQ6LiFFdhgsEFezE4Vn+Ys3A=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "4dafa28d4f79877d67a7d1a654cddccf8ebf15da",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1759619523,
"narHash": "sha256-r1ed7AR2ZEb2U8gy321/Xcp1ho2tzn+gG1te/Wxsj1A=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "3df7bde01efb3a3e8e678d1155f2aa3f19e177ef",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1755184602,
"narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"nixgl": { "nixgl": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1752054764, "lastModified": 1762090880,
"narHash": "sha256-Ob/HuUhANoDs+nvYqyTKrkcPXf4ZgXoqMTQoCK0RFgQ=", "narHash": "sha256-fbRQzIGPkjZa83MowjbD2ALaJf9y6KMDdJBQMKFeY/8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixGL", "repo": "nixGL",
"rev": "a8e1ce7d49a149ed70df676785b07f63288f53c5", "rev": "b6105297e6f0cd041670c3e8628394d4ee247ed5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -389,22 +59,6 @@
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1761114652,
"narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1746378225, "lastModified": 1746378225,
"narHash": "sha256-OeRSuL8PUjIfL3Q0fTbNJD/fmv1R+K2JAOqWJd3Oceg=", "narHash": "sha256-OeRSuL8PUjIfL3Q0fTbNJD/fmv1R+K2JAOqWJd3Oceg=",
@@ -419,68 +73,51 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1761597516, "lastModified": 1762111121,
"narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=", "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "daf6dc47aa4b44791372d6139ab7b25269184d55", "rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "nixos-25.05", "ref": "nixos-unstable",
"type": "indirect" "type": "indirect"
} }
}, },
"pre-commit-hooks": { "quickshell": {
"inputs": { "inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"hyprland",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1760663237, "lastModified": 1761821581,
"narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=", "narHash": "sha256-nLuc6jA7z+H/6bHPEBSOYPbz7RtvNCZiTKmYItJuBmM=",
"owner": "cachix", "owner": "quickshell-mirror",
"repo": "git-hooks.nix", "repo": "quickshell",
"rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37", "rev": "db1777c20b936a86528c1095cbcb1ebd92801402",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "cachix", "owner": "quickshell-mirror",
"repo": "git-hooks.nix", "repo": "quickshell",
"rev": "db1777c20b936a86528c1095cbcb1ebd92801402",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland",
"nixgl": "nixgl", "nixgl": "nixgl",
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_2",
"quickshell": "quickshell"
} }
}, },
"systems": { "systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -494,47 +131,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1760713634,
"narHash": "sha256-5HXelmz2x/uO26lvW7MudnadbAfoBnve4tRBiDVLtOM=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "753bbbdf6a052994da94062e5b753288cef28dfb",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",
+6 -5
View File
@@ -3,15 +3,15 @@
description = "illogical-impulse"; description = "illogical-impulse";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-25.05"; # Qt 6.10 is not yet available from released version of nixpkgs.
#nixpkgs.url = "nixpkgs/nixos-25.05";
nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-25.05"; #url = "github:nix-community/home-manager/release-25.05";
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
#hyprland = {
# url = "github:hyprwm/Hyprland";
#};
nixgl.url = "github:nix-community/nixGL"; nixgl.url = "github:nix-community/nixGL";
quickshell = { quickshell = {
url = "github:quickshell-mirror/quickshell/db1777c20b936a86528c1095cbcb1ebd92801402"; url = "github:quickshell-mirror/quickshell/db1777c20b936a86528c1095cbcb1ebd92801402";
@@ -24,6 +24,7 @@
home_attrs = rec { home_attrs = rec {
username = import ./username.nix; username = import ./username.nix;
homeDirectory = "/home/${username}"; homeDirectory = "/home/${username}";
# Do not edit stateVersion value, see https://github.com/nix-community/home-manager/issues/5794
stateVersion = "25.05"; stateVersion = "25.05";
}; };
system = "x86_64-linux"; system = "x86_64-linux";
+32 -52
View File
@@ -12,16 +12,22 @@
xdg-desktop-portal-wlr xdg-desktop-portal-wlr
kdePackages.xdg-desktop-portal-kde kdePackages.xdg-desktop-portal-kde
]; ];
config.hyprland = { # The following seems to generate ~/.config/xdg-desktop-portal conflicting with the one under dots/
default = [ "hyprland" "gtk" ]; #config.hyprland = {
"org.freedesktop.impl.portal.ScreenCast" = [ # default = [ "hyprland" "gtk" ];
"gnome" # "org.freedesktop.impl.portal.ScreenCast" = [ "gnome" ];
]; #};
};
}; };
## Allow fontconfig to discover fonts in home.packages # The following seems to generate ~/.config/fontconfig conflicting with the one under dots/
fonts.fontconfig.enable = true; #fonts.fontconfig.enable = true;
wayland.windowManager.hyprland = {
## Make sure home-manager not generate ~/.config/hypr/hyprland.conf
systemd.enable = false; plugins = []; settings = {}; extraConfig = "";
enable = true;
## Use NixGL
package = config.lib.nixGL.wrap pkgs.hyprland;
};
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
@@ -30,16 +36,18 @@
## inetutils: provides hostname, ifconfig, ping, etc. ## inetutils: provides hostname, ifconfig, ping, etc.
## libnotify: provides notify-send ## libnotify: provides notify-send
inetutils libnotify inetutils libnotify
foot # Used in Quickshell and Hyprland config; its config is also included
##### Other basic things ##### ##### Other MISC #####
dbus xorg.xlsclients networkmanager dbus xorg.xlsclients # some basic things
foot # Used in Quickshell and Hyprland config; its config is also included
kdePackages.kconfig # provide kwriteconfig6, used in install script
##### Not work, to be solved ##### ##### Not work, to be solved #####
# swaylock pamtester # hyprlock pamtester
# TODO: migrate all packages from dist-arch. Note that for each package, must know why it's needed and how it's used specifically, cuz things may be need tweak to properly use the package installed by Nix, especially those have hardcoded path /usr/* . # NOTE: below are migrated from dist-arch. For each package, must know why it's needed and how it's used specifically, cuz things may be need tweak to properly use the package installed by Nix, for example those have hardcoded path /usr/* .
### illogical-impulse-audio ### illogical-impulse-audio
libcava #cava (Used in Quickshell config) libcava #cava (Used in Quickshell config)
lxqt.pavucontrol-qt #pavucontrol-qt (Used in Hyprland and Quickshell config) lxqt.pavucontrol-qt #pavucontrol-qt (Used in Hyprland and Quickshell config)
@@ -56,7 +64,6 @@
### illogical-impulse-basic ### illogical-impulse-basic
#axel#axel (TODOrm: actually not needed cuz it's only used for install Bibata_Cursor in package-installers.sh)
bc #bc (Used in quickshell/ii/scripts/colors/switchwall.sh for example) bc #bc (Used in quickshell/ii/scripts/colors/switchwall.sh for example)
uutils-coreutils-noprefix #coreutils (Too many executables involved, not sure where been used) uutils-coreutils-noprefix #coreutils (Too many executables involved, not sure where been used)
cliphist #cliphist (Used in Hyprland and Quickshell config) cliphist #cliphist (Used in Hyprland and Quickshell config)
@@ -65,7 +72,6 @@
wget #wget (Used in Quickshell config) wget #wget (Used in Quickshell config)
ripgrep #ripgrep (Not sure where been used) ripgrep #ripgrep (Not sure where been used)
jq #jq (Widely used) jq #jq (Widely used)
#meson (TODOrm: Actually not needed. It was used in building AGS.)
xdg-user-dirs #xdg-user-dirs (Used in Hyprland and Quickshell config) xdg-user-dirs #xdg-user-dirs (Used in Hyprland and Quickshell config)
rsync #rsync (Used in install script) rsync #rsync (Used in install script)
yq-go #go-yq (Used in install script) yq-go #go-yq (Used in install script)
@@ -79,9 +85,9 @@
adw-gtk3 #adw-gtk-theme-git (https://github.com/lassekongo83/adw-gtk3) (Used in Quickshell config) adw-gtk3 #adw-gtk-theme-git (https://github.com/lassekongo83/adw-gtk3) (Used in Quickshell config)
kdePackages.breeze kdePackages.breeze-icons #breeze (Used in kdeglobals config) kdePackages.breeze kdePackages.breeze-icons #breeze (Used in kdeglobals config)
#breeze-plus (https://github.com/mjkim0727/breeze-plus) (TODO: Not available as nixpkg) (Used in kde-material-you-colors config) #breeze-plus (https://github.com/mjkim0727/breeze-plus) (TODO: Not available as nixpkg) (Used in kde-material-you-colors config)
#darkly-bin (TODOrm: seems not being used?) darkly darkly-qt5 #darkly-bin (darkly is supposed to be set as the theme for Qt apps, just have not figured out how to properly set it yet.)
eza #eza (Used in Fish config: `alias ls 'eza --icons'`) eza #eza (Used in Fish config: `alias ls 'eza --icons'`)
#fish (Probably should not install via Nix) #fish (Install via system PM instead; TODO: should install via nix in future when authentication problem fixed)
fontconfig #fontconfig (Basic thing) fontconfig #fontconfig (Basic thing)
kitty #kitty (Used in fuzzel, Hyprland, kdeglobals and Quickshell config; kitty config is also included as dots) kitty #kitty (Used in fuzzel, Hyprland, kdeglobals and Quickshell config; kitty config is also included as dots)
matugen #matugen-bin (Used in Quickshell) matugen #matugen-bin (Used in Quickshell)
@@ -98,26 +104,20 @@
### illogical-impulse-hyprland ### illogical-impulse-hyprland
hypridle #hypridle (Used for loginctl to lock session) hypridle #hypridle (Used for loginctl to lock session)
#hyprcursor (TODOrm: Seems not being used?)
#hyprland (Need NixGL, included elsewhere) #hyprland (Need NixGL, included elsewhere)
#hyprland-qtutils (TODOrm: Not needed, it's already a dependency of Hyprland itself, and it's not being used anywhere in this repo) #hyprlock (Should not be installed via Nix; TODO: should install via nix in future when authentication problem fixed)
#hyprland-qt-support (TODOrm: Not needed, it's already a dep of hyprland-qtutils which is a dep of Hyprland, and it's not being used anywhere in this repo)
#hyprlang (TODOrm: Not needed, it's already a dependency of Hyprland, hypridle, etc.)
#hyprlock (Should not be installed via Nix)
hyprpicker #hyprpicker (Used in Hyprland and Quickshell config) hyprpicker #hyprpicker (Used in Hyprland and Quickshell config)
hyprsunset #hyprsunset (Used in Quickshell config) hyprsunset #hyprsunset (Used in Quickshell config)
#hyprutils #hyprutils (TODOrm: Not needed, it's already a dep of Hyprland and not being used anywhere in this repo)
#hyprwayland-scanner (TODOrm: Not needed, it's already a dep of Hyprland and not being used anywhere in this repo)
#xdg-desktop-portal-hyprland (DUPLICATE) #xdg-desktop-portal-hyprland (DUPLICATE)
wl-clipboard #wl-clipboard (Surely needed) wl-clipboard #wl-clipboard (Surely needed)
### illogical-impulse-kde ### illogical-impulse-kde
kdePackages.bluedevil #bluedevil (Seems not being used anywhere, maybe a part of KDE settings panel) kdePackages.bluedevil #bluedevil (Seems not being used anywhere, maybe a part of KDE settings panel)
#gnome-keyring #gnome-keyring (TODO: Maybe should not be installed by Nix) (Provide executable gnome-keyring-daemon, used in Hyprland and Quickshell config) #gnome-keyring #gnome-keyring (TODO: Install via system PM instead; should install via nix in future when authentication problem fixed) (Provide executable gnome-keyring-daemon, used in Hyprland and Quickshell config)
networkmanager #networkmanager networkmanager #networkmanager
kdePackages.plasma-nm #plasma-nm (Seems not being used anywhere, maybe a part of KDE settings panel) kdePackages.plasma-nm #plasma-nm (Seems not being used anywhere, maybe a part of KDE settings panel)
#polkit-kde-agent (TODO: Maybe should not install by Nix) #polkit-kde-agent (TODO: Install via system PM instead; should install via nix in future when authentication problem fixed)
kdePackages.dolphin #dolphin (Used in Hyprland and Quickshell config) kdePackages.dolphin #dolphin (Used in Hyprland and Quickshell config)
kdePackages.systemsettings #systemsettings (Used in Hyprland keybinds.conf) kdePackages.systemsettings #systemsettings (Used in Hyprland keybinds.conf)
@@ -141,18 +141,13 @@
### illogical-impulse-python ### illogical-impulse-python
clang #clang (Some python package may need this to be built, e.g. #1235) #clang (Some python package may need this to be built, e.g. #1235; However when cmake is installed by Nix, then pkg-config, cairo etc will be used but they can only be accessible in Nix development environment for example nix-shell, nix develop, etc. See `sdata/uv/shell.nix`. )
uv #uv (Used for python venv) uv #uv (Used for python venv)
gtk4 #gtk4 (Not explicitly used) gtk4 #gtk4 (Not explicitly used)
libadwaita #libadwaita (Not explicitly used) libadwaita #libadwaita (Not explicitly used)
libsoup_3 #libsoup3 (Not explicitly used) libsoup_3 #libsoup3 (Not explicitly used)
libportal-gtk4 #libportal-gtk4 (Not explicitly used) libportal-gtk4 #libportal-gtk4 (Not explicitly used)
gobject-introspection #gobject-introspection (Not explicitly used) gobject-introspection #gobject-introspection (Not explicitly used)
#sassc (TODOrm: Not used anymore)
### illogical-impulse-quickshell-git
#quickshell.packages.x86_64-linux.default (NixGL applicable, included elsewhere)
### illogical-impulse-screencapture ### illogical-impulse-screencapture
@@ -165,23 +160,6 @@
### illogical-impulse-toolkit ### illogical-impulse-toolkit
kdePackages.kdialog #kdialog (Used in Quickshell config)
# TODO: Deal with qt6 things, see https://nixos.wiki/wiki/Qt
#qt6-5compat (Maybe for some qt support)
#qt6-avif-image-plugin (Maybe for some qt support)
#qt6-base (Maybe for some qt support)
#qt6-declarative (Maybe for some qt support)
#qt6-imageformats (Maybe for some qt support)
#qt6-multimedia (Maybe for some qt support)
#qt6-positioning (Maybe for some qt support)
#qt6-quicktimeline (Maybe for some qt support)
#qt6-sensors (Maybe for some qt support)
#qt6-svg (Maybe for some qt support)
#qt6-tools (Maybe for some qt support)
#qt6-translations (Maybe for some qt support)
#qt6-virtualkeyboard (Maybe for some qt support)
#qt6-wayland (Maybe for some qt support)
kdePackages.syntax-highlighting #syntax-highlighting (Used in Quickshell config)
upower #upower (Used in Quickshell config) upower #upower (Used in Quickshell config)
wtype #wtype (Used in Hyprland scripts/fuzzel-emoji.sh) wtype #wtype (Used in Hyprland scripts/fuzzel-emoji.sh)
ydotool #ydotool (Used in Quickshell config) ydotool #ydotool (Used in Quickshell config)
@@ -195,15 +173,17 @@
#hyprutils (DUPLICATE) #hyprutils (DUPLICATE)
#hyprlock (DUPLICATE) #hyprlock (DUPLICATE)
#hyprpicker (DUPLICATE) #hyprpicker (DUPLICATE)
#nm-connection-editor (TODOrm: Not needed)
songrec #songrec (Used in Quickshell config) songrec #songrec (Used in Quickshell config)
translate-shell #translate-shell (Used in Quickshell config) translate-shell #translate-shell (Used in Quickshell config)
wlogout #wlogout (Used in Hyprland config) wlogout #wlogout (Used in Hyprland config)
] ]
++ [ ++ [
(config.lib.nixGL.wrap pkgs.hyprland) #(config.lib.nixGL.wrap pkgs.hyprland)
(config.lib.nixGL.wrap quickshell.packages.x86_64-linux.default)
### illogical-impulse-quickshell-git
#(config.lib.nixGL.wrap quickshell.packages.x86_64-linux.default)
(import ./quickshell.nix { inherit pkgs quickshell; nixGLWrap = config.lib.nixGL.wrap; })
]; ];
}//home_attrs; }//home_attrs;
} }
@@ -0,0 +1,54 @@
{ pkgs, quickshell, nixGLWrap, ... }:
let
qs = nixGLWrap quickshell.packages.x86_64-linux.default;
in pkgs.stdenv.mkDerivation {
name = "illogical-impulse-quickshell-wrapper";
meta = with pkgs.lib; {
description = "Quickshell wrapped with NixGL + bundled Qt deps for home-manager usage";
license = licenses.gpl3Only;
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [
pkgs.makeWrapper
pkgs.qt6.wrapQtAppsHook
];
buildInputs = with pkgs; [
qs
kdePackages.qtwayland
kdePackages.qtpositioning
kdePackages.qtlocation
kdePackages.syntax-highlighting
gsettings-desktop-schemas
# https://nixos.wiki/wiki/Qt
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/qt-6/srcs.nix
qt6.qtbase #qt6-base
qt6.qtdeclarative #qt6-declarative
qt6.qt5compat #qt6-5compat
#qt6-avif-image-plugin (TODO: seems not available as nixpkg)
qt6.qtimageformats #qt6-imageformats
qt6.qtmultimedia #qt6-multimedia
qt6.qtpositioning #qt6-positioning
qt6.qtquicktimeline #qt6-quicktimeline
qt6.qtsensors #qt6-sensors
qt6.qtsvg #qt6-svg
qt6.qttools #qt6-tools
qt6.qttranslations #qt6-translations
qt6.qtvirtualkeyboard #qt6-virtualkeyboard
qt6.qtwayland #qt6-wayland
kdePackages.kdialog #kdialog (Used in Quickshell config)
kdePackages.syntax-highlighting #syntax-highlighting (Used in Quickshell config)
];
installPhase = ''
mkdir -p $out/bin
ls -l ${qs}/bin || true
makeWrapper ${qs}/bin/qs $out/bin/qs \
--prefix XDG_DATA_DIRS : ${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}
chmod +x $out/bin/qs
'';
}
+60 -76
View File
@@ -8,23 +8,39 @@ function vianix-warning(){
printf "despite that this should be reversible.\n" printf "despite that this should be reversible.\n"
pause pause
} }
function install_cmds(){
function install_home-manager(){ if [[ "$OS_DISTRO_ID" == "arch" || "$OS_DISTRO_ID_LIKE" == "arch" || "$OS_DISTRO_ID" == "cachyos" ]]; then
# https://nix-community.github.io/home-manager/index.xhtml#sec-install-standalone local pkgs=()
local cmd=home-manager for cmd in "$@";do
# Maybe installed already, just not sourced yet # For package name which is not cmd name, use "case" syntax to replace
try source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh pkgs+=($cmd)
command -v $cmd && return done
x sudo pacman -Syu
x nix-channel --add https://nixos.org/channels/nixos-25.05 nixpkgs-home x sudo pacman -S --noconfirm --needed "${pkgs[@]}"
x nix-channel --add https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz home-manager elif [[ "$OS_DISTRO_ID" == "debian" || "$OS_DISTRO_ID_LIKE" == "debian" ]]; then
x nix-channel --update local pkgs=()
x env NIX_PATH="nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs-home" nix-shell '<home-manager>' -A install for cmd in "$@";do
# For package name which is not cmd name, use "case" syntax to replace
command -v $cmd && return pkgs+=($cmd)
echo "Failed in installing $cmd." done
echo "Please install it by yourself and then retry." x sudo apt update -y
return 1 x sudo apt install -y "${pkgs[@]}"
elif [[ "$OS_DISTRO_ID" == "fedora" || "$OS_DISTRO_ID_LIKE" == "fedora" ]]; then
local pkgs=()
for cmd in "$@";do
# For package name which is not cmd name, use "case" syntax to replace
pkgs+=($cmd)
done
x sudo dnf install -y "${pkgs[@]}"
elif [[ "$OS_DISTRO_ID" =~ ^(opensuse-leap|opensuse-tumbleweed)$ ]] || [[ "$OS_DISTRO_ID_LIKE" =~ ^(opensuse|suse)(\ (opensuse|suse))?$ ]]; then
local pkgs=()
for cmd in "$@";do
# For package name which is not cmd name, use "case" syntax to replace
pkgs+=($cmd)
done
x sudo zypper refresh
x sudo zypper -n install "${pkgs[@]}"
fi
} }
function install_nix(){ function install_nix(){
# https://github.com/NixOS/experimental-nix-installer # https://github.com/NixOS/experimental-nix-installer
@@ -40,58 +56,28 @@ function install_nix(){
echo "Please install it by yourself and then retry." echo "Please install it by yourself and then retry."
return 1 return 1
} }
function install_curl(){ function install_home-manager(){
local cmd=curl # https://nix-community.github.io/home-manager/index.xhtml#sec-install-standalone
local cmd=home-manager
# Maybe installed already, just not sourced yet
try source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
command -v $cmd && return
if [[ "$OS_DISTRO_ID" == "arch" || "$OS_DISTRO_ID_LIKE" == "arch" || "$OS_DISTRO_ID" == "cachyos" ]]; then x nix-channel --add https://nixos.org/channels/nixos-25.05 nixpkgs-home
x sudo pacman -Syu x nix-channel --add https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz home-manager
x sudo pacman -S --noconfirm $cmd x nix-channel --update
elif [[ "$OS_DISTRO_ID" == "debian" || "$OS_DISTRO_ID_LIKE" == "debian" ]]; then x env NIX_PATH="nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs-home" nix-shell '<home-manager>' -A install
x sudo apt update
x sudo apt install $cmd
fi
command -v $cmd && return command -v $cmd && return
echo "Failed in installing $cmd." echo "Failed in installing $cmd."
echo "Please install it by yourself and then retry." echo "Please install it by yourself and then retry."
echo ""
echo "Hint: It's also possible that the installation is actually successful,"
echo "but your \"\$PATH\" is not properly set."
echo "This can happen when you have used \"su user\" to switch user."
echo "If this is the problem, use \"su - user\" instead."
return 1 return 1
} }
function install_fish(){
local cmd=fish
if [[ "$OS_DISTRO_ID" == "arch" || "$OS_DISTRO_ID_LIKE" == "arch" || "$OS_DISTRO_ID" == "cachyos" ]]; then
x sudo pacman -Syu
x sudo pacman -S --noconfirm $cmd
elif [[ "$OS_DISTRO_ID" == "debian" || "$OS_DISTRO_ID_LIKE" == "debian" ]]; then
x sudo apt update
x sudo apt install $cmd
fi
command -v $cmd && return
echo "Failed in installing $cmd."
echo "Please install it by yourself and then retry."
return 1
}
function install_swaylock(){
local cmd=swaylock
echo "Detecting command \"$cmd\"..."
command -v $cmd && return
echo "Command \"$cmd\" not found, try to install..."
if [[ "$OS_DISTRO_ID" == "arch" || "$OS_DISTRO_ID_LIKE" == "arch" || "$OS_DISTRO_ID" == "cachyos" ]]; then
x sudo pacman -Syu
x sudo pacman -S --noconfirm $cmd
elif [[ "$OS_DISTRO_ID" == "debian" || "$OS_DISTRO_ID_LIKE" == "debian" ]]; then
x sudo apt update
x sudo apt install $cmd
fi
command -v $cmd && return
echo "Failed in installing $cmd."
echo "Please install it by yourself and then retry."
return 1
}
function hm_deps(){ function hm_deps(){
SETUP_HM_DIR="${REPO_ROOT}/sdata/dist-nix/home-manager" SETUP_HM_DIR="${REPO_ROOT}/sdata/dist-nix/home-manager"
SETUP_USERNAME_NIXFILE="${SETUP_HM_DIR}/username.nix" SETUP_USERNAME_NIXFILE="${SETUP_HM_DIR}/username.nix"
@@ -110,21 +96,19 @@ function hm_deps(){
vianix-warning vianix-warning
if ! command -v curl >/dev/null 2>&1;then NOT_FOUND_CMDS=()
echo -e "${STY_YELLOW}[$0]: \"curl\" not found.${STY_RST}" TEST_CMDS=(curl fish swaylock gnome-keyring)
showfun install_curl for cmd in "${TEST_CMDS[@]}"; do
v install_curl if ! command -v $cmd >/dev/null 2>&1;then
fi NOT_FOUND_CMDS+=($cmd)
if ! command -v fish >/dev/null 2>&1;then fi
echo -e "${STY_YELLOW}[$0]: \"fish\" not found.${STY_RST}" done
showfun install_fish if [[ ${#NOT_FOUND_CMDS[@]} -gt 0 ]]; then
v install_fish echo -e "${STY_YELLOW}[$0]: Not found: ${NOT_FOUND_CMDS[*]}.${STY_RST}"
fi showfun install_cmds
if ! command -v swaylock >/dev/null 2>&1;then v install_cmds "${NOT_FOUND_CMDS[@]}"
echo -e "${STY_YELLOW}[$0]: \"swaylock\" not found.${STY_RST}"
showfun install_swaylock
v install_swaylock
fi fi
if ! command -v nix >/dev/null 2>&1;then if ! command -v nix >/dev/null 2>&1;then
echo -e "${STY_YELLOW}[$0]: \"nix\" not found.${STY_RST}" echo -e "${STY_YELLOW}[$0]: \"nix\" not found.${STY_RST}"
showfun install_nix showfun install_nix
+39
View File
@@ -0,0 +1,39 @@
# This script is meant to be sourced.
# It's not for directly running.
#####################################################################################
# These python packages are installed using uv into the venv (virtual environment). Once the folder of the venv gets deleted, they are all gone cleanly. So it's considered as setups, not dependencies.
showfun install-python-packages
v install-python-packages
if [[ -z $(getent group i2c) ]]; then
v sudo groupadd i2c
fi
v sudo usermod -aG video,i2c,input "$(whoami)"
if [[ ! -z $(systemctl --version) ]]; then
v bash -c "echo i2c-dev | sudo tee /etc/modules-load.d/i2c-dev.conf"
# TODO: find a proper way for enable Nix installed ydotool
if ! [[ "${INSTALL_VIA_NIX}" == true ]]; then
v systemctl --user enable ydotool --now
fi
v sudo systemctl enable bluetooth --now
elif [[ ! -z $(openrc --version) ]]; then
v bash -c "echo 'modules=i2c-dev' | sudo tee -a /etc/conf.d/modules"
v sudo rc-update add modules boot
v sudo rc-update add ydotool default
v sudo rc-update add bluetooth default
x sudo rc-service ydotool start
x sudo rc-service bluetooth start
else
printf "${STY_RED}"
printf "====================INIT SYSTEM NOT FOUND====================\n"
printf "${STY_RST}"
pause
fi
v gsettings set org.gnome.desktop.interface font-name 'Rubik 11'
v gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
v kwriteconfig6 --file kdeglobals --group KDE --key widgetStyle Darkly
+5 -1
View File
@@ -88,6 +88,10 @@ install-python-packages(){
# we need python 3.12 https://github.com/python-pillow/Pillow/issues/8089 # we need python 3.12 https://github.com/python-pillow/Pillow/issues/8089
x uv venv --prompt .venv $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV) -p 3.12 x uv venv --prompt .venv $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV) -p 3.12
x source $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate x source $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate
x uv pip install -r sdata/uv/requirements.txt if [[ "$INSTALL_VIA_NIX" = true ]]; then
x nix-shell ${REPO_ROOT}/sdata/uv/shell.nix --run "uv pip install -r ${REPO_ROOT}/sdata/uv/requirements.txt"
else
x uv pip install -r ${REPO_ROOT}/sdata/uv/requirements.txt
fi
x deactivate x deactivate
} }
+1 -1
View File
@@ -19,7 +19,7 @@ export OS_DISTRO_ID_LIKE=$(awk -F'=' '/^ID_LIKE=/ { gsub("\"","",$2); print tolo
if [[ "$INSTALL_VIA_NIX" == "true" ]]; then if [[ "$INSTALL_VIA_NIX" == "true" ]]; then
TARGET_ID=fallback TARGET_ID=nix
printf "${STY_YELLOW}" printf "${STY_YELLOW}"
printf "===WARNING===\n" printf "===WARNING===\n"
printf "./sdata/dist-${TARGET_ID}/install-setups.sh will be used.\n" printf "./sdata/dist-${TARGET_ID}/install-setups.sh will be used.\n"
+7 -3
View File
@@ -3,7 +3,6 @@
# shellcheck shell=bash # shellcheck shell=bash
# TODO: When --via-nix is specified, use dots-extra/vianix/hypridle.conf instead
# In case some dirs does not exists # In case some dirs does not exists
v mkdir -p $XDG_BIN_HOME $XDG_CACHE_HOME $XDG_CONFIG_HOME $XDG_DATA_HOME/icons v mkdir -p $XDG_BIN_HOME $XDG_CACHE_HOME $XDG_CONFIG_HOME $XDG_DATA_HOME/icons
@@ -80,13 +79,18 @@ case $SKIP_HYPRLAND in
v cp dots/.config/hypr/hyprland.conf $t v cp dots/.config/hypr/hyprland.conf $t
fi fi
t="$XDG_CONFIG_HOME/hypr/hypridle.conf" t="$XDG_CONFIG_HOME/hypr/hypridle.conf"
if [[ "$INSTALL_VIA_NIX" = true ]]; then
s=dots-extra/vianix/hypridle.conf
else
s=dots/.config/hypr/hypridle.conf
fi
if [ -f $t ];then if [ -f $t ];then
echo -e "${STY_BLUE}[$0]: \"$t\" already exists.${STY_RST}" echo -e "${STY_BLUE}[$0]: \"$t\" already exists.${STY_RST}"
v cp -f dots/.config/hypr/hypridle.conf $t.new v cp -f $s $t.new
existed_hypridle_conf=y existed_hypridle_conf=y
else else
echo -e "${STY_YELLOW}[$0]: \"$t\" does not exist yet.${STY_RST}" echo -e "${STY_YELLOW}[$0]: \"$t\" does not exist yet.${STY_RST}"
v cp dots/.config/hypr/hypridle.conf $t v cp $s $t
existed_hypridle_conf=n existed_hypridle_conf=n
fi fi
t="$XDG_CONFIG_HOME/hypr/hyprlock.conf" t="$XDG_CONFIG_HOME/hypr/hyprlock.conf"
+12
View File
@@ -0,0 +1,12 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
pkg-config
meson
ninja
cairo
dbus
dbus-glib
glib
];
}