Added somcli. Updated whole lot of stuff. Added game binds to hyprland (stlil have to add steam). Added minimal nixos config. Combined pipewire sink. Todo list. Beginning of server config

This commit is contained in:
Jurn Wubben 2025-03-27 01:15:02 +01:00
parent c48b41c250
commit 58dcc86ca8
18 changed files with 280 additions and 26 deletions

107
flake.lock generated
View file

@ -189,6 +189,24 @@
} }
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": { "inputs": {
"systems": [ "systems": [
"stylix", "stylix",
@ -347,6 +365,24 @@
"type": "github" "type": "github"
} }
}, },
"naersk": {
"inputs": {
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1739824009,
"narHash": "sha256-fcNrCMUWVLMG3gKC5M9CBqVOAnJtyRvGPxptQFl5mVg=",
"owner": "nix-community",
"repo": "naersk",
"rev": "e5130d37369bfa600144c2424270c96f0ef0e11d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "naersk",
"type": "github"
}
},
"nil": { "nil": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [
@ -470,6 +506,35 @@
} }
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": {
"lastModified": 1741516043,
"narHash": "sha256-Hv0S630U4GVZBM1Q+NCEwyN5ct7cic+8r6qLIaUaVqI=",
"path": "/nix/store/5nkj4k35df77lwjwvbs6hmpkqhpc5x0c-source",
"rev": "8adda98a4e637d0d8a867f19ace5ed6680ecc94a",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1742707865,
"narHash": "sha256-RVQQZy38O3Zb8yoRJhuFgWo/iDIDj0hEdRTVfhOtzRk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dd613136ee91f67e5dba3f3f41ac99ae89c5406b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1740367490, "lastModified": 1740367490,
"narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=",
@ -557,6 +622,7 @@
"nixcord": "nixcord", "nixcord": "nixcord",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nvf": "nvf", "nvf": "nvf",
"somcli": "somcli",
"stylix": "stylix" "stylix": "stylix"
} }
}, },
@ -582,6 +648,26 @@
"type": "github" "type": "github"
} }
}, },
"somcli": {
"inputs": {
"flake-utils": "flake-utils_2",
"naersk": "naersk",
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1743031501,
"narHash": "sha256-LF4J5P+tDhEv3els7PIBa+2+peSeURNzx4I1MwCHWy8=",
"owner": "jsw08",
"repo": "somcli",
"rev": "aa84a75691e3098000e7b885b966d7af1e81318f",
"type": "github"
},
"original": {
"owner": "jsw08",
"repo": "somcli",
"type": "github"
}
},
"stylix": { "stylix": {
"inputs": { "inputs": {
"base16": "base16", "base16": "base16",
@ -590,13 +676,13 @@
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme", "firefox-gnome-theme": "firefox-gnome-theme",
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_3",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_6",
"nur": "nur", "nur": "nur",
"systems": "systems_4", "systems": "systems_5",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
@ -676,6 +762,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": { "tinted-foot": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -45,5 +45,6 @@
}; };
nixcord.url = "github:kaylorben/nixcord"; nixcord.url = "github:kaylorben/nixcord";
somcli.url = "github:jsw08/somcli";
}; };
} }

View file

@ -8,5 +8,17 @@
home.packages = lib.mkIf osConfig.niksos.games [ home.packages = lib.mkIf osConfig.niksos.games [
pkgs.dolphin-emu pkgs.dolphin-emu
pkgs.suyu pkgs.suyu
# (
# pkgs.appimageTools.wrapType1 rec {
# pname = "nx-optimizer";
# version = "3.0.1";
#
# src = pkgs.fetchurl {
# url = "https://github.com/MaxLastBreath/TOTK-mods/releases/download/manager-3.0.1/NX.Optimizer.3.0.1.AppImage";
# hash = "sha256-2InXpoLm4bfuj0FYRXruRxggBA/E6XiJFeuNbyAMk5s=";
# };
# }
# )
]; ];
} }

View file

@ -1,8 +1,12 @@
{inputs, ...}: { {
inputs,
osConfig,
...
}: {
imports = [inputs.nixcord.homeManagerModules.nixcord]; imports = [inputs.nixcord.homeManagerModules.nixcord];
programs.nixcord = { programs.nixcord = {
enable = true; enable = osConfig.niksos.neovim;
discord.enable = false; discord.enable = false;
vesktop.enable = true; vesktop.enable = true;

View file

@ -1,11 +1,19 @@
{pkgs, ...}: { {
home.packages = [ pkgs,
lib,
osConfig,
inputs,
...
}: {
home.packages =
[
pkgs.gh pkgs.gh
pkgs.ripgrep pkgs.ripgrep
]
pkgs.ear2ctl # FIXME: only when bluetooth enabled ++ lib.optionals osConfig.niksos.desktop [
pkgs.bluetui inputs.somcli.defaultPackage.${pkgs.system}
]
pkgs.typst #FIXME: move to flake shell ++ lib.optionals osConfig.niksos.bluetooth [
pkgs.ear2ctl
]; ];
} }

View file

@ -1,3 +1,5 @@
{ {
programs.yazi.enable = true; programs.yazi = {
enable = true;
};
} }

View file

@ -3,6 +3,7 @@
osConfig, osConfig,
lib, lib,
pkgs, pkgs,
inputs,
... ...
}: let }: let
inherit (lib) getExe; inherit (lib) getExe;
@ -20,7 +21,7 @@
termapp = termapp: "${foot} '${termapp}'"; termapp = termapp: "${foot} '${termapp}'";
termappE = termappE: termapp (getExe termappE); termappE = termappE: termapp (getExe termappE);
foot = appE pkgs.foot; foot = appE config.programs.foot.package;
fuzzel = appE config.programs.fuzzel.package; fuzzel = appE config.programs.fuzzel.package;
firefox = appE config.programs.firefox.package; firefox = appE config.programs.firefox.package;
playerctl = appE pkgs.playerctl; playerctl = appE pkgs.playerctl;
@ -33,6 +34,16 @@
bluetui = termappE pkgs.bluetui; bluetui = termappE pkgs.bluetui;
nmtui = termapp "${pkgs.networkmanager}/bin/nmtui"; nmtui = termapp "${pkgs.networkmanager}/bin/nmtui";
somcli = let
interactiveSom = pkgs.writeShellScriptBin "somcli" ''
${getExe inputs.somcli.defaultPackage.${pkgs.system}} && sleep 5
'';
termSom = pkgs.writeShellScriptBin "somfoot" ''
${foot} -a "foot-somcli" ${getExe interactiveSom}
'';
in
appE termSom;
# toggle = program: let # toggle = program: let
# prog = builtins.substring 0 14 program; # prog = builtins.substring 0 14 program;
# in "pkill ${prog} || ${uwsm} app -- ${program}"; # in "pkill ${prog} || ${uwsm} app -- ${program}";
@ -77,6 +88,7 @@ in {
"$mod, Return, exec, ${foot}" "$mod, Return, exec, ${foot}"
"$mod Shift, Return, exec, ${firefox}" "$mod Shift, Return, exec, ${firefox}"
"$mod, Escape, exec, ${hyprlock}" "$mod, Escape, exec, ${hyprlock}"
"$mod Shift, S, exec, ${somcli}"
"$mod, A, exec, ${pulsemixer}" "$mod, A, exec, ${pulsemixer}"
"$mod, B, exec, ${bluetui}" "$mod, B, exec, ${bluetui}"
@ -98,7 +110,14 @@ in {
"$mod SHIFT, k, movewindow, u" "$mod SHIFT, k, movewindow, u"
"$mod SHIFT, j, movewindow, d" "$mod SHIFT, j, movewindow, d"
] ]
++ workspaces; ++ workspaces
++ lib.optionals osConfig.niksos.games (let
suyu = "${appE pkgs.suyu} -ql";
dolphin = appE pkgs.dolphin-emu;
in [
"Super, s, exec, ${suyu}"
"Super, d, exec, ${dolphin}"
]);
bindl = [ bindl = [
# media controls # media controls

View file

@ -1,5 +1,9 @@
{ {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
xwayland = {
force_zero_scaling = true;
};
general = { general = {
gaps_in = 5; gaps_in = 5;
gaps_out = 5; gaps_out = 5;
@ -86,7 +90,10 @@
}; };
windowrulev2 = [ windowrulev2 = [
# FIXME: change to `windowrule` after hyprland update.
"float, class:com.github.phase1geo.annotator" "float, class:com.github.phase1geo.annotator"
"float, class:foot-somcli"
"size >30% >30%, class:foot-somcli"
]; ];
}; };
} }

View file

@ -16,6 +16,7 @@ in {
flake = let flake = let
systems = [ systems = [
"laptop" "laptop"
"minimal"
]; ];
in { in {
# Systems # Systems
@ -45,10 +46,16 @@ in {
modules modules
++ [ ++ [
{ {
boot.plymouth.enable = false;
services.fwupd.enable = false;
networking.hostName = "vm"; networking.hostName = "vm";
nixpkgs.hostPlatform = pkgs.system;
boot.plymouth.enable = lib.mkForce false; niksos = {
desktop = true;
neovim = true;
};
nixpkgs.hostPlatform = pkgs.system;
} }
]; ];
}; };

View file

@ -1,9 +1,8 @@
{ {
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
users.groups.libvirtd.members = ["jsw"]; users.groups.libvirtd.members = ["jsw"];
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true; virtualisation.spiceUSBRedirection.enable = true;
virtualisation.podman.enable = true;
} }

14
hosts/minimal/default.nix Normal file
View file

@ -0,0 +1,14 @@
{
imports = [
./hardware-configuration.nix
];
boot.plymouth.enable = false;
services.fwupd.enable = false;
# Other stuff that's enabled by default because i'll use it but it's still bloat is (note that this list shares a lot of resources):
# - graphics drivers (~1.8gb)
# - networkmanager (~1.25gb)
# - polkit (~1.25gb)
# - other stuff.. total: 4.68gb
}

View file

@ -0,0 +1,32 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
boot.initrd.availableKernelModules = ["xhci_pci" "virtio_pci" "virtio_scsi" "usbhid"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = ["noatime" "discard" "compress=zstd"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
swapDevices = [];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -1,8 +1,11 @@
{ {
pkgs, pkgs,
config, config,
lib,
... ...
}: { }: let
plymouth = config.boot.plymouth.enable;
in {
boot = { boot = {
bootspec.enable = true; bootspec.enable = true;
@ -15,7 +18,7 @@
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
consoleLogLevel = 3; consoleLogLevel = 3;
kernelParams = [ kernelParams = lib.mkIf plymouth [
"quiet" "quiet"
"systemd.show_status=auto" "systemd.show_status=auto"
"rd.udev.log_level=3" "rd.udev.log_level=3"
@ -30,6 +33,6 @@
timeout = 0; timeout = 0;
}; };
plymouth.enable = true; plymouth.enable = lib.mkDefault true;
}; };
} }

View file

@ -60,5 +60,8 @@
gamescopeSession.enable = true; gamescopeSession.enable = true;
}; };
}; };
environment.variables = {
"STEAM_FORCE_DESKTOP_UI_SCALING" = "1.5";
};
}; };
} }

3
system/server/caddy.nix Normal file
View file

@ -0,0 +1,3 @@
{config, ...}: {
niksos.server.enable = config.niksos.server.enable;
}

View file

@ -0,0 +1,4 @@
{lib, ...}: {
imports = [./caddy.nix];
options.niksos.server.enable = lib.mKEnableOption "server servcies (such as caddy).";
}

View file

@ -5,12 +5,46 @@
... ...
}: { }: {
config = lib.mkIf config.niksos.desktop { config = lib.mkIf config.niksos.desktop {
security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
jack.enable = true; jack.enable = true;
pulse.enable = true; pulse.enable = true;
extraConfig.pipewire = {
"10-combined-sink" = {
"context.modules" = [
{
name = "libpipewire-module-combine-stream";
args = {
"combine.mode" = "sink";
"node.name" = "combined_sink";
"node.description" = "All audio outputs combined.";
"combine.latency-compensate" = false;
"combine.props" = {
"audio.position" = ["FL" "FR"];
};
"stream.props" = {};
"stream.rules" = [
{
matches = [
{
"media.class" = "Audio/Sink";
}
];
actions = {
create-stream = {};
};
}
];
};
}
];
};
};
}; };
environment.systemPackages = [pkgs.pulsemixer]; environment.systemPackages = [pkgs.pulsemixer];

1
todo.txt Normal file
View file

@ -0,0 +1 @@
Import modules at flake instead of per file