ayo
This commit is contained in:
parent
8d07c29d66
commit
8a3b7aaa57
@ -3,10 +3,8 @@
|
||||
lib,
|
||||
budUtils,
|
||||
...
|
||||
}:
|
||||
{
|
||||
bud.cmds =
|
||||
with pkgs; {
|
||||
}: {
|
||||
bud.cmds = with pkgs; {
|
||||
get = {
|
||||
writer = budUtils.writeBashWithPaths [nixUnstable git coreutils];
|
||||
synopsis = "get [DEST]";
|
||||
|
@ -3,8 +3,7 @@ let
|
||||
default = (import ./lib/compat).defaultNix;
|
||||
ciSystems = ["aarch64-linux" "i686-linux" "x86_64-linux"];
|
||||
filterSystems = lib.filterAttrs (system: _: lib.elem system ciSystems);
|
||||
recurseIntoAttrsRecursive =
|
||||
lib.mapAttrs (_: v:
|
||||
recurseIntoAttrsRecursive = lib.mapAttrs (_: v:
|
||||
if lib.isAttrs v
|
||||
then recurseIntoAttrsRecursive (lib.recurseIntoAttrs v)
|
||||
else v);
|
||||
|
@ -8,11 +8,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1645729578,
|
||||
"narHash": "sha256-SQEbg+hHG2Q1zU/Oqjj5LK2X/lmjJoBprm4eYORk0UU=",
|
||||
"lastModified": 1646360966,
|
||||
"narHash": "sha256-fJ/WHSU45bMJRDqz9yA3B2lwXtW5DKooU+Pzn13GyZI=",
|
||||
"owner": "kamadorueda",
|
||||
"repo": "alejandra",
|
||||
"rev": "08627c847e250b3eb654c6febeffaa0626fa8473",
|
||||
"rev": "511c3f6a88b6964e1496fb6f441f4ae5e58bd3ea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
12
flake.nix
12
flake.nix
@ -34,8 +34,7 @@
|
||||
inputs.nixpkgs.follows = "nixos";
|
||||
};
|
||||
};
|
||||
outputs =
|
||||
{
|
||||
outputs = {
|
||||
self,
|
||||
digga,
|
||||
nixos,
|
||||
@ -46,8 +45,7 @@
|
||||
rnixLsp,
|
||||
alejandra,
|
||||
...
|
||||
}
|
||||
@ inputs:
|
||||
} @ inputs:
|
||||
digga.lib.mkFlake
|
||||
{
|
||||
inherit self inputs;
|
||||
@ -71,8 +69,7 @@
|
||||
prev.remarshal.overrideAttrs
|
||||
(
|
||||
old: {
|
||||
postPatch =
|
||||
''
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "poetry.masonry.api" "poetry.core.masonry.api" \
|
||||
--replace 'PyYAML = "^5.3"' 'PyYAML = "*"' \
|
||||
@ -117,8 +114,7 @@
|
||||
users = digga.lib.rakeLeaves ./users;
|
||||
nixos-hardware = nixos-hardware.nixosModules;
|
||||
};
|
||||
suites =
|
||||
with profiles; {
|
||||
suites = with profiles; {
|
||||
base = [cachix core users.root];
|
||||
work = [users.patriot develop];
|
||||
};
|
||||
|
@ -1,8 +1,4 @@
|
||||
{
|
||||
suites,
|
||||
...
|
||||
}:
|
||||
{
|
||||
{suites, ...}: {
|
||||
### root password is empty by default ###
|
||||
imports = suites.base;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
@ -1,8 +1,4 @@
|
||||
{
|
||||
profiles,
|
||||
...
|
||||
}:
|
||||
{
|
||||
{profiles, ...}: {
|
||||
# build with: `bud build bootstrap bootstrapIso`
|
||||
# reachable on the local link via ssh root@fe80::47%eno1
|
||||
# where 'eno1' is replaced by your own machine's network
|
||||
|
@ -6,8 +6,7 @@
|
||||
suites,
|
||||
profiles,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
btrfsPartPath = "/dev/disk/by-label/NIXOS";
|
||||
btrfsOptions = ["compress-force=zstd" "noatime"];
|
||||
btrfsDiff =
|
||||
@ -132,8 +131,7 @@ in {
|
||||
mitigations.disable = true;
|
||||
allowSimultaneousMultithreading = false;
|
||||
# Deleting root subvolume makes sudo show lecture every boot
|
||||
sudo.extraConfig =
|
||||
''
|
||||
sudo.extraConfig = ''
|
||||
Defaults lecture = never
|
||||
'';
|
||||
rtkit.enable = true;
|
||||
@ -152,8 +150,7 @@ in {
|
||||
driSupport32Bit = true;
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [amdvlk libvdpau-va-gl vaapiVdpau libva vulkan-loader pipewire];
|
||||
extraPackages32 =
|
||||
with pkgs.pkgsi686Linux;
|
||||
extraPackages32 = with pkgs.pkgsi686Linux;
|
||||
[libvdpau-va-gl vaapiVdpau libva vulkan-loader pipewire] ++ [pkgs.driversi686Linux.amdvlk];
|
||||
};
|
||||
pulseaudio = {
|
||||
@ -186,6 +183,12 @@ in {
|
||||
};
|
||||
networking.interfaces.enp6s0.useDHCP = true;
|
||||
services = {
|
||||
code-server = {
|
||||
enable = false;
|
||||
auth = "none";
|
||||
user = "patriot";
|
||||
group = "users";
|
||||
};
|
||||
ipfs = {
|
||||
enable = false;
|
||||
enableGC = true;
|
||||
@ -215,7 +218,7 @@ in {
|
||||
};
|
||||
};
|
||||
virtualisation = {
|
||||
podman.enable = false;
|
||||
podman.enable = true;
|
||||
libvirtd.enable = false;
|
||||
};
|
||||
system.stateVersion = "20.09";
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
let
|
||||
{...}: let
|
||||
inherit (default.inputs.nixos) lib;
|
||||
host = configs.${hostname} or configs.NixOS;
|
||||
configs = default.nixosConfigurations;
|
||||
|
10
lib/html.nix
10
lib/html.nix
@ -1,5 +1,4 @@
|
||||
{ format ? false }:
|
||||
let
|
||||
{format ? false}: let
|
||||
inherit (builtins) isAttrs isList map;
|
||||
fmt =
|
||||
if format
|
||||
@ -12,19 +11,18 @@ let
|
||||
builtins.listToAttrs (map
|
||||
(n: {
|
||||
name = n;
|
||||
value = (f n);
|
||||
value = f n;
|
||||
})
|
||||
names);
|
||||
evalChildren = children:
|
||||
if isList children
|
||||
then concatStrings children
|
||||
else children;
|
||||
tag =
|
||||
name: maybeAttrs:
|
||||
tag = name: maybeAttrs:
|
||||
if isAttrs maybeAttrs
|
||||
then (children: "<${name}${evalAttrs maybeAttrs}>${fmt}${evalChildren children}${fmt}</${name}>")
|
||||
else tag name {} maybeAttrs;
|
||||
tags = (genAttrs tag ["html" "head" "body" "div" "p" "a"]);
|
||||
tags = genAttrs tag ["html" "head" "body" "div" "p" "a"];
|
||||
in
|
||||
tags
|
||||
// {
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
console.keyMap = "trq";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
|
@ -1,8 +1,4 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
{config, ...}: {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.sessionVariables = {inherit (config.environment.sessionVariables) NIX_PATH;};
|
||||
|
@ -2,7 +2,6 @@
|
||||
channel,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
nix.nixPath = ["nixpkgs=${channel.input}" "nixos-config=${../lib/compat/nixos}" "home-manager=${inputs.home}"];
|
||||
}
|
||||
|
@ -6,8 +6,7 @@
|
||||
with lib; let
|
||||
inherit (builtins) readFile fetchurl;
|
||||
cfg = config.security.mitigations;
|
||||
cmdline =
|
||||
''
|
||||
cmdline = ''
|
||||
ibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off tsx=on tsx_async_abort=off mitigations=off'';
|
||||
in {
|
||||
options = {
|
||||
@ -16,8 +15,7 @@ in {
|
||||
{
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description =
|
||||
''
|
||||
description = ''
|
||||
Whether to disable spectre and meltdown mitigations in the kernel. Do
|
||||
not use this in mission critical deployments, or on any machine you do
|
||||
not have physical access to.
|
||||
|
@ -1,6 +1,5 @@
|
||||
_: prev: let
|
||||
cliArgs =
|
||||
let
|
||||
cliArgs = let
|
||||
flags = [
|
||||
"--flag-switches-begin"
|
||||
"--enable-features=WebUIDarkMode,UseOzonePlatform,WebRTCPipeWireCapturer,IgnoreGPUBlocklist,Vulkan"
|
||||
|
@ -2,7 +2,6 @@ final: prev: rec {
|
||||
discord-canary-system =
|
||||
prev.callPackage
|
||||
mkDiscord
|
||||
(
|
||||
rec {
|
||||
pname = "discord-canary";
|
||||
version = "0.0.131";
|
||||
@ -22,10 +21,8 @@ final: prev: rec {
|
||||
"--enable-zero-copy"
|
||||
"--disable-gpu-driver-bug-workarounds"
|
||||
];
|
||||
}
|
||||
);
|
||||
mkDiscord =
|
||||
{
|
||||
};
|
||||
mkDiscord = {
|
||||
pname,
|
||||
version,
|
||||
src,
|
||||
@ -163,8 +160,7 @@ final: prev: rec {
|
||||
]
|
||||
)
|
||||
++ extraOptions;
|
||||
installPhase =
|
||||
''
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,usr/lib/${pname},share/pixmaps}
|
||||
ln -s discord.png $out/share/pixmaps/${pname}.png
|
||||
ln -s "${desktopItem}/share/applications" $out/share/
|
||||
@ -201,8 +197,7 @@ final: prev: rec {
|
||||
categories = "Network;InstantMessaging;";
|
||||
mimeType = "x-scheme-handler/discord";
|
||||
};
|
||||
meta =
|
||||
with lib; {
|
||||
meta = with lib; {
|
||||
description = "All-in-one cross-platform voice and text chat for gamers";
|
||||
homepage = "https://discordapp.com/";
|
||||
downloadPage = "https://discordapp.com/download";
|
||||
|
@ -12,8 +12,7 @@ final: prev: {
|
||||
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
|
||||
sha256 = "0bijwfsd9s4awqkgxd9c2cxh7y5r06vix98qjp0dkv63r6jig8ch";
|
||||
};
|
||||
installPhase =
|
||||
''
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,opt/${binaryName},share/pixmaps}
|
||||
mv * $out/opt/${binaryName}
|
||||
chmod +x $out/opt/${binaryName}/${binaryName}
|
||||
|
@ -12,13 +12,11 @@ final: prev: {
|
||||
};
|
||||
dontWrapQtApps = true;
|
||||
buildInputs = [prev.libsForQt5.qt5.qtbase];
|
||||
buildPhase =
|
||||
''
|
||||
buildPhase = ''
|
||||
cd src/styleplugin
|
||||
qmake && make
|
||||
'';
|
||||
installPhase =
|
||||
''
|
||||
installPhase = ''
|
||||
mkdir -p $out/$qtPluginPrefix/styles
|
||||
mv libphantomstyleplugin.so $out/$qtPluginPrefix/styles
|
||||
'';
|
||||
|
@ -1,8 +1,7 @@
|
||||
_: prev: let
|
||||
pkgs = prev;
|
||||
lib = pkgs.lib;
|
||||
vscodeWayland =
|
||||
let
|
||||
vscodeWayland = let
|
||||
flags = [
|
||||
"--flag-switches-begin"
|
||||
"--enable-features=UseOzonePlatform,IgnoreGPUBlocklist"
|
||||
@ -21,8 +20,7 @@ _: prev: let
|
||||
${pkgs.vscodium}/bin/codium ${lib.concatStringsSep " " flags}
|
||||
'';
|
||||
in {
|
||||
vscodeWayland =
|
||||
let
|
||||
vscodeWayland = let
|
||||
pname = "vscode";
|
||||
desktop =
|
||||
pkgs.makeDesktopItem
|
||||
@ -41,8 +39,7 @@ in {
|
||||
version = pkgs.vscode.version;
|
||||
nativeBuildInputs = [pkgs.makeWrapper];
|
||||
phases = ["installPhase"];
|
||||
installPhase =
|
||||
''
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -m755 ${vscodeWayland}/bin/${pname}-wayland $out/bin/${pname}
|
||||
cp -r ${desktop}/share $out/share
|
||||
|
@ -2,8 +2,7 @@
|
||||
{
|
||||
fetchgit,
|
||||
fetchurl,
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
manix = {
|
||||
pname = "manix";
|
||||
version = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4";
|
||||
|
@ -2,8 +2,7 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
folder = ./.;
|
||||
toImport = name: value: folder + ("/" + name);
|
||||
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix";
|
||||
|
@ -5,22 +5,20 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
inherit (lib) fileContents mkIf;
|
||||
pkgBin = lib.our.pkgBinNoDep pkgs;
|
||||
coreBin = v: "${pkgs.coreutils}/bin/${v}";
|
||||
nixBin = "${config.nix.package}/bin/nix";
|
||||
in {
|
||||
imports = [../cachix ../../locale];
|
||||
imports = [../cachix ../../locale ../../secrets/secrets.nix];
|
||||
boot = {
|
||||
tmpOnTmpfs = true;
|
||||
loader.systemd-boot.configurationLimit = 10;
|
||||
};
|
||||
console.font = "7x14";
|
||||
environment = {
|
||||
systemPackages =
|
||||
with pkgs; [
|
||||
systemPackages = with pkgs; [
|
||||
binutils
|
||||
coreutils
|
||||
curl
|
||||
@ -77,8 +75,7 @@ in {
|
||||
''
|
||||
)
|
||||
];
|
||||
shellAliases =
|
||||
let
|
||||
shellAliases = let
|
||||
ifSudo = string: mkIf config.security.sudo.enable string;
|
||||
in {
|
||||
gtw = "${pkgBin "grit"} tree wnv";
|
||||
@ -121,8 +118,7 @@ in {
|
||||
ngcdo = ifSudo "sudo nix-collect-garbage --delete-old";
|
||||
top = "${pkgs.bottom}/bin/btm";
|
||||
myip = "${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1";
|
||||
mn =
|
||||
let
|
||||
mn = let
|
||||
manix_preview = "manix '{}' | sed 's/type: /> type: /g' | bat -l Markdown --color=always --plain";
|
||||
in ''manix "" | rg '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="${manix_preview}" | xargs manix'';
|
||||
# fix nixos-option
|
||||
@ -142,14 +138,12 @@ in {
|
||||
jtl = "journalctl";
|
||||
};
|
||||
};
|
||||
system.activationScripts.diff =
|
||||
''
|
||||
system.activationScripts.diff = ''
|
||||
${pkgs.nixUnstable}/bin/nix store \
|
||||
--experimental-features 'nix-command' \
|
||||
diff-closures /run/current-system "$systemConfig"
|
||||
'';
|
||||
nix =
|
||||
let
|
||||
nix = let
|
||||
registry =
|
||||
builtins.removeAttrs
|
||||
(builtins.mapAttrs (_: v: {flake = v;}) (lib.filterAttrs (_: v: v ? outputs) inputs))
|
||||
@ -158,8 +152,7 @@ in {
|
||||
package = pkgs.nixUnstable;
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
extraOptions =
|
||||
''
|
||||
extraOptions = ''
|
||||
min-free = 536870912
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
|
@ -1,8 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
imports = [./editor];
|
||||
environment.systemPackages = with pkgs; [git tokei];
|
||||
documentation.dev.enable = true;
|
||||
|
@ -1,8 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
imports = [./helix.nix];
|
||||
environment.systemPackages = with pkgs; [alejandra];
|
||||
environment.shellAliases = {nixf-all = "alejandra **/**.nix";};
|
||||
|
@ -1,8 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
{pkgs, ...}: let
|
||||
pkg = pkgs.helix;
|
||||
bin = "${pkg}/bin/hx";
|
||||
in {
|
||||
|
@ -1,8 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
{pkgs, ...}: let
|
||||
pkg = pkgs.kakoune-unwrapped;
|
||||
in {
|
||||
environment.systemPackages = [pkg];
|
||||
|
@ -1,5 +1 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ environment.systemPackages = with pkgs; [godot-bin godot-headless-bin godot-server-bin]; }
|
||||
{pkgs, ...}: {environment.systemPackages = with pkgs; [godot-bin godot-headless-bin godot-server-bin];}
|
||||
|
@ -2,8 +2,7 @@
|
||||
imports = [./dns];
|
||||
networking.dhcpcd.enable = false;
|
||||
networking.useDHCP = false;
|
||||
networking.dhcpcd.extraConfig =
|
||||
''
|
||||
networking.dhcpcd.extraConfig = ''
|
||||
noarp
|
||||
nodelay
|
||||
'';
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
services.nextdns = {
|
||||
enable = true;
|
||||
arguments = ["-config" "75e43d"];
|
||||
|
@ -1,8 +1,7 @@
|
||||
{
|
||||
services.stubby = {
|
||||
roundRobinUpstreams = false;
|
||||
upstreamServers =
|
||||
let
|
||||
upstreamServers = let
|
||||
nextDnsId = "75e43d";
|
||||
in ''
|
||||
- address_data: 45.90.28.0
|
||||
|
Binary file not shown.
@ -2,10 +2,8 @@
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
modules =
|
||||
with inputs; [
|
||||
}: {
|
||||
modules = with inputs; [
|
||||
#bud.devshellModules.bud
|
||||
];
|
||||
exportedModules = [./devos.nix];
|
||||
|
@ -2,8 +2,7 @@
|
||||
pkgs,
|
||||
extraModulesPath,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
hooks = import ./hooks;
|
||||
pkgWithCategory = category: package: {inherit package category;};
|
||||
linter = pkgWithCategory "linter";
|
||||
@ -33,8 +32,7 @@ in {
|
||||
''
|
||||
);
|
||||
packages = with pkgs; [git-crypt];
|
||||
commands =
|
||||
with pkgs;
|
||||
commands = with pkgs;
|
||||
[
|
||||
(devos nixUnstable)
|
||||
#(devos agenix)
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
users.users.nixos = {
|
||||
uid = 1000;
|
||||
password = "nixos";
|
||||
|
@ -3,8 +3,7 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
inherit (lib) mapAttrs' nameValuePair;
|
||||
inherit (builtins) readDir fetchGit;
|
||||
pkgBin = lib.our.pkgBinNoDep pkgs;
|
||||
@ -20,8 +19,7 @@ in {
|
||||
"dialout"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
hashedPassword =
|
||||
"$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/";
|
||||
hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/";
|
||||
};
|
||||
environment = {
|
||||
systemPackages = [pkgs.qt5.qtwayland];
|
||||
@ -96,14 +94,12 @@ in {
|
||||
NetworkManager-wait-online.enable = false;
|
||||
};
|
||||
};
|
||||
home-manager.users.patriot =
|
||||
{
|
||||
home-manager.users.patriot = {
|
||||
config,
|
||||
pkgs,
|
||||
suites,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
personal = import ../../personal.nix;
|
||||
name = personal.name;
|
||||
email = personal.emails.primary;
|
||||
@ -145,8 +141,7 @@ in {
|
||||
white = "3a4d53";
|
||||
};
|
||||
};
|
||||
colorSchemeDark =
|
||||
let
|
||||
colorSchemeDark = let
|
||||
normal = {
|
||||
black = "252525";
|
||||
gray = "5b5b5b";
|
||||
@ -218,8 +213,7 @@ in {
|
||||
border = "#${acColor2}";
|
||||
text = "#${acColor2}";
|
||||
};
|
||||
addIndSway =
|
||||
x: {
|
||||
addIndSway = x: {
|
||||
background = x.background;
|
||||
border = x.border;
|
||||
childBorder = x.border;
|
||||
@ -228,8 +222,7 @@ in {
|
||||
# don't care
|
||||
};
|
||||
fonts = [fontComb];
|
||||
extraEnv =
|
||||
''
|
||||
extraEnv = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
# needs qt5.qtwayland in systemPackages
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
@ -271,8 +264,7 @@ in {
|
||||
fonts.fontconfig.enable = true;
|
||||
home = {
|
||||
homeDirectory = nixosConfig.users.users.patriot.home;
|
||||
packages =
|
||||
with pkgs; [
|
||||
packages = with pkgs; [
|
||||
# Font stuff
|
||||
fontPackage
|
||||
noto-fonts-cjk
|
||||
@ -302,8 +294,7 @@ in {
|
||||
lutris.overrideAttrs
|
||||
(
|
||||
old: {
|
||||
profile =
|
||||
''
|
||||
profile = ''
|
||||
${old.profile or ""}
|
||||
unset VK_ICD_FILENAMES
|
||||
export VK_ICD_FILENAMES=${nixosConfig.environment.variables.VK_ICD_FILENAMES}'';
|
||||
@ -323,8 +314,7 @@ in {
|
||||
steam.override
|
||||
{
|
||||
extraLibraries = pkgs: [pkgs.pipewire];
|
||||
extraProfile =
|
||||
''
|
||||
extraProfile = ''
|
||||
unset VK_ICD_FILENAMES
|
||||
export VK_ICD_FILENAMES=${nixosConfig.environment.variables.VK_ICD_FILENAMES}'';
|
||||
}
|
||||
@ -339,16 +329,18 @@ in {
|
||||
];
|
||||
};
|
||||
wayland.windowManager = {
|
||||
sway =
|
||||
let
|
||||
sway = let
|
||||
mkRofiCmd = args: "${config.programs.rofi.finalPackage}/bin/rofi ${lib.concatStringsSep " " args} | ${pkgs.sway}/bin/swaymsg --";
|
||||
in {
|
||||
enable = true;
|
||||
extraSessionCommands = extraEnv;
|
||||
wrapperFeatures.gtk = true;
|
||||
extraConfig =
|
||||
''
|
||||
extraConfig = ''
|
||||
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||
output HEADLESS-1 {
|
||||
mode 1920x1080
|
||||
bg ~/wallpaper.png fill
|
||||
}
|
||||
'';
|
||||
config = {
|
||||
fonts = {
|
||||
@ -367,8 +359,7 @@ in {
|
||||
menu = mkRofiCmd ["-show" "drun"];
|
||||
modifier = "Mod4";
|
||||
terminal = pkgBin "alacritty";
|
||||
keybindings =
|
||||
let
|
||||
keybindings = let
|
||||
mod = config.wayland.windowManager.sway.config.modifier;
|
||||
cat = pkgs.coreutils + "/bin/cat";
|
||||
grim = pkgBin "grim";
|
||||
@ -387,13 +378,11 @@ in {
|
||||
"${mod}+Shift+r" = "reload";
|
||||
"${mod}+c" = mkRofiCmd ["-show" "calc"];
|
||||
# Screenshot and copy it to clipboard
|
||||
"Mod1+s" =
|
||||
''
|
||||
"Mod1+s" = ''
|
||||
exec export SFILE="${shotFile}.png" && ${grim} "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png
|
||||
'';
|
||||
# Save selected area as a picture and copy it to clipboard
|
||||
"Mod1+Shift+s" =
|
||||
''
|
||||
"Mod1+Shift+s" = ''
|
||||
exec export SFILE="${shotFile}.png" && ${grim} -g "$(${slurp})" "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png
|
||||
'';
|
||||
# Record screen
|
||||
@ -443,8 +432,7 @@ in {
|
||||
escapeTime = 0;
|
||||
keyMode = "vi";
|
||||
shortcut = "a";
|
||||
extraConfig =
|
||||
''
|
||||
extraConfig = ''
|
||||
set -g default-terminal "alacritty"
|
||||
set -ga terminal-overrides ",alacritty:Tc"
|
||||
set -g status off
|
||||
@ -482,8 +470,7 @@ in {
|
||||
tabs_are_windows = true;
|
||||
};
|
||||
};
|
||||
extraConfig =
|
||||
let
|
||||
extraConfig = let
|
||||
domains = [
|
||||
"discord.com"
|
||||
"github.com"
|
||||
@ -495,8 +482,7 @@ in {
|
||||
"youtube.com"
|
||||
"docker.com"
|
||||
];
|
||||
enableJsForDomain =
|
||||
d: ''
|
||||
enableJsForDomain = d: ''
|
||||
config.set('content.javascript.enabled', True, 'https://*.${d}')
|
||||
'';
|
||||
in ''
|
||||
@ -532,10 +518,8 @@ in {
|
||||
enableVteIntegration = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
plugins =
|
||||
let
|
||||
fast-syntax-highlighting =
|
||||
let
|
||||
plugins = let
|
||||
fast-syntax-highlighting = let
|
||||
name = "fast-syntax-highlighting";
|
||||
in {
|
||||
inherit name;
|
||||
@ -557,14 +541,12 @@ in {
|
||||
dotDir = ".config/zsh";
|
||||
history.path = ".local/share/zsh/history";
|
||||
envExtra = extraEnv;
|
||||
loginExtra =
|
||||
''
|
||||
loginExtra = ''
|
||||
if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then
|
||||
exec sway
|
||||
fi
|
||||
'';
|
||||
initExtra =
|
||||
''
|
||||
initExtra = ''
|
||||
export TERM=alacritty
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
|
||||
@ -585,8 +567,7 @@ in {
|
||||
shellAliases =
|
||||
nixosConfig.environment.shellAliases
|
||||
// {
|
||||
harmony-ssh =
|
||||
''
|
||||
harmony-ssh = ''
|
||||
${pkgs.mosh}/bin/mosh root@chat.harmonyapp.io
|
||||
'';
|
||||
};
|
||||
@ -610,11 +591,9 @@ in {
|
||||
};
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
extensions =
|
||||
let
|
||||
mkExt =
|
||||
n: v: p: s: {
|
||||
package = pkgs.vscode;
|
||||
extensions = let
|
||||
mkExt = n: v: p: s: {
|
||||
name = n;
|
||||
version = v;
|
||||
publisher = p;
|
||||
@ -625,39 +604,26 @@ in {
|
||||
pkgs.vscode-utils.extensionsFromVscodeMarketplace
|
||||
[
|
||||
# Rust
|
||||
(mkExt "rust-analyzer" "0.2.760" "matklad" "sha256-M+eFqIFwiKkiwqFRwkX5h6mc/W+NBqkXcNUdTewwkCI=")
|
||||
(mkExt "rust-analyzer" "0.3.968" "matklad" "sha256-wuNdmUYburGjgri8gFJl1FSryJbz1aXjJy4NQ+/Wbk4=")
|
||||
(mkExt "even-better-toml" "0.14.2" "tamasfe" "sha256-lE2t+KUfClD/xjpvexTJlEr7Kufo+22DUM9Ju4Tisp0=")
|
||||
(mkExt "crates" "0.5.9" "serayuzgur" "sha256-YHIbnl2R7lqwJHi8qUQImClx9MWm+5Pc12vYw7e/RlA=")
|
||||
(mkExt "crates" "0.5.10" "serayuzgur" "sha256-bY/dphiEPPgTg1zMjvxx4b0Ska2XggRucnZxtbppcLU=")
|
||||
# Nix
|
||||
(
|
||||
mkExt "nix-env-selector" "1.0.7" "arrterian" "sha256-DnaIXJ27bcpOrIp1hm7DcrlIzGSjo4RTJ9fD72ukKlc="
|
||||
)
|
||||
# Go
|
||||
(mkExt "Go" "0.25.1" "golang" "sha256-ZDUWN9lzDnR77W7xcMFQaaFl/6Lf/x1jgaBkwZPqGGw=")
|
||||
(mkExt "Go" "0.32.0" "golang" "sha256-OsKeZrG157l1HUCDvymJ3ovLxlEEJf7RBe2hXOutdyg=")
|
||||
# Flutter and dart
|
||||
(mkExt "flutter" "3.22.0" "Dart-Code" "sha256-woygN6hOWlP2UayqwDhJh9KcZk1GzH7mDF5IueDRxs4=")
|
||||
(mkExt "dart-code" "3.22.0" "Dart-Code" "sha256-1nTewVmlrxbXdRR1EPts46u24LHdnP5BblFsMaGlNYg=")
|
||||
(mkExt "flutter" "3.37.20220301" "Dart-Code" "sha256-PS24pbqKNZ/myNcTqgjosG0Pq58yMoATKDgy3k23JlE=")
|
||||
(mkExt "dart-code" "3.37.20220303" "Dart-Code" "sha256-hS+V4kLe+eGIqj/1mZdgbhxWWxqSr2ZUsc2V0HI6tN8=")
|
||||
# protobuf
|
||||
(mkExt "vscode-proto3" "0.5.4" "zxh404" "sha256-S89qRRlfiTsJ+fJuwdNkZywe6mei48KxIEWbGWChriE=")
|
||||
(mkExt "vscode-buf" "0.3.1" "bufbuild" "sha256-KjU6WlDxYPPJjh45mCq6Kczi6odYwnLaGj4RHe3fc2w=")
|
||||
(mkExt "vscode-proto3" "0.5.5" "zxh404" "sha256-Em+w3FyJLXrpVAe9N7zsHRoMcpvl+psmG1new7nA8iE=")
|
||||
(mkExt "vscode-buf" "0.4.0" "bufbuild" "sha256-VM6LYYak1rB4AdpVYfKpOfizGaFI/R+iUsf6UT50vdw=")
|
||||
# git
|
||||
(mkExt "gitlens" "11.6.0" "eamodio" "sha256-JxCNE/IL/v94xWmhebsRZo1Gw+nSSpDgZ41ZGongGVI=")
|
||||
(
|
||||
mkExt
|
||||
"vscode-commitizen"
|
||||
"0.14.1"
|
||||
"KnisterPeter"
|
||||
"sha256-yw8XKGL7Ul9wV+C0yL1LFJCE3+E8u/sR9s3TjkGJPZM="
|
||||
)
|
||||
(mkExt "gitlens" "12.0.2" "eamodio" "sha256-et2uam4hOQkxxT+r0fwZhpWGjHk45NAOriFA/43ngpo=")
|
||||
# Customization
|
||||
# (mkExt "dance" "0.3.2" "gregoire" "sha256-+g8EXeCkPOPvZ60JoXkGTeSXYWrXmKrcbUaEfDppdgA=")
|
||||
(mkExt "material-icon-theme" "4.6.0" "PKief" "sha256-i+3lrw3mDqK2vTMDhJYTACW5JleA+lN1XAC2imgQLUo=")
|
||||
(
|
||||
mkExt "github-vscode-theme" "4.1.1" "GitHub" "sha256-yLySHOx6pe7w2cyi95pQlKkn/o4VMCTkrTYHu8ASn5M="
|
||||
)
|
||||
(mkExt "koka" "0.0.1" "maelvalais" "sha256-ty8Mql19HgUWForggeZuHQpzTbmmB/eBFHqof5ZMKr0=")
|
||||
(mkExt "vscode-rhai" "0.6.3" "rhaiscript" "sha256-gEdpM/TkkiZ50bG9qDU6BH04AJLRDcHLquniRs6m0mg=")
|
||||
(mkExt "copilot" "1.2.1991" "GitHub" "sha256-pGb5xfjuy+g646doZEuKhQalkOte5dH+I+1op+vZY48=")
|
||||
(mkExt "material-icon-theme" "4.14.1" "PKief" "sha256-OHXi0EfeyKMeFiMU5yg0aDoWds4ED0lb+l6T12XZ3LQ=")
|
||||
(mkExt "horizon-theme-vscode" "1.0.0" "alexandernanberg" "sha256-M7SmOYPkAVi5jQLynZqTjmFo9UcQ6W4dU4euP6ua9Z8=")
|
||||
]
|
||||
)
|
||||
++ (
|
||||
@ -671,7 +637,7 @@ in {
|
||||
);
|
||||
userSettings = {
|
||||
"workbench.iconTheme" = "material-icon-theme";
|
||||
"workbench.colorTheme" = "GitHub Dark";
|
||||
"workbench.colorTheme" = "Horizon Bold";
|
||||
"rust-analyzer.cargo.loadOutDirsFromCheck" = true;
|
||||
"rust-analyzer.procMacro.enable" = true;
|
||||
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
|
||||
@ -685,12 +651,12 @@ in {
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = pkgBin "rnix-lsp";
|
||||
"editor.bracketPairColorization.enabled" = true;
|
||||
"editor.semanticHighlighting.enabled" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
services = {
|
||||
gpg-agent =
|
||||
let
|
||||
gpg-agent = let
|
||||
defaultCacheTtl = 3600 * 6;
|
||||
maxCacheTtl = 3600 * 24;
|
||||
in {
|
||||
@ -712,8 +678,7 @@ in {
|
||||
xdg = {
|
||||
enable = true;
|
||||
configFile = {
|
||||
"helix/themes/mytheme.toml".text =
|
||||
''
|
||||
"helix/themes/mytheme.toml".text = ''
|
||||
"attribute" = { fg = "#${colorScheme.bright.yellow}]" }
|
||||
"comment" = { fg = "#${colorScheme.normal.gray}", modifiers = ['italic'] }
|
||||
"constant" = { fg = "#${colorScheme.normal.blue}" }
|
||||
@ -756,22 +721,19 @@ in {
|
||||
"warning" = { fg = "#${colorScheme.normal.yellow}", modifiers = ['bold'] }
|
||||
"error" = { fg = "#${colorScheme.bright.red}", modifiers = ['bold'] }
|
||||
'';
|
||||
"helix/config.toml".text =
|
||||
''
|
||||
"helix/config.toml".text = ''
|
||||
theme = "mytheme"
|
||||
[editor]
|
||||
line-number = "relative"
|
||||
[lsp]
|
||||
display-messages = true
|
||||
'';
|
||||
"helix/languages.toml".text =
|
||||
''
|
||||
"helix/languages.toml".text = ''
|
||||
[[language]]
|
||||
name = "nix"
|
||||
language-server = { command = "${pkgBin "rnix-lsp"}" }
|
||||
'';
|
||||
"waybar/config".text =
|
||||
let
|
||||
"waybar/config".text = let
|
||||
swayEnabled = config.wayland.windowManager.sway.enable;
|
||||
in
|
||||
builtins.toJSON
|
||||
@ -803,11 +765,9 @@ in {
|
||||
format-source-muted = "/mic/";
|
||||
};
|
||||
};
|
||||
"waybar/style.css".text =
|
||||
let
|
||||
"waybar/style.css".text = let
|
||||
makeBorder = color: "border-bottom: 3px solid #${color};";
|
||||
makeInfo =
|
||||
color: ''
|
||||
makeInfo = color: ''
|
||||
color: #${color};
|
||||
${makeBorder color}
|
||||
'';
|
||||
|
@ -31,8 +31,7 @@
|
||||
rs1ft = "soft HEAD~1";
|
||||
rh1rd = "hard HEAD~1";
|
||||
# logging
|
||||
l =
|
||||
"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
||||
l = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
||||
plog = "log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'";
|
||||
tlog = "log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative";
|
||||
rank = "shortlog -sn --no-merges";
|
||||
|
@ -3,14 +3,12 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
home.packages = with pkgs; [hikari xwayland];
|
||||
xdg = {
|
||||
enable = true;
|
||||
configFile = {
|
||||
"hikari/hikari.conf".text =
|
||||
''
|
||||
"hikari/hikari.conf".text = ''
|
||||
ui {
|
||||
border = 1
|
||||
gap = 0
|
||||
@ -195,8 +193,7 @@
|
||||
}
|
||||
}
|
||||
'';
|
||||
"hikari/autostart".source =
|
||||
"${
|
||||
"hikari/autostart".source = "${
|
||||
pkgs.writeScriptBin
|
||||
"hikari-autostart"
|
||||
''
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
@ -1,5 +1 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ home.packages = [pkgs.wtf]; }
|
||||
{pkgs, ...}: {home.packages = [pkgs.wtf];}
|
||||
|
@ -1,5 +1,3 @@
|
||||
{ ... }:
|
||||
{
|
||||
users.users.root.initialHashedPassword =
|
||||
"$6$XLWo1sPpgp63Zm$XHBbULH9q1gb/.yalPPU/I7EgTcW80bM.moCjIe/qGyOwE47VcXNVbTHloBZdIWQq0MfIG0IxInAu59.oJyos/";
|
||||
{...}: {
|
||||
users.users.root.initialHashedPassword = "$6$XLWo1sPpgp63Zm$XHBbULH9q1gb/.yalPPU/I7EgTcW80bM.moCjIe/qGyOwE47VcXNVbTHloBZdIWQq0MfIG0IxInAu59.oJyos/";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user