Compare commits
3 commits
73d50fe80f
...
0de189372b
Author | SHA1 | Date | |
---|---|---|---|
0de189372b | |||
ac527695fa | |||
41b104b9a7 |
10 changed files with 628 additions and 322 deletions
|
@ -1,3 +1,5 @@
|
|||
import { GTK_ALIGN_CENTER, GTK_ALIGN_FILL } from '../constants.js'
|
||||
|
||||
const mpris = await Service.import("mpris")
|
||||
const players = mpris.bind("players")
|
||||
|
||||
|
@ -17,22 +19,130 @@ function lengthStr(length) {
|
|||
|
||||
/** @param {import('types/service/mpris').MprisPlayer} player */
|
||||
function Player(player) {
|
||||
return Widget.Label({ label: `${player.name}: ${player.cover_path}` })
|
||||
// return Widget.Overlay({
|
||||
// child: Widget.Box({
|
||||
// class_name: "img",
|
||||
// vpack: "start",
|
||||
// css: player.bind("cover_path").transform(p => `background-image: url('${p}');`),
|
||||
// }),
|
||||
// overlays: [
|
||||
// Widget.Label({ label: player.name }),
|
||||
// ],
|
||||
// })
|
||||
const artists = player.bind("track_artists").transform(a => a.join(", "))
|
||||
|
||||
const playPause = Widget.Button({
|
||||
className: "play-pause",
|
||||
onClicked: () => player.playPause(),
|
||||
visible: player.bind("can_play"),
|
||||
child: Widget.Icon({
|
||||
icon: player.bind("play_back_status").transform(s => {
|
||||
switch (s) {
|
||||
case "Playing": return PAUSE_ICON
|
||||
case "Paused":
|
||||
case "Stopped": return PLAY_ICON
|
||||
}
|
||||
}),
|
||||
}),
|
||||
})
|
||||
|
||||
const prev = Widget.Button({
|
||||
onClicked: () => player.previous(),
|
||||
visible: player.bind("can_go_prev"),
|
||||
child: Widget.Icon(PREV_ICON),
|
||||
})
|
||||
|
||||
const next = Widget.Button({
|
||||
onClicked: () => player.next(),
|
||||
visible: player.bind("can_go_next"),
|
||||
child: Widget.Icon(NEXT_ICON),
|
||||
})
|
||||
|
||||
const positionSlider = Widget.Slider({
|
||||
className: "position",
|
||||
drawValue: false,
|
||||
onChange: ({ value }) => player.position = value * player.length,
|
||||
visible: player.bind("length").as(l => l > 0),
|
||||
setup: self => {
|
||||
function update() {
|
||||
const value = player.position / player.length
|
||||
self.value = value > 0 ? value : 0
|
||||
}
|
||||
self.hook(player, update)
|
||||
self.hook(player, update, "position")
|
||||
self.poll(1000, update)
|
||||
},
|
||||
})
|
||||
|
||||
const positionLabel = Widget.Label({
|
||||
className: "position",
|
||||
hpack: "start",
|
||||
setup: self => {
|
||||
const update = (_, time) => {
|
||||
self.label = lengthStr(time || player.position)
|
||||
self.visible = player.length > 0
|
||||
}
|
||||
|
||||
self.hook(player, update, "position")
|
||||
self.poll(1000, update)
|
||||
},
|
||||
})
|
||||
|
||||
const lengthLabel = Widget.Label({
|
||||
className: "length",
|
||||
hpack: "end",
|
||||
visible: player.bind("length").transform(l => l > 0),
|
||||
label: player.bind("length").transform(lengthStr),
|
||||
})
|
||||
|
||||
return Widget.Overlay({
|
||||
className: "player",
|
||||
child: Widget.Box({
|
||||
className: "bg-img",
|
||||
vpack: "start",
|
||||
css: player.bind("cover_path").transform(p => `background-image: url('${p}');`),
|
||||
}),
|
||||
overlays: [
|
||||
Widget.Box({
|
||||
className: "bg-cover"
|
||||
}),
|
||||
Widget.Box({
|
||||
className: "overlay",
|
||||
vertical: true,
|
||||
halign: GTK_ALIGN_CENTER,
|
||||
children: [
|
||||
Widget.Box({
|
||||
className: "info",
|
||||
vertical: true,
|
||||
children: [
|
||||
Widget.Label({ className: "title", label: player.bind("track_title") }),
|
||||
Widget.Label({ className: "album", label: player.bind("track_album") }),
|
||||
Widget.Label({ className: "artist", label: artists }),
|
||||
],
|
||||
}),
|
||||
Widget.Box({
|
||||
vexpand: true,
|
||||
}),
|
||||
Widget.CenterBox({
|
||||
className: "controls",
|
||||
startWidget: positionLabel,
|
||||
centerWidget: Widget.Box({
|
||||
halign: GTK_ALIGN_CENTER,
|
||||
spacing: 20,
|
||||
children: [
|
||||
prev,
|
||||
playPause,
|
||||
next,
|
||||
],
|
||||
}),
|
||||
endWidget: lengthLabel,
|
||||
}),
|
||||
positionSlider,
|
||||
],
|
||||
})
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
function MediaContent() {
|
||||
const currentIdx = Variable(0);
|
||||
const currentPlayer = Utils.merge([currentIdx.bind(), players], (currentIdx, players) => {
|
||||
const idx = Math.min(currentIdx, players.length - 1);
|
||||
return players[idx];
|
||||
})
|
||||
|
||||
return Widget.Box({
|
||||
children: players.as(p => p.map(Player)),
|
||||
children: currentPlayer.as(p => [Player(p)]),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
59
ags/config/media/style.css
Normal file
59
ags/config/media/style.css
Normal file
|
@ -0,0 +1,59 @@
|
|||
.media > box {
|
||||
border-radius: 5px;
|
||||
|
||||
background-color: transparent;
|
||||
color: @ctp-text;
|
||||
}
|
||||
|
||||
.media .player .bg-img {
|
||||
border-radius: 5px;
|
||||
min-width: 400px;
|
||||
min-height: 200px;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.media .player .bg-cover {
|
||||
background: linear-gradient(alpha(@ctp-base, 0.5), @ctp-base);
|
||||
}
|
||||
|
||||
.media .player .overlay {
|
||||
border-radius: 5px;
|
||||
min-width: 400px;
|
||||
}
|
||||
|
||||
.media .player .info {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.media .player .controls {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.media .player .info .title {
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.media .player scale.position {
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.media .player scale.position trough {
|
||||
min-height: 4px;
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
background-color: @ctp-overlay0;
|
||||
}
|
||||
|
||||
.media .player scale.position highlight {
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
background-color: @ctp-lavender;
|
||||
}
|
||||
|
||||
.media .player scale.position slider {
|
||||
all: unset;
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
@import url("colors.css");
|
||||
@import url("notifications/style.css");
|
||||
@import url("media/style.css");
|
||||
|
||||
|
||||
.bar > box {
|
||||
|
@ -10,7 +11,6 @@
|
|||
color: @ctp-text;
|
||||
}
|
||||
|
||||
|
||||
.clock .time {
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
|
@ -20,10 +20,3 @@
|
|||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.media > box {
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
|
||||
background-color: alpha(@ctp-base, 0.95);
|
||||
color: @ctp-text;
|
||||
}
|
||||
|
|
298
flake.lock
generated
298
flake.lock
generated
|
@ -2,17 +2,17 @@
|
|||
"nodes": {
|
||||
"ags": {
|
||||
"inputs": {
|
||||
"astal": "astal",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721306136,
|
||||
"narHash": "sha256-VKPsIGf3/a+RONBipx4lEE4LXG2sdMNkWQu22LNQItg=",
|
||||
"lastModified": 1732307740,
|
||||
"narHash": "sha256-ZDsYdZOtg5qkK/wfLLB83B3SI+fE32S+/6Ey0ggHODM=",
|
||||
"owner": "Aylur",
|
||||
"repo": "ags",
|
||||
"rev": "344ea72cd3b8d4911f362fec34bce7d8fb37028c",
|
||||
"rev": "81159966eb8b39b66c3efc133982fd76920c9605",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -41,11 +41,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721571743,
|
||||
"narHash": "sha256-hat7wggtDISBJD8kTo5MTrT+IsY/Ha2MwgjmqqijoCA=",
|
||||
"lastModified": 1731774881,
|
||||
"narHash": "sha256-1Dxryiw8u2ejntxrrv3sMtIE8WHKxmlN4KeH+uMGbmc=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "aquamarine",
|
||||
"rev": "601f6cf95cbe4fef02dc7faf34bba58566c914e9",
|
||||
"rev": "b31a6a4da8199ae3489057db7d36069a70749a56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -54,6 +54,81 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"astal": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"ags",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731952585,
|
||||
"narHash": "sha256-Sh1E7sJd8JJM3PCU1ZOei/QWz97OLCENIi2rTRoaniw=",
|
||||
"owner": "aylur",
|
||||
"repo": "astal",
|
||||
"rev": "664c7a4ddfcf48c6e8accd3c33bb94424b0e8609",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "aylur",
|
||||
"repo": "astal",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1717312683,
|
||||
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -61,11 +136,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721534365,
|
||||
"narHash": "sha256-XpZOkaSJKdOsz1wU6JfO59Rx2fqtcarQ0y6ndIOKNpI=",
|
||||
"lastModified": 1732482255,
|
||||
"narHash": "sha256-GUffLwzawz5WRVfWaWCg78n/HrBJrOG7QadFY6rtV8A=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "635563f245309ef5320f80c7ebcb89b2398d2949",
|
||||
"rev": "a9953635d7f34e7358d5189751110f87e3ac17da",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -91,11 +166,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721330371,
|
||||
"narHash": "sha256-aYlHTWylczLt6ERJyg6E66Y/XSCbVL7leVcRuJmVbpI=",
|
||||
"lastModified": 1728669738,
|
||||
"narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprcursor",
|
||||
"rev": "4493a972b48f9c3014befbbf381ed5fff91a65dc",
|
||||
"rev": "0264e698149fcb857a66a53018157b41f8d97bb0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -108,19 +183,21 @@
|
|||
"inputs": {
|
||||
"aquamarine": "aquamarine",
|
||||
"hyprcursor": "hyprcursor",
|
||||
"hyprland-protocols": "hyprland-protocols",
|
||||
"hyprlang": "hyprlang",
|
||||
"hyprutils": "hyprutils",
|
||||
"hyprwayland-scanner": "hyprwayland-scanner",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"systems": "systems_2",
|
||||
"pre-commit-hooks": "pre-commit-hooks",
|
||||
"systems": "systems",
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721668777,
|
||||
"narHash": "sha256-QNKSZDkZ5+0a+g0wZoZfcWuH1Fy3ZvIeKg0grNdwnHc=",
|
||||
"lastModified": 1732717065,
|
||||
"narHash": "sha256-VzYiTZXneHZneIdEfr55Mt5adJ2p4AGBIJt8eVcqGc4=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland",
|
||||
"rev": "4c3b03516209a49244a8f044143c1162752b8a7a",
|
||||
"rev": "e9a7fb8f91d23f1ac2671e55f74234dcec2ee1c6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -133,21 +210,19 @@
|
|||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"xdph",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"xdph",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718746314,
|
||||
"narHash": "sha256-HUklK5u86w2Yh9dOkk4FdsL8eehcOZ95jPhLixGDRQY=",
|
||||
"lastModified": 1728345020,
|
||||
"narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "1b61f0093afff20ab44d88ad707aed8bf2215290",
|
||||
"rev": "a7c183800e74f337753de186522b9017a07a8cee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -172,11 +247,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721324361,
|
||||
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=",
|
||||
"lastModified": 1728168612,
|
||||
"narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086",
|
||||
"rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -197,11 +272,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721324102,
|
||||
"narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=",
|
||||
"lastModified": 1731702627,
|
||||
"narHash": "sha256-+JeO9gevnXannQxMfR5xzZtF4sYmSlWkX/BPmPx0mWk=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "962582a090bc233c4de9d9897f46794280288989",
|
||||
"rev": "e911361a687753bbbdfe3b6a9eab755ecaf1d9e1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -222,11 +297,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721324119,
|
||||
"narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=",
|
||||
"lastModified": 1726874836,
|
||||
"narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprwayland-scanner",
|
||||
"rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30",
|
||||
"rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -235,13 +310,36 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-cosmic": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732412226,
|
||||
"narHash": "sha256-Eb7LqtaCVgZy5Kp3pMrRTAmcnFO7HGj6lpAM2TrQzTA=",
|
||||
"owner": "lilyinstarlight",
|
||||
"repo": "nixos-cosmic",
|
||||
"rev": "44c9057ebbf4eb41cff08b8fc9c952b3f977656a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lilyinstarlight",
|
||||
"repo": "nixos-cosmic",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1721379653,
|
||||
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
|
||||
"lastModified": 1731676054,
|
||||
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
|
||||
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -251,13 +349,45 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1730741070,
|
||||
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1731797254,
|
||||
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1721379653,
|
||||
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
|
||||
"lastModified": 1732521221,
|
||||
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
|
||||
"rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -270,11 +400,11 @@
|
|||
"plugin-harpoon1": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1703631439,
|
||||
"narHash": "sha256-SIqssvuNnkw1YbEEElLYCHmh9OLnoHzggXNIZMb3jYI=",
|
||||
"lastModified": 1724948422,
|
||||
"narHash": "sha256-ksPNAYnaFbq7N5ifF+RFbLexLW2Lm1ey0agHLzhn9GA=",
|
||||
"owner": "ThePrimeagen",
|
||||
"repo": "harpoon",
|
||||
"rev": "ccae1b9bec717ae284906b0bf83d720e59d12b91",
|
||||
"rev": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -286,11 +416,11 @@
|
|||
"plugin-rainbow-delimiters-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1720388982,
|
||||
"narHash": "sha256-6+MSV9pkudhf/xVdofU6syYCzViHltvDWkYvbeuEfLs=",
|
||||
"lastModified": 1732056071,
|
||||
"narHash": "sha256-nAg4XbPlJ/z6ELHKqBrp/FLRwIkiam7BAKR9eqkoxCI=",
|
||||
"owner": "HiPhish",
|
||||
"repo": "rainbow-delimiters.nvim",
|
||||
"rev": "b29da4a6061a88270e875b38367d82c04c856128",
|
||||
"rev": "d803ba7668ba390aa4cfd3580183c982cac36fd8",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
|
@ -315,17 +445,63 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731363552,
|
||||
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"ags": "ags",
|
||||
"home-manager": "home-manager",
|
||||
"hyprland": "hyprland",
|
||||
"nixos-cosmic": "nixos-cosmic",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"plugin-harpoon1": "plugin-harpoon1",
|
||||
"plugin-rainbow-delimiters-nvim": "plugin-rainbow-delimiters-nvim",
|
||||
"plugin-undotree-nvim": "plugin-undotree-nvim"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixos-cosmic",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732328983,
|
||||
"narHash": "sha256-RHt12f/slrzDpSL7SSkydh8wUE4Nr4r23HlpWywed9E=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "ed8aa5b64f7d36d9338eb1d0a3bb60cf52069a72",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
|
@ -341,28 +517,24 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": "hyprland-protocols",
|
||||
"hyprland-protocols": [
|
||||
"hyprland",
|
||||
"hyprland-protocols"
|
||||
],
|
||||
"hyprlang": [
|
||||
"hyprland",
|
||||
"hyprlang"
|
||||
],
|
||||
"hyprutils": [
|
||||
"hyprland",
|
||||
"hyprutils"
|
||||
],
|
||||
"hyprwayland-scanner": [
|
||||
"hyprland",
|
||||
"hyprwayland-scanner"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
|
@ -373,11 +545,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721648131,
|
||||
"narHash": "sha256-cyyxu/oj4QEFp3CVx2WeXa9T4OAUyynuBJHGkBZSxJI=",
|
||||
"lastModified": 1731703417,
|
||||
"narHash": "sha256-rheDc/7C+yI+QspYr9J2z9kQ5P9F4ATapI7qyFAe1XA=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "663be9cad424b170b28b9fa8a61042d721007f3b",
|
||||
"rev": "8070f36deec723de71e7557441acb17e478204d3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
plugin-harpoon1.flake = false;
|
||||
|
||||
hyprland.url = "github:hyprwm/hyprland";
|
||||
|
||||
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
|
||||
nixos-cosmic.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{ inputs
|
||||
, outputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
|
@ -12,19 +13,19 @@
|
|||
homeDirectory = "/home/kalle";
|
||||
};
|
||||
|
||||
imports =
|
||||
[
|
||||
../../nvim
|
||||
../../tmux
|
||||
../../eww
|
||||
../../hyprland
|
||||
../../hyprland/hyprpaper.nix
|
||||
../../ags
|
||||
];
|
||||
imports = [
|
||||
../../nvim
|
||||
../../tmux
|
||||
../../eww
|
||||
../../hyprland
|
||||
../../hyprland/hyprpaper.nix
|
||||
../../ags
|
||||
];
|
||||
|
||||
hyprland =
|
||||
let
|
||||
mod = "SUPER"; in
|
||||
mod = "SUPER";
|
||||
in
|
||||
{
|
||||
mod = mod;
|
||||
|
||||
|
@ -60,14 +61,14 @@
|
|||
|
||||
autoStart = [
|
||||
# Bar
|
||||
"${pkgs.dunst}/bin/dunst"
|
||||
"${pkgs.ags}/bin/ags"
|
||||
"${pkgs.firefox}/bin/firefox"
|
||||
"${pkgs.discord}/bin/discord"
|
||||
"${pkgs.kitty}/bin/kitty"
|
||||
];
|
||||
|
||||
environment = {
|
||||
XCURSOR_SIZE = "24";
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
};
|
||||
|
||||
sensitivity = 0.1;
|
||||
|
@ -75,8 +76,15 @@
|
|||
layout = "dwindle";
|
||||
|
||||
layerRules = {
|
||||
"gtk-layer-shell" = [ "blur" "ignorezero" ];
|
||||
"notifications2" = [ "noanim" "blur" "ignorezero"];
|
||||
"gtk-layer-shell" = [
|
||||
"blur"
|
||||
"ignorezero"
|
||||
];
|
||||
"notifications2" = [
|
||||
"noanim"
|
||||
"blur"
|
||||
"ignorezero"
|
||||
];
|
||||
};
|
||||
|
||||
windowRules = {
|
||||
|
@ -85,11 +93,9 @@
|
|||
discord = [ "workspace name:HDMI-A-2" ];
|
||||
};
|
||||
|
||||
|
||||
windowRulesV2 = {
|
||||
# ULauncher
|
||||
"class:^(ulauncher)$" = [
|
||||
"forceinput"
|
||||
"dimaround"
|
||||
];
|
||||
};
|
||||
|
@ -105,9 +111,9 @@
|
|||
# bind = ALT, M, exec, xdotool key 'ALT+m'
|
||||
# bind = ALT, B, exec, xdotool key 'ALT+b'
|
||||
binds = {
|
||||
"${mod}, return" = "exec, kitty";
|
||||
"${mod}, E" = "exec, ulauncher-toggle #wofi --show drun";
|
||||
"${mod}, Print" = "exec, bash -c \"grim -g \\\"$(slurp)\\\" - | wl-copy\"";
|
||||
"${mod}, return" = "exec, ${pkgs.kitty}/bin/kitty";
|
||||
"${mod}, E" = "exec, ${pkgs.ulauncher}/bin/ulauncher-toggle #wofi --show drun";
|
||||
"${mod}, Print" = "exec, ${pkgs.bash}/bin/bash -c \"grim -g \\\"$(slurp)\\\" - | wl-copy\"";
|
||||
# Clipboard history
|
||||
# bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
|
||||
};
|
||||
|
@ -119,100 +125,8 @@
|
|||
wallpaperFolder = "/home/kalle/Pictures/Wallpapers";
|
||||
};
|
||||
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
monitor = 0;
|
||||
follow = "none";
|
||||
width = 300;
|
||||
height = 300;
|
||||
origin = "top-left";
|
||||
offset = "10x10";
|
||||
scale = 0;
|
||||
notification_limit = 20;
|
||||
progress_bar = true;
|
||||
progress_bar_height = 10;
|
||||
progress_bar_frame_width = 0;
|
||||
progress_bar_min_width = 150;
|
||||
progress_bar_max_width = 300;
|
||||
progress_bar_corner_radius = 0;
|
||||
icon_corner_radius = 0;
|
||||
indicate_hidden = "yes";
|
||||
transparency = "0.3";
|
||||
separator_height = 2;
|
||||
padding = 8;
|
||||
horizontal_padding = 8;
|
||||
text_icon_padding = 0;
|
||||
frame_width = 0;
|
||||
frame_color = "#aaaaaa";
|
||||
gap_size = 10;
|
||||
separator_color = "frame";
|
||||
sort = "yes";
|
||||
font = "Monospace 8";
|
||||
line_height = 0;
|
||||
markup = "full";
|
||||
format = "<b>%s</b>\n%b";
|
||||
alignment = "left";
|
||||
vertical_alignment = "center";
|
||||
show_age_threshold = 60;
|
||||
ellipsize = "middle";
|
||||
ignore_newline = "no";
|
||||
stack_duplicates = true;
|
||||
hide_duplicate_count = false;
|
||||
show_indicators = "yes";
|
||||
enable_recursive_icon_lookup = true;
|
||||
icon_theme = "Adwaita";
|
||||
icon_position = "left";
|
||||
min_icon_size = 32;
|
||||
max_icon_size = 128;
|
||||
icon_path = "/usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/";
|
||||
sticky_history = "yes";
|
||||
history_length = 20;
|
||||
dmenu = "/usr/bin/dmenu -p dunst:";
|
||||
browser = "/usr/bin/xdg-open";
|
||||
always_run_script = true;
|
||||
title = "Dunst";
|
||||
class = "Dunst";
|
||||
corner_radius = 0;
|
||||
ignore_dbusclose = false;
|
||||
force_xwayland = false;
|
||||
force_xinerama = false;
|
||||
mouse_left_click = "close_current";
|
||||
mouse_middle_click = "do_action, close_current";
|
||||
mouse_right_click = "close_all";
|
||||
};
|
||||
|
||||
experimental = {
|
||||
per_monitor_dpi = false;
|
||||
};
|
||||
|
||||
|
||||
urgency_low = {
|
||||
background = "#222222";
|
||||
foreground = "#888888";
|
||||
timeout = 10;
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
background = "#285577";
|
||||
foreground = "#ffffff";
|
||||
timeout = 10;
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
background = "#900000";
|
||||
foreground = "#ffffff";
|
||||
frame_color = "#ff0000";
|
||||
timeout = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
overlays = with outputs.overlays; [
|
||||
nvim-plugins
|
||||
];
|
||||
overlays = with outputs.overlays; [ nvim-plugins ];
|
||||
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
|
@ -220,6 +134,7 @@
|
|||
|
||||
permittedInsecurePackages = [
|
||||
"electron-25.9.0"
|
||||
"electron-29.4.6"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -228,8 +143,8 @@
|
|||
# environment.
|
||||
home.packages = with pkgs; [
|
||||
discord
|
||||
discord-canary
|
||||
vesktop
|
||||
firefox
|
||||
chromium
|
||||
httpie
|
||||
kate
|
||||
|
@ -241,17 +156,21 @@
|
|||
pavucontrol
|
||||
difftastic
|
||||
sops
|
||||
(obsidian.override {
|
||||
electron = pkgs.electron_29-bin;
|
||||
})
|
||||
(obsidian.override { electron = electron_29-bin; })
|
||||
unzip
|
||||
vlc
|
||||
feishin
|
||||
|
||||
cachix
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
nativeMessagingHosts = [ pkgs.plasma-browser-integration ];
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
|
@ -272,7 +191,7 @@
|
|||
|
||||
qt = {
|
||||
enable = true;
|
||||
style.name = "breeze-dark";
|
||||
style.name = "breeze";
|
||||
};
|
||||
|
||||
dconf = {
|
||||
|
@ -305,7 +224,7 @@
|
|||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
theme = "Catppuccin-Mocha";
|
||||
themeFile = "Catppuccin-Mocha";
|
||||
settings = {
|
||||
background_opacity = "0.8";
|
||||
allow_remote_control = true;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{ inputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
|
@ -27,43 +28,45 @@
|
|||
};
|
||||
|
||||
monitors = mkOption {
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
type = types.listOf (
|
||||
types.submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
width = mkOption {
|
||||
type = types.int;
|
||||
};
|
||||
height = mkOption {
|
||||
type = types.int;
|
||||
};
|
||||
refreshRate = mkOption {
|
||||
type = types.int;
|
||||
default = 60;
|
||||
};
|
||||
x = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
y = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
transform = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
vrr = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
enabled = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
width = mkOption {
|
||||
type = types.int;
|
||||
};
|
||||
height = mkOption {
|
||||
type = types.int;
|
||||
};
|
||||
refreshRate = mkOption {
|
||||
type = types.int;
|
||||
default = 60;
|
||||
};
|
||||
x = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
y = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
transform = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
vrr = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
enabled = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
default = [ ];
|
||||
};
|
||||
|
||||
|
@ -137,8 +140,9 @@
|
|||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = {
|
||||
monitor = map
|
||||
(m:
|
||||
monitor =
|
||||
map (
|
||||
m:
|
||||
let
|
||||
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
|
||||
position = "${toString m.x}x${toString m.y}";
|
||||
|
@ -146,10 +150,9 @@
|
|||
transform = if m.transform != 0 then ",transform,${toString m.transform}" else "";
|
||||
in
|
||||
"${m.name},${if m.enabled then "${resolution},${position},1${vrr}${transform}" else "disable"}"
|
||||
)
|
||||
(cfg.monitors)
|
||||
# Automatically detect newly connected monitors
|
||||
++ [ ",preferred,auto,auto" ];
|
||||
) (cfg.monitors)
|
||||
# Automatically detect newly connected monitors
|
||||
++ [ ",preferred,auto,auto" ];
|
||||
|
||||
exec-once = [
|
||||
"${pkgs.wl-clipboard}/bin/wl-paste --watch ${pkgs.cliphist}/bin/cliphist store"
|
||||
|
@ -200,10 +203,10 @@
|
|||
new_optimizations = "on";
|
||||
};
|
||||
|
||||
drop_shadow = "yes";
|
||||
shadow_range = 4;
|
||||
shadow_render_power = 3;
|
||||
"col.shadow" = "rgba(1a1a1aee)";
|
||||
# drop_shadow = "yes";
|
||||
# shadow_range = 4;
|
||||
# shadow_render_power = 3;
|
||||
# "col.shadow" = "rgba(1a1a1aee)";
|
||||
};
|
||||
|
||||
gestures = {
|
||||
|
@ -240,12 +243,9 @@
|
|||
workspace =
|
||||
let
|
||||
# Create one work space for each non primary monitor
|
||||
perMonitorWorkspaces = map
|
||||
(m: "name:${m.name}, monitor:${m.name}")
|
||||
(lib.filter
|
||||
(m: m.name != cfg.primaryMonitor)
|
||||
cfg.monitors
|
||||
);
|
||||
perMonitorWorkspaces = map (m: "name:${m.name}, monitor:${m.name}") (
|
||||
lib.filter (m: m.name != cfg.primaryMonitor) cfg.monitors
|
||||
);
|
||||
|
||||
# Create 10 work spaces on the primary monitor
|
||||
primaryMonitorWorkspaces = map (i: "${toString i}, monitor:${cfg.primaryMonitor}") (lib.range 1 10);
|
||||
|
@ -256,20 +256,18 @@
|
|||
bind =
|
||||
let
|
||||
# Create binds to switch workspaces and move windows between them
|
||||
workspaceBinds =
|
||||
lib.flatten
|
||||
(map
|
||||
(i:
|
||||
let
|
||||
k = if i == 10 then 0 else i;
|
||||
in
|
||||
[
|
||||
"${cfg.mod}, ${toString k}, workspace, ${toString i}"
|
||||
"${cfg.mod} SHIFT, ${toString k}, movetoworkspace, ${toString i}"
|
||||
]
|
||||
)
|
||||
(lib.range 1 10)
|
||||
);
|
||||
workspaceBinds = lib.flatten (
|
||||
map (
|
||||
i:
|
||||
let
|
||||
k = if i == 10 then 0 else i;
|
||||
in
|
||||
[
|
||||
"${cfg.mod}, ${toString k}, workspace, ${toString i}"
|
||||
"${cfg.mod} SHIFT, ${toString k}, movetoworkspace, ${toString i}"
|
||||
]
|
||||
) (lib.range 1 10)
|
||||
);
|
||||
|
||||
# Create binds to manage wiwdows
|
||||
windowManagementBinds = [
|
||||
|
@ -285,9 +283,9 @@
|
|||
bindm =
|
||||
let
|
||||
windowManagementBinds = [
|
||||
"${cfg.mod}, mouse:272, movewindow"
|
||||
"${cfg.mod}, mouse:273, resizewindow"
|
||||
];
|
||||
"${cfg.mod}, mouse:272, movewindow"
|
||||
"${cfg.mod}, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
configBinds = lib.mapAttrsToList (k: v: "${k}, ${v}") cfg.mouseBinds;
|
||||
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
{ inputs
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./hardware-configuration.override.nix
|
||||
];
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./hardware-configuration.override.nix
|
||||
# inputs.nixos-cosmic.nixosModules.default
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
# Enable flakes and new 'nix' command
|
||||
|
@ -18,9 +19,18 @@
|
|||
# Deduplicate and optimize nix store
|
||||
auto-optimise-store = true;
|
||||
# Allow me to use cachix
|
||||
trusted-users = [ "root" "kalle" ];
|
||||
substituters = ["https://hyprland.cachix.org"];
|
||||
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
||||
trusted-users = [
|
||||
"root"
|
||||
"kalle"
|
||||
];
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://cosmic.cachix.org/"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
|
||||
];
|
||||
};
|
||||
|
||||
services.btrfs.autoScrub.enable = true;
|
||||
|
@ -52,12 +62,15 @@
|
|||
xkb.layout = "us";
|
||||
};
|
||||
|
||||
# services.desktopManager.cosmic.enable = true;
|
||||
# services.displayManager.cosmic-greeter.enable = true;
|
||||
|
||||
# Allow flashing ZSA keyboards
|
||||
hardware.keyboard.zsa.enable = true;
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
# package = inputs.hyprland.packages.x86_64-linux.hyprland;
|
||||
package = inputs.hyprland.packages.x86_64-linux.hyprland;
|
||||
};
|
||||
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
|
@ -78,7 +91,10 @@
|
|||
users.users.kalle = {
|
||||
isNormalUser = true;
|
||||
group = "kalle";
|
||||
extraGroups = [ "wheel" "dialout" ]; # Enable ‘sudo’ for the user.
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"dialout"
|
||||
]; # Enable ‘sudo’ for the user.
|
||||
};
|
||||
|
||||
users.groups.kalle.gid = 1000;
|
||||
|
@ -97,7 +113,7 @@
|
|||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
|
||||
fira-code
|
||||
|
@ -108,9 +124,18 @@
|
|||
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
serif = [ "Noto Serif" "Symbols Nerd Font" ];
|
||||
sansSerif = [ "Noto Sans" "Symbols Nerd Font" ];
|
||||
monospace = [ "Fira Code" "Symbols Nerd Font Mono" ];
|
||||
serif = [
|
||||
"Noto Serif"
|
||||
"Symbols Nerd Font"
|
||||
];
|
||||
sansSerif = [
|
||||
"Noto Sans"
|
||||
"Symbols Nerd Font"
|
||||
];
|
||||
monospace = [
|
||||
"Fira Code"
|
||||
"Symbols Nerd Font Mono"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -119,21 +144,23 @@
|
|||
programs.steam = {
|
||||
enable = true;
|
||||
package = pkgs.steam.override {
|
||||
extraPkgs = pkgs: with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
];
|
||||
extraLibraries = pkgs: with pkgs; [
|
||||
gperftools # Needed for tf2 to work
|
||||
];
|
||||
extraPkgs =
|
||||
pkgs: with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
];
|
||||
extraLibraries =
|
||||
pkgs: with pkgs; [
|
||||
gperftools # Needed for tf2 to work
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -154,4 +181,3 @@
|
|||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{ inputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
|
@ -27,11 +28,13 @@
|
|||
clang-tools
|
||||
lua-language-server
|
||||
nodePackages.typescript-language-server
|
||||
nodePackages."@astrojs/language-server"
|
||||
typescript
|
||||
tailwindcss-language-server
|
||||
gopls
|
||||
vhdl-ls
|
||||
nixd
|
||||
nixfmt-rfc-style
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
|
|
|
@ -103,6 +103,13 @@ require('lspconfig').lua_ls.setup {
|
|||
require('lspconfig').nixd.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
nixd = {
|
||||
formatting = {
|
||||
command = { "nixfmt" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
require('lspconfig').tsserver.setup {
|
||||
|
@ -135,6 +142,11 @@ require('lspconfig').vhdl_ls.setup {
|
|||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
require('lspconfig').astro.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
require('rust-tools').setup({
|
||||
server = {
|
||||
on_attach = on_attach,
|
||||
|
@ -147,3 +159,14 @@ require('rust-tools').setup({
|
|||
}
|
||||
},
|
||||
})
|
||||
|
||||
-- Workaround for https://github.com/neovim/neovim/issues/30985
|
||||
for _, method in ipairs({ 'textDocument/diagnostic', 'workspace/diagnostic' }) do
|
||||
local default_diagnostic_handler = vim.lsp.handlers[method]
|
||||
vim.lsp.handlers[method] = function(err, result, context, config)
|
||||
if err ~= nil and err.code == -32802 then
|
||||
return
|
||||
end
|
||||
return default_diagnostic_handler(err, result, context, config)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue