Compare commits

...

10 commits

8 changed files with 42 additions and 55 deletions

View file

@ -959,11 +959,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1716358718, "lastModified": 1717112898,
"narHash": "sha256-NQbegJb2ZZnAqp2EJhWwTf6DrZXSpA6xZCEq+RGV1r0=", "narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3f316d2a50699a78afe5e77ca486ad553169061e", "rev": "6132b0f6e344ce2fe34fc051b72fb46e34f668e0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1087,16 +1087,16 @@
}, },
"nixpkgs_8": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1716755743, "lastModified": 1717144377,
"narHash": "sha256-IwLq4CTHXkEeBUQeVWhmKsX0pZ8snSQi0uPo6JGeQkA=", "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "baf5166949ef8cb8e85e3f940eec53b9c916db64", "rev": "805a384895c696f802a9bf5bf4720f37385df547",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "release-24.05", "ref": "nixos-24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View file

@ -2,7 +2,7 @@
description = "nki's systems"; description = "nki's systems";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/release-24.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
darwin.url = "github:lnl7/nix-darwin/master"; darwin.url = "github:lnl7/nix-darwin/master";
darwin.inputs.nixpkgs.follows = "nixpkgs-unstable"; darwin.inputs.nixpkgs.follows = "nixpkgs-unstable";
@ -68,23 +68,13 @@
nixpkgsAsRegistry_ = stable: { lib, ... }: { nixpkgsAsRegistry_ = stable: { lib, ... }: {
imports = [ applyOverlays ]; imports = [ applyOverlays ];
nix.registry.current-system.flake = self; nix.registry.current-system.flake = self;
nix.registry.nixpkgs.flake = stable;
nix.registry.nixpkgs-unstable.flake = nixpkgs-unstable; nix.registry.nixpkgs-unstable.flake = nixpkgs-unstable;
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix.nixPath = [ nix.nixPath = [
"nixpkgs=${nixpkgs}"
"nixpkgs-unstable=${nixpkgs-unstable}" "nixpkgs-unstable=${nixpkgs-unstable}"
"/nix/var/nix/profiles/per-user/root/channels" "/nix/var/nix/profiles/per-user/root/channels"
]; ];
# Binary Cache for Haskell.nix
nix.settings.trusted-public-keys = [
# "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
];
nix.settings.substituters = [
# "https://cache.iog.io"
];
}; };
nixpkgsAsRegistry = nixpkgsAsRegistry_ nixpkgs;
osuStable = { pkgs, ... }: { osuStable = { pkgs, ... }: {
nix.settings = { nix.settings = {
@ -195,6 +185,7 @@
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.nki = import ./home/nki-framework.nix; home-manager.users.nki = import ./home/nki-framework.nix;
} }
]; ];

View file

@ -4,8 +4,6 @@ let
cfg = config.linux.graphical; cfg = config.linux.graphical;
vscode = with pkgs; if stdenv.isAarch64 then unstable.vscode else unstable.vscode-fhs; vscode = with pkgs; if stdenv.isAarch64 then unstable.vscode else unstable.vscode-fhs;
alwaysStartup = with pkgs; [ ];
in in
{ {
imports = [ ./x11.nix ./wayland.nix ./alacritty.nix ]; imports = [ ./x11.nix ./wayland.nix ./alacritty.nix ];
@ -43,28 +41,31 @@ in
deluge # Torrent client deluge # Torrent client
pavucontrol # PulseAudio control panel pavucontrol # PulseAudio control panel
firefox firefox
librewolf
cinnamon.nemo # File manager cinnamon.nemo # File manager
thunderbird # Email thunderbird # Email
sublime-music # For navidrome sublime-music # For navidrome
pkgs.unstable.cinny-desktop cinny-desktop
pkgs.unstable.gajim gajim
vivaldi vivaldi
# Note taking # Note taking
pkgs.unstable.logseq logseq
# Audio # Audio
qpwgraph # Pipewire graph qpwgraph # Pipewire graph
# (if stdenv.isAarch64 then zotero else pkgs.unstable.zotero) // kinda fucked for now from CVE zotero_7
libreoffice libreoffice
mpv # for anki mpv # for anki
pkgs.unstable.anki-bin anki-bin
tdesktop tdesktop
whatsapp-for-linux whatsapp-for-linux
obs-studio obs-studio
(librewolf.override {
nativeMessagingHosts = with pkgs; [ kdePackages.plasma-browser-integration ];
})
## CLI stuff ## CLI stuff
dex # .desktop file management, startup dex # .desktop file management, startup
# sct # Display color temperature # sct # Display color temperature
@ -72,11 +73,11 @@ in
] ++ (if pkgs.stdenv.isAarch64 then [ ] else [ ] ++ (if pkgs.stdenv.isAarch64 then [ ] else [
gnome.cheese # Webcam check, expensive gnome.cheese # Webcam check, expensive
# Chat stuff # Chat stuff
unstable.slack slack
])); ]));
nki.programs.discord.enable = pkgs.stdenv.isx86_64; nki.programs.discord.enable = pkgs.stdenv.isx86_64;
nki.programs.discord.package = (pkgs.callPackage pkgs.unstable.vesktop.override { stdenv = pkgs.gcc13Stdenv; }).overrideAttrs (attrs: { nki.programs.discord.package = pkgs.vesktop.overrideAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs ++ [ pkgs.nss_latest pkgs.makeWrapper ]; nativeBuildInputs = attrs.nativeBuildInputs ++ [ pkgs.nss_latest pkgs.makeWrapper ];
postInstall = '' postInstall = ''
makeWrapper $out/bin/vesktop $out/bin/discord makeWrapper $out/bin/vesktop $out/bin/discord
@ -181,9 +182,15 @@ in
package = pkgs.numix-gtk-theme; package = pkgs.numix-gtk-theme;
name = "Numix"; name = "Numix";
}; };
gtk.gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
gtk.gtk2.extraConfig = ''
gtk-im-module="fcitx"
'';
gtk.gtk3.extraConfig.gtk-im-module = "fcitx";
gtk.gtk4.extraConfig.gtk-im-module = "fcitx";
## Qt ## Qt
qt.enable = true; qt.enable = true;
qt.platformTheme = "gnome"; qt.platformTheme.name = "adwaita";
qt.style.package = pkgs.adwaita-qt; qt.style.package = pkgs.adwaita-qt;
qt.style.name = "adwaita"; qt.style.name = "adwaita";
@ -205,7 +212,7 @@ in
"${srcFile}/${pkg.name}.desktop"; "${srcFile}/${pkg.name}.desktop";
}; };
}; };
autoStartup = listToAttrs (map f (cfg.startup ++ alwaysStartup)); autoStartup = listToAttrs (map f cfg.startup);
in in
autoStartup // { autoStartup // {
## Polkit UI ## Polkit UI

View file

@ -5,25 +5,13 @@ let
swaync = pkgs.swaynotificationcenter; swaync = pkgs.swaynotificationcenter;
in in
with lib; mkIf (config.linux.graphical.type == "wayland") { with lib; mkIf (config.linux.graphical.type == "wayland") {
home.packages = [ swaync ]; services.swaync = {
wayland.windowManager.sway.config = { enable = true;
startup = [ settings.widgets = [ "inhibitors" "title" "dnd" "mpris" "notifications" ];
{ command = "swaync"; } style = ./swaync.css;
];
};
xdg.configFile = {
"swaync/config.json" = {
text = builtins.toJSON {
widgets = [ "inhibitors" "title" "dnd" "mpris" "notifications" ];
scripts = { };
};
onChange = "swaync-client -R";
};
"swaync/style.css" = {
source = ./swaync.css;
onChange = "swaync-client -rs";
};
}; };
systemd.user.services.swaync.Install.WantedBy = lib.mkForce [ "sway-session.target" ];
systemd.user.services.swaync.Unit.PartOf = lib.mkForce [ "sway-session.target" ];
programs.my-sway.waybar = { programs.my-sway.waybar = {
extraSettings = { extraSettings = {

View file

@ -159,12 +159,14 @@ in
# Startup programs # Startup programs
{ command = "${cfg.browser}"; } { command = "${cfg.browser}"; }
{ command = "thunderbird"; } { command = "thunderbird"; }
# IME
{ command = "fcitx5"; }
] ++ (if cfg.discord != null then [ ] ++ (if cfg.discord != null then [
{ command = "${cfg.discord}"; } { command = "${cfg.discord}"; }
] ++ lib.lists.optional ] ++ lib.lists.optional
(!pkgs.stdenv.isAarch64) (!pkgs.stdenv.isAarch64)
( (
{ command = "${pkgs.unstable.premid}/bin/premid"; } { command = "${pkgs.premid}/bin/premid"; }
) else [ ]); ) else [ ]);
### Keybindings ### Keybindings
@ -346,6 +348,7 @@ in
export SDL_VIDEODRIVER=wayland export SDL_VIDEODRIVER=wayland
export QT_QPA_PLATFORM=wayland export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1" export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export QT_IM_MODULE=fcitx
# export NIXOS_OZONE_WL=1 # Yeah this fucks up IMEs # export NIXOS_OZONE_WL=1 # Yeah this fucks up IMEs
'' + (if config.services.gnome-keyring.enable then '' '' + (if config.services.gnome-keyring.enable then ''

View file

@ -156,7 +156,7 @@ in
loader.timeout = 60; loader.timeout = 60;
loader.systemd-boot.enable = true; loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
supportedFilesystems = [ "ntfs" ]; supportedFilesystems.ntfs = true;
}; };
boot.initrd.systemd.enable = builtins.length (builtins.attrNames (cfg.luksDevices)) > 0; boot.initrd.systemd.enable = builtins.length (builtins.attrNames (cfg.luksDevices)) > 0;
# LUKS devices # LUKS devices
@ -249,6 +249,7 @@ in
# Input methods (only fcitx5 works reliably on Wayland) # Input methods (only fcitx5 works reliably on Wayland)
i18n.inputMethod = { i18n.inputMethod = {
enabled = "fcitx5"; enabled = "fcitx5";
fcitx5.waylandFrontend = true;
fcitx5.addons = with pkgs; [ fcitx5.addons = with pkgs; [
fcitx5-mozc fcitx5-mozc
fcitx5-unikey fcitx5-unikey

View file

@ -28,7 +28,6 @@ in
cloud.traefik.hosts.invidious = { host = "invi.dtth.ch"; port = 61191; }; cloud.traefik.hosts.invidious = { host = "invi.dtth.ch"; port = 61191; };
services.invidious = { services.invidious = {
enable = true; enable = true;
package = pkgs.unstable.invidious;
domain = "invi.dtth.ch"; domain = "invi.dtth.ch";
port = 61191; port = 61191;
extraSettingsFile = config.sops.secrets.invidious.path; extraSettingsFile = config.sops.secrets.invidious.path;

View file

@ -5,14 +5,12 @@ let
x86 = import nixpkgs-unstable { system = prev.system; config.allowUnsupportedSystem = true; }; x86 = import nixpkgs-unstable { system = prev.system; config.allowUnsupportedSystem = true; };
}; };
overlay-needs-unstable = final: prev: { overlay-needs-unstable = final: prev: {
# override some packages that needs unstable that cannot be changed in the setup.
nix-direnv = prev.unstable.nix-direnv;
# Typst updates really quickly. # Typst updates really quickly.
typst = final.unstable.typst; typst = final.unstable.typst;
typst-lsp = final.unstable.typst-lsp; typst-lsp = final.unstable.typst-lsp;
peertube = final.unstable.peertube; # Until 0.35 is in
kitty = final.unstable.kitty;
}; };
overlay-imported = final: prev: { overlay-imported = final: prev: {
sway = prev.sway.override { sway-unwrapped = final.swayfx-unwrapped; }; sway = prev.sway.override { sway-unwrapped = final.swayfx-unwrapped; };