change many thing

This commit is contained in:
atagen 2026-02-16 11:32:22 +11:00
parent b2d69d270e
commit fe668b5b9e
30 changed files with 632 additions and 470 deletions

BIN
assets/startup.wav Executable file

Binary file not shown.

41
common/auth.nix Normal file
View file

@ -0,0 +1,41 @@
{
lib,
inputs,
getFlakePkg,
...
}:
{
environment.shellAliases = {
#make run0 use aliases
run0 = "run0 --background='' ";
s = "run0";
};
services.dbus.implementation = "broker";
security = {
sudo.enable = false;
polkit = {
enable = true;
extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.policykit.exec") {
return polkit.Result.AUTH_ADMIN_KEEP;
}
});
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.systemd1.") == 0) {
return polkit.Result.AUTH_ADMIN_KEEP;
}
});
'';
};
};
environment.etc."polkit-1/polkitd.conf".text = ''
[Polkitd]
ExpirationSeconds=60
'';
imports = [ inputs.run0-shim.nixosModules.default ];
environment.systemPackages = [ (getFlakePkg inputs.run0-shim) ];
security.soteria.enable = true;
systemd.user.services.niri-flake-polkit = lib.mkForce { };
}

1
common/binfmts.nix Normal file
View file

@ -0,0 +1 @@
{ inputs, scope, ... }: scope "imports" <| [ inputs.qstn.nixosModules.default ]

View file

@ -1,6 +1,5 @@
{
pkgs,
localPkgs,
getPkgs,
...
}:
@ -17,6 +16,7 @@
ouch
;
};
user.packages = getPkgs {
inherit (pkgs)
lazygit

View file

@ -2,7 +2,6 @@
{
system.disableInstallerTools = true;
programs.less.lessopen = null;
programs.command-not-found.enable = false;
boot.enableContainers = false;
boot.loader.grub.enable = false;
environment.defaultPackages = lib.mkDefault [ ];

View file

@ -1,7 +1,5 @@
{
inputs,
getFlakePkg,
getFlakePkg',
...
}:
{
@ -18,10 +16,7 @@
services.angrr = {
enable = true;
enableNixGcIntegration = true;
period = "2weeks";
package = getFlakePkg inputs.angrr;
period = "7d";
};
programs.direnv.angrr.package = getFlakePkg' inputs.angrr "angrr-direnv";
}

View file

@ -6,7 +6,6 @@
}:
{
nix = {
package = pkgs.nixVersions.latest;
settings = {
experimental-features = [
"nix-command"

View file

@ -6,13 +6,19 @@ scope "nix.settings" {
substituters = [
"https://nix-community.cachix.org"
"https://anmonteiro.nix-cache.workers.dev"
"https://cache.atagen.co"
"https://cache.lobotomise.me"
# "https://cache.atagen.co"
# "https://cache.privatevoid.net"
"https://cache.flox.dev"
"https://cache.amaanq.com"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY="
"cache.atagen.co:SOUkNQxuu/eQ7FcI8nlUe7FpV27e7YjQlDQdn8HTUnw="
"cache.lobotomise.me:oF5s/f/RDfVuMH7hl0q/Cby4V/KbPCrZJn8SjKOf/bk="
# "cache.atagen.co:SOUkNQxuu/eQ7FcI8nlUe7FpV27e7YjQlDQdn8HTUnw="
# "cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
"flox-cache-public-1:7F4OyH7ZCnFhcze3fJdfyXYLQw/aV7GEed86nQ7IsOs="
"cache.amaanq.com:3qm0ZOxlHr7UQqj0G3MKlAn1votV9/3KjHGU2GQ9rEM="
];
}

View file

@ -2,15 +2,18 @@
pkgs,
inputs,
getPkgs,
getFlakePkg,
...
}:
{
environment.systemPackages = getPkgs {
inherit (pkgs)
nixfmt-rfc-style
nil
;
};
environment.systemPackages =
getPkgs {
inherit (pkgs)
nixfmt
nil
;
}
++ [ (getFlakePkg inputs.yoke) ];
imports = [
inputs.nix-index-database.nixosModules.nix-index
];

View file

@ -6,7 +6,7 @@
...
}:
let
inherit (pkgs) fish;
inherit (pkgs) fish nushell;
in
{
imports = [
@ -36,6 +36,7 @@ in
"la" = "eza -lg --icons=always --colour=always $argv | culr";
"p" = "ps $argv | culr";
"mnt" = "mount | culr";
"fresh" = "clear; ${./rice/header.sh}; echo";
};
interactiveShellInit =
let
@ -62,8 +63,12 @@ in
};
environment.systemPackages = [
fish
nushell
];
environment.shells = [
fish
nushell
];
environment.shells = [ fish ];
users.defaultUserShell = fish;
console.font = "Lat2-Terminus16";

818
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -5,17 +5,17 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/22c5c52ca2d2cc1692bb74c873965cc1d9fa31d3";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11";
# helix.url = "github:helix-editor/helix";
helix.url = "github:helix-editor/helix";
nix-index-database.url = "github:Mic92/nix-index-database";
nix-rice.url = "github:bertof/nix-rice";
meat.url = "git+https://git.atagen.co/atagen/meat";
meat.url = "git+https://git.lobotomise.me/atagen/meat";
culr.url = "git+https://git.atagen.co/atagen/culr";
culr.url = "git+https://git.lobotomise.me/atagen/culr";
niri.url = "github:sodiboo/niri-flake";
@ -29,22 +29,36 @@
inputs.nixpkgs.follows = "nixpkgs";
};
hudcore.url = "git+https://git.atagen.co/atagen/hudcore-plymouth.git";
# hudcore.url = "git+https://git.lobotomise.me/atagen/hudcore-plymouth.git";
nyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
# smooooth.url = "path:/home/bolt/code/smooooth";
niri-tag.url = "git+https://git.atagen.co/atagen/niri-tag";
niri-tag.url = "git+https://git.lobotomise.me/atagen/niri-tag";
angrr.url = "github:linyinfeng/angrr";
arbys.url = "git+https://git.atagen.co/atagen/arbys";
arbys.url = "git+https://git.lobotomise.me/atagen/arbys";
qstn = {
url = "git+https://git.lobotomise.me/atagen/qstn";
inputs.nixpkgs.follows = "nixpkgs";
};
__flake-compat = {
url = "git+https://git.lix.systems/lix-project/flake-compat.git";
flake = false;
};
yoke.url = "git+https://git.lobotomise.me/atagen/yoke";
run0-shim = {
url = "github:lordgrimmauld/run0-sudo-shim";
inputs.nixpkgs.follows = "nixpkgs";
};
bunker.url = "github:amaanq/bunker-patches";
stasis.url = "github:saltnpepper97/stasis";
niri-s76.url = "git+https://git.lobotomise.me/atagen/niri-s76-bridge";
};
}

View file

@ -22,8 +22,7 @@ let
Status = "locked";
};
in
(scope "apps.browser" <| pkgs.firefox)
// scope "programs.firefox" {
scope "programs.firefox" {
enable = true;
policies = {
@ -93,4 +92,3 @@ in
# };
}
// (scope "apps.browser" <| pkgs.firefox)
# )

View file

@ -162,7 +162,7 @@ ShellRoot {
}
implicitHeight: 22
implicitWidth: Tags.keys.length * 13 + 24
implicitWidth: (Tags.keys.length !== undefined) ? Tags.keys.length * 13 + 24 : 37;
// implicitWidth:.width + 24
color: "transparent"

View file

@ -4,35 +4,24 @@
inputs,
mainUser,
getPkgs,
getFlakePkg',
...
}:
let
inherit (lib) getExe getExe';
stable = inputs.nixpkgs-stable;
inherit (stable.legacyPackages.x86_64-linux) quickshell;
inherit (lib) getExe;
in
{
user.packages = getPkgs {
# quickshell stuff
inherit (pkgs.kdePackages) qtbase qtdeclarative;
inherit (pkgs) wl-clipboard;
inherit quickshell;
inherit (pkgs) wl-clipboard quickshell;
};
imports = [ inputs.stasis.nixosModules.default ];
services.stasis.enable = true;
quick.services = {
swaync = "${getExe pkgs.swaynotificationcenter}";
quickshell = "${getExe quickshell}";
swayidle =
let
niri = getFlakePkg' inputs.niri "niri-unstable";
systemctl = getExe' pkgs.systemd "systemctl";
in
''
${lib.getExe pkgs.swayidle} -w \
timeout 1800 '${systemctl} suspend' \
timeout 600 '${niri} msg action power-off-monitors'
'';
quickshell = "${getExe pkgs.quickshell}";
};
environment.files."/home/${mainUser}/.config/quickshell" = {

View file

@ -15,7 +15,9 @@ in
imports = [
inputs.niri.nixosModules.niri
inputs.niri-tag.nixosModules.niri-tag
inputs.niri-s76.nixosModules.default
];
user.desktops.niri = {
enable = true;
config =
@ -70,5 +72,6 @@ in
package = niri;
};
services.niri-tag.enable = true;
services.niri-s76-bridge.enable = true;
}

View file

@ -24,7 +24,7 @@ scope "user" {
};
url = {
"https://github.com/".insteadOf = "github:";
"https://git.atagen.co/atagen/".insteadOf = "atagen:";
"https://git.lobotomise.me/atagen/".insteadOf = "atagen:";
"https://codeberg.org/".insteadOf = "codeberg:";
};
credential.helper = "rbw";
@ -35,8 +35,4 @@ scope "user" {
};
};
packages = [
localPkgs.rbw-helper
(getFlakePkg' inputs.angrr "angrr-direnv")
];
}

View file

@ -1,5 +1,4 @@
_: {
services.libinput.enable = true;
console.useXkbConfig = true;
services.xserver.xkb.options = "caps:swapescape";
}

View file

@ -1,12 +1,37 @@
{ pkgs, inputs, ... }:
{ inputs, ... }:
{
imports = [
inputs.nyx.nixosModules.default
inputs.bunker.nixosModules.default
];
services.system76-scheduler.enable = true;
bunker.kernel = {
enable = true;
hardened = false;
cpuArch = "MZEN3";
version = "6.18";
lto = "none";
trimmed = true;
};
services.scx = {
enable = true;
scheduler = "scx_bpfland";
};
# boot.kernelPackages = pkgs.linuxPackages_cachyos-gcc;
boot.kernelPackages = pkgs.linuxPackages_xanmod;
# nixpkgs.overlays = [
# (final: prev: {
# nvidia-open = prev.nvidia-open.override {
# patches = [
# (pkgs.fetchpatch {
# url = "https://github.com/CachyOS/CachyOS-PKGBUILDS/raw/refs/heads/master/nvidia/nvidia-utils/kernel-6.19.patch";
# hash = "";
# })
# ];
# };
# })
# ];
}

View file

@ -4,8 +4,8 @@
generator = lib.generators.toJSON { };
value = {
email = "boss@atagen.co";
pinentry = lib.getExe pkgs.pinentry-qt;
base_url = "https://vault.atagen.co";
pinentry = lib.getExe pkgs.pinentry-qt; # TODO this is fugly
base_url = "https://vault.lobotomise.me";
};
};

View file

@ -6,7 +6,7 @@
qt = {
enable = true;
style = "adwaita-dark";
# style = "adwaita-dark";
# platformTheme = "gnome"; # broken in unstable ?
};

View file

@ -59,10 +59,11 @@
};
plymouth = {
theme = "starship";
theme = "colorful_loop";
font = "${config.rice.fonts.sans.package}/share/fonts/truetype/MSW98UI-Regular.ttf";
themePackages = [
(getFlakePkg inputs.hudcore)
pkgs.adi1090x-plymouth-themes
# (getFlakePkg inputs.hudcore)
];
};
};

5
graphical/startup.nix Normal file
View file

@ -0,0 +1,5 @@
{ pkgs, lib, ... }:
{
quick.services.startup-sound = "${lib.getExe' pkgs.alsa-utils "aplay"} " + ../assets/startup.wav;
# FIXME broken , maybe use niri exec-once ..
}

View file

@ -2,4 +2,5 @@
{
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.xserver.videoDrivers = [ "i915" ];
services.xserver.xkb.options = "caps:escape";
}

View file

@ -1,9 +1,7 @@
{ ... }:
{
networking.hostName = "adrift"; # Define your hostname.
_: {
networking.hostName = "adrift";
time.timeZone = "Australia/Sydney";
time.hardwareClockInLocalTime = false;
i18n.defaultLocale = "en_AU.UTF-8";
i18n.supportedLocales = [ "en_AU.UTF-8/UTF-8" ];
nixpkgs.hostPlatform.system = "x86_64-linux";
}

View file

@ -11,12 +11,12 @@
hardware.cpu.amd.updateMicrocode = true;
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
services.xserver.videoDrivers = [ "nvidia" ];
nixpkgs.config.cudaSupport = true;
# temporarily disabled bc firefox
nixpkgs.config.cudaSupport = false;
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.latest;
package = config.boot.kernelPackages.nvidiaPackages.beta;
modesetting.enable = true;
powerManagement.enable = true;
open = true;

View file

@ -4,5 +4,4 @@ _: {
time.hardwareClockInLocalTime = false;
i18n.defaultLocale = "en_AU.UTF-8";
i18n.supportedLocales = [ "en_AU.UTF-8/UTF-8" ];
nixpkgs.hostPlatform.system = "x86_64-linux";
}

View file

@ -1,14 +0,0 @@
# TODO replace with hjem-rum config
#
# { scope, ... }:
# scope "hm.programs.niri.settings.outputs" {
# "DP-1" = {
# transform.rotation = 90;
# scale = 1;
# };
# "DP-2" = {
# variable-refresh-rate = true;
# scale = 1;
# };
# }
_: { }

View file

@ -25,6 +25,7 @@ in
stdenv.hostPlatform = info.system;
};
modules = [
{ nixpkgs.hostPlatform.system = info.system; }
inputs.arbys.nixosModules.arbys
inputs.hjem.nixosModules.hjem
(

View file

@ -1,44 +0,0 @@
{ pkgs, ... }:
pkgs.writeTextFile {
name = "rbw-helper";
text = ''
declare -A params
if [ "x$1" == "xget" ]; then
read line
while [ -n "$line" ]; do
key=$\{line%%=*}
value=$\{line#*=}
params[$key]=$value
read line
done
if [ "x$\{params['protocol']}" != "xhttps" ]; then
exit
fi
if [ -z "$\{params["host"]}" ]; then
exit
fi
rbw ls > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Please login to rbw to use git credential helper" > /dev/stderr
exit
fi
user=`rbw get --folder Git --full $\{params["host"]} | grep "Username:" | cut -d' ' -f2-`
pass=`rbw get --folder Git $\{params["host"]}`
if [ "x$user" == "x" ] || [ "x$pass" == "x" ]; then
echo "Couldn't find host in rbw DB." > /dev/stderr
exit
fi
echo username=$user
echo password=$pass
fi
'';
executable = true;
destination = "/bin/git-credential-rbw";
}