This commit is contained in:
dusk 2022-03-09 23:55:02 +03:00
parent 8d07c29d66
commit 8a3b7aaa57
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
43 changed files with 1585 additions and 1708 deletions

View File

@ -3,10 +3,8 @@
lib, lib,
budUtils, budUtils,
... ...
}: }: {
{ bud.cmds = with pkgs; {
bud.cmds =
with pkgs; {
get = { get = {
writer = budUtils.writeBashWithPaths [nixUnstable git coreutils]; writer = budUtils.writeBashWithPaths [nixUnstable git coreutils];
synopsis = "get [DEST]"; synopsis = "get [DEST]";

View File

@ -3,8 +3,7 @@ let
default = (import ./lib/compat).defaultNix; default = (import ./lib/compat).defaultNix;
ciSystems = ["aarch64-linux" "i686-linux" "x86_64-linux"]; ciSystems = ["aarch64-linux" "i686-linux" "x86_64-linux"];
filterSystems = lib.filterAttrs (system: _: lib.elem system ciSystems); filterSystems = lib.filterAttrs (system: _: lib.elem system ciSystems);
recurseIntoAttrsRecursive = recurseIntoAttrsRecursive = lib.mapAttrs (_: v:
lib.mapAttrs (_: v:
if lib.isAttrs v if lib.isAttrs v
then recurseIntoAttrsRecursive (lib.recurseIntoAttrs v) then recurseIntoAttrsRecursive (lib.recurseIntoAttrs v)
else v); else v);

View File

@ -8,11 +8,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1645729578, "lastModified": 1646360966,
"narHash": "sha256-SQEbg+hHG2Q1zU/Oqjj5LK2X/lmjJoBprm4eYORk0UU=", "narHash": "sha256-fJ/WHSU45bMJRDqz9yA3B2lwXtW5DKooU+Pzn13GyZI=",
"owner": "kamadorueda", "owner": "kamadorueda",
"repo": "alejandra", "repo": "alejandra",
"rev": "08627c847e250b3eb654c6febeffaa0626fa8473", "rev": "511c3f6a88b6964e1496fb6f441f4ae5e58bd3ea",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -34,8 +34,7 @@
inputs.nixpkgs.follows = "nixos"; inputs.nixpkgs.follows = "nixos";
}; };
}; };
outputs = outputs = {
{
self, self,
digga, digga,
nixos, nixos,
@ -46,8 +45,7 @@
rnixLsp, rnixLsp,
alejandra, alejandra,
... ...
} } @ inputs:
@ inputs:
digga.lib.mkFlake digga.lib.mkFlake
{ {
inherit self inputs; inherit self inputs;
@ -71,8 +69,7 @@
prev.remarshal.overrideAttrs prev.remarshal.overrideAttrs
( (
old: { old: {
postPatch = postPatch = ''
''
substituteInPlace pyproject.toml \ substituteInPlace pyproject.toml \
--replace "poetry.masonry.api" "poetry.core.masonry.api" \ --replace "poetry.masonry.api" "poetry.core.masonry.api" \
--replace 'PyYAML = "^5.3"' 'PyYAML = "*"' \ --replace 'PyYAML = "^5.3"' 'PyYAML = "*"' \
@ -117,8 +114,7 @@
users = digga.lib.rakeLeaves ./users; users = digga.lib.rakeLeaves ./users;
nixos-hardware = nixos-hardware.nixosModules; nixos-hardware = nixos-hardware.nixosModules;
}; };
suites = suites = with profiles; {
with profiles; {
base = [cachix core users.root]; base = [cachix core users.root];
work = [users.patriot develop]; work = [users.patriot develop];
}; };

View File

@ -1,8 +1,4 @@
{ {suites, ...}: {
suites,
...
}:
{
### root password is empty by default ### ### root password is empty by default ###
imports = suites.base; imports = suites.base;
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;

View File

@ -1,8 +1,4 @@
{ {profiles, ...}: {
profiles,
...
}:
{
# build with: `bud build bootstrap bootstrapIso` # build with: `bud build bootstrap bootstrapIso`
# reachable on the local link via ssh root@fe80::47%eno1 # reachable on the local link via ssh root@fe80::47%eno1
# where 'eno1' is replaced by your own machine's network # where 'eno1' is replaced by your own machine's network

View File

@ -6,8 +6,7 @@
suites, suites,
profiles, profiles,
... ...
}: }: let
let
btrfsPartPath = "/dev/disk/by-label/NIXOS"; btrfsPartPath = "/dev/disk/by-label/NIXOS";
btrfsOptions = ["compress-force=zstd" "noatime"]; btrfsOptions = ["compress-force=zstd" "noatime"];
btrfsDiff = btrfsDiff =
@ -132,8 +131,7 @@ in {
mitigations.disable = true; mitigations.disable = true;
allowSimultaneousMultithreading = false; allowSimultaneousMultithreading = false;
# Deleting root subvolume makes sudo show lecture every boot # Deleting root subvolume makes sudo show lecture every boot
sudo.extraConfig = sudo.extraConfig = ''
''
Defaults lecture = never Defaults lecture = never
''; '';
rtkit.enable = true; rtkit.enable = true;
@ -152,8 +150,7 @@ in {
driSupport32Bit = true; driSupport32Bit = true;
enable = true; enable = true;
extraPackages = with pkgs; [amdvlk libvdpau-va-gl vaapiVdpau libva vulkan-loader pipewire]; extraPackages = with pkgs; [amdvlk libvdpau-va-gl vaapiVdpau libva vulkan-loader pipewire];
extraPackages32 = extraPackages32 = with pkgs.pkgsi686Linux;
with pkgs.pkgsi686Linux;
[libvdpau-va-gl vaapiVdpau libva vulkan-loader pipewire] ++ [pkgs.driversi686Linux.amdvlk]; [libvdpau-va-gl vaapiVdpau libva vulkan-loader pipewire] ++ [pkgs.driversi686Linux.amdvlk];
}; };
pulseaudio = { pulseaudio = {
@ -186,6 +183,12 @@ in {
}; };
networking.interfaces.enp6s0.useDHCP = true; networking.interfaces.enp6s0.useDHCP = true;
services = { services = {
code-server = {
enable = false;
auth = "none";
user = "patriot";
group = "users";
};
ipfs = { ipfs = {
enable = false; enable = false;
enableGC = true; enableGC = true;
@ -215,7 +218,7 @@ in {
}; };
}; };
virtualisation = { virtualisation = {
podman.enable = false; podman.enable = true;
libvirtd.enable = false; libvirtd.enable = false;
}; };
system.stateVersion = "20.09"; system.stateVersion = "20.09";

View File

@ -1,5 +1,4 @@
{ ... }: {...}: let
let
inherit (default.inputs.nixos) lib; inherit (default.inputs.nixos) lib;
host = configs.${hostname} or configs.NixOS; host = configs.${hostname} or configs.NixOS;
configs = default.nixosConfigurations; configs = default.nixosConfigurations;

View File

@ -1,5 +1,4 @@
{ format ? false }: {format ? false}: let
let
inherit (builtins) isAttrs isList map; inherit (builtins) isAttrs isList map;
fmt = fmt =
if format if format
@ -12,19 +11,18 @@ let
builtins.listToAttrs (map builtins.listToAttrs (map
(n: { (n: {
name = n; name = n;
value = (f n); value = f n;
}) })
names); names);
evalChildren = children: evalChildren = children:
if isList children if isList children
then concatStrings children then concatStrings children
else children; else children;
tag = tag = name: maybeAttrs:
name: maybeAttrs:
if isAttrs maybeAttrs if isAttrs maybeAttrs
then (children: "<${name}${evalAttrs maybeAttrs}>${fmt}${evalChildren children}${fmt}</${name}>") then (children: "<${name}${evalAttrs maybeAttrs}>${fmt}${evalChildren children}${fmt}</${name}>")
else tag name {} maybeAttrs; else tag name {} maybeAttrs;
tags = (genAttrs tag ["html" "head" "body" "div" "p" "a"]); tags = genAttrs tag ["html" "head" "body" "div" "p" "a"];
in in
tags tags
// { // {

View File

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
console.keyMap = "trq"; console.keyMap = "trq";
i18n = { i18n = {
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";

View File

@ -1,8 +1,4 @@
{ {config, ...}: {
config,
...
}:
{
home-manager.sharedModules = [ home-manager.sharedModules = [
{ {
home.sessionVariables = {inherit (config.environment.sessionVariables) NIX_PATH;}; home.sessionVariables = {inherit (config.environment.sessionVariables) NIX_PATH;};

View File

@ -2,7 +2,6 @@
channel, channel,
inputs, inputs,
... ...
}: }: {
{
nix.nixPath = ["nixpkgs=${channel.input}" "nixos-config=${../lib/compat/nixos}" "home-manager=${inputs.home}"]; nix.nixPath = ["nixpkgs=${channel.input}" "nixos-config=${../lib/compat/nixos}" "home-manager=${inputs.home}"];
} }

View File

@ -6,8 +6,7 @@
with lib; let with lib; let
inherit (builtins) readFile fetchurl; inherit (builtins) readFile fetchurl;
cfg = config.security.mitigations; 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''; 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 { in {
options = { options = {
@ -16,8 +15,7 @@ in {
{ {
type = types.bool; type = types.bool;
default = false; default = false;
description = description = ''
''
Whether to disable spectre and meltdown mitigations in the kernel. Do 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 use this in mission critical deployments, or on any machine you do
not have physical access to. not have physical access to.

View File

@ -1,6 +1,5 @@
_: prev: let _: prev: let
cliArgs = cliArgs = let
let
flags = [ flags = [
"--flag-switches-begin" "--flag-switches-begin"
"--enable-features=WebUIDarkMode,UseOzonePlatform,WebRTCPipeWireCapturer,IgnoreGPUBlocklist,Vulkan" "--enable-features=WebUIDarkMode,UseOzonePlatform,WebRTCPipeWireCapturer,IgnoreGPUBlocklist,Vulkan"

View File

@ -2,7 +2,6 @@ final: prev: rec {
discord-canary-system = discord-canary-system =
prev.callPackage prev.callPackage
mkDiscord mkDiscord
(
rec { rec {
pname = "discord-canary"; pname = "discord-canary";
version = "0.0.131"; version = "0.0.131";
@ -22,10 +21,8 @@ final: prev: rec {
"--enable-zero-copy" "--enable-zero-copy"
"--disable-gpu-driver-bug-workarounds" "--disable-gpu-driver-bug-workarounds"
]; ];
} };
); mkDiscord = {
mkDiscord =
{
pname, pname,
version, version,
src, src,
@ -163,8 +160,7 @@ final: prev: rec {
] ]
) )
++ extraOptions; ++ extraOptions;
installPhase = installPhase = ''
''
mkdir -p $out/{bin,usr/lib/${pname},share/pixmaps} mkdir -p $out/{bin,usr/lib/${pname},share/pixmaps}
ln -s discord.png $out/share/pixmaps/${pname}.png ln -s discord.png $out/share/pixmaps/${pname}.png
ln -s "${desktopItem}/share/applications" $out/share/ ln -s "${desktopItem}/share/applications" $out/share/
@ -201,8 +197,7 @@ final: prev: rec {
categories = "Network;InstantMessaging;"; categories = "Network;InstantMessaging;";
mimeType = "x-scheme-handler/discord"; mimeType = "x-scheme-handler/discord";
}; };
meta = meta = with lib; {
with lib; {
description = "All-in-one cross-platform voice and text chat for gamers"; description = "All-in-one cross-platform voice and text chat for gamers";
homepage = "https://discordapp.com/"; homepage = "https://discordapp.com/";
downloadPage = "https://discordapp.com/download"; downloadPage = "https://discordapp.com/download";

View File

@ -12,8 +12,7 @@ final: prev: {
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz"; url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
sha256 = "0bijwfsd9s4awqkgxd9c2cxh7y5r06vix98qjp0dkv63r6jig8ch"; sha256 = "0bijwfsd9s4awqkgxd9c2cxh7y5r06vix98qjp0dkv63r6jig8ch";
}; };
installPhase = installPhase = ''
''
mkdir -p $out/{bin,opt/${binaryName},share/pixmaps} mkdir -p $out/{bin,opt/${binaryName},share/pixmaps}
mv * $out/opt/${binaryName} mv * $out/opt/${binaryName}
chmod +x $out/opt/${binaryName}/${binaryName} chmod +x $out/opt/${binaryName}/${binaryName}

View File

@ -12,13 +12,11 @@ final: prev: {
}; };
dontWrapQtApps = true; dontWrapQtApps = true;
buildInputs = [prev.libsForQt5.qt5.qtbase]; buildInputs = [prev.libsForQt5.qt5.qtbase];
buildPhase = buildPhase = ''
''
cd src/styleplugin cd src/styleplugin
qmake && make qmake && make
''; '';
installPhase = installPhase = ''
''
mkdir -p $out/$qtPluginPrefix/styles mkdir -p $out/$qtPluginPrefix/styles
mv libphantomstyleplugin.so $out/$qtPluginPrefix/styles mv libphantomstyleplugin.so $out/$qtPluginPrefix/styles
''; '';

View File

@ -1,8 +1,7 @@
_: prev: let _: prev: let
pkgs = prev; pkgs = prev;
lib = pkgs.lib; lib = pkgs.lib;
vscodeWayland = vscodeWayland = let
let
flags = [ flags = [
"--flag-switches-begin" "--flag-switches-begin"
"--enable-features=UseOzonePlatform,IgnoreGPUBlocklist" "--enable-features=UseOzonePlatform,IgnoreGPUBlocklist"
@ -21,8 +20,7 @@ _: prev: let
${pkgs.vscodium}/bin/codium ${lib.concatStringsSep " " flags} ${pkgs.vscodium}/bin/codium ${lib.concatStringsSep " " flags}
''; '';
in { in {
vscodeWayland = vscodeWayland = let
let
pname = "vscode"; pname = "vscode";
desktop = desktop =
pkgs.makeDesktopItem pkgs.makeDesktopItem
@ -41,8 +39,7 @@ in {
version = pkgs.vscode.version; version = pkgs.vscode.version;
nativeBuildInputs = [pkgs.makeWrapper]; nativeBuildInputs = [pkgs.makeWrapper];
phases = ["installPhase"]; phases = ["installPhase"];
installPhase = installPhase = ''
''
mkdir -p $out/bin mkdir -p $out/bin
install -m755 ${vscodeWayland}/bin/${pname}-wayland $out/bin/${pname} install -m755 ${vscodeWayland}/bin/${pname}-wayland $out/bin/${pname}
cp -r ${desktop}/share $out/share cp -r ${desktop}/share $out/share

View File

@ -2,8 +2,7 @@
{ {
fetchgit, fetchgit,
fetchurl, fetchurl,
}: }: {
{
manix = { manix = {
pname = "manix"; pname = "manix";
version = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4"; version = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4";

View File

@ -2,8 +2,7 @@
pkgs, pkgs,
lib, lib,
... ...
}: }: let
let
folder = ./.; folder = ./.;
toImport = name: value: folder + ("/" + name); toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix"; filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix";

View File

@ -5,22 +5,20 @@
pkgs, pkgs,
lib, lib,
... ...
}: }: let
let
inherit (lib) fileContents mkIf; inherit (lib) fileContents mkIf;
pkgBin = lib.our.pkgBinNoDep pkgs; pkgBin = lib.our.pkgBinNoDep pkgs;
coreBin = v: "${pkgs.coreutils}/bin/${v}"; coreBin = v: "${pkgs.coreutils}/bin/${v}";
nixBin = "${config.nix.package}/bin/nix"; nixBin = "${config.nix.package}/bin/nix";
in { in {
imports = [../cachix ../../locale]; imports = [../cachix ../../locale ../../secrets/secrets.nix];
boot = { boot = {
tmpOnTmpfs = true; tmpOnTmpfs = true;
loader.systemd-boot.configurationLimit = 10; loader.systemd-boot.configurationLimit = 10;
}; };
console.font = "7x14"; console.font = "7x14";
environment = { environment = {
systemPackages = systemPackages = with pkgs; [
with pkgs; [
binutils binutils
coreutils coreutils
curl curl
@ -77,8 +75,7 @@ in {
'' ''
) )
]; ];
shellAliases = shellAliases = let
let
ifSudo = string: mkIf config.security.sudo.enable string; ifSudo = string: mkIf config.security.sudo.enable string;
in { in {
gtw = "${pkgBin "grit"} tree wnv"; gtw = "${pkgBin "grit"} tree wnv";
@ -121,8 +118,7 @@ in {
ngcdo = ifSudo "sudo nix-collect-garbage --delete-old"; ngcdo = ifSudo "sudo nix-collect-garbage --delete-old";
top = "${pkgs.bottom}/bin/btm"; top = "${pkgs.bottom}/bin/btm";
myip = "${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1"; myip = "${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1";
mn = mn = let
let
manix_preview = "manix '{}' | sed 's/type: /> type: /g' | bat -l Markdown --color=always --plain"; 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''; in ''manix "" | rg '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="${manix_preview}" | xargs manix'';
# fix nixos-option # fix nixos-option
@ -142,14 +138,12 @@ in {
jtl = "journalctl"; jtl = "journalctl";
}; };
}; };
system.activationScripts.diff = system.activationScripts.diff = ''
''
${pkgs.nixUnstable}/bin/nix store \ ${pkgs.nixUnstable}/bin/nix store \
--experimental-features 'nix-command' \ --experimental-features 'nix-command' \
diff-closures /run/current-system "$systemConfig" diff-closures /run/current-system "$systemConfig"
''; '';
nix = nix = let
let
registry = registry =
builtins.removeAttrs builtins.removeAttrs
(builtins.mapAttrs (_: v: {flake = v;}) (lib.filterAttrs (_: v: v ? outputs) inputs)) (builtins.mapAttrs (_: v: {flake = v;}) (lib.filterAttrs (_: v: v ? outputs) inputs))
@ -158,8 +152,7 @@ in {
package = pkgs.nixUnstable; package = pkgs.nixUnstable;
gc.automatic = true; gc.automatic = true;
optimise.automatic = true; optimise.automatic = true;
extraOptions = extraOptions = ''
''
min-free = 536870912 min-free = 536870912
keep-outputs = true keep-outputs = true
keep-derivations = true keep-derivations = true

View File

@ -1,8 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}:
{
imports = [./editor]; imports = [./editor];
environment.systemPackages = with pkgs; [git tokei]; environment.systemPackages = with pkgs; [git tokei];
documentation.dev.enable = true; documentation.dev.enable = true;

View File

@ -1,8 +1,4 @@
{ {pkgs, ...}: {
pkgs,
...
}:
{
imports = [./helix.nix]; imports = [./helix.nix];
environment.systemPackages = with pkgs; [alejandra]; environment.systemPackages = with pkgs; [alejandra];
environment.shellAliases = {nixf-all = "alejandra **/**.nix";}; environment.shellAliases = {nixf-all = "alejandra **/**.nix";};

View File

@ -1,8 +1,4 @@
{ {pkgs, ...}: let
pkgs,
...
}:
let
pkg = pkgs.helix; pkg = pkgs.helix;
bin = "${pkg}/bin/hx"; bin = "${pkg}/bin/hx";
in { in {

View File

@ -1,8 +1,4 @@
{ {pkgs, ...}: let
pkgs,
...
}:
let
pkg = pkgs.kakoune-unwrapped; pkg = pkgs.kakoune-unwrapped;
in { in {
environment.systemPackages = [pkg]; environment.systemPackages = [pkg];

View File

@ -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]; }

View File

@ -2,8 +2,7 @@
imports = [./dns]; imports = [./dns];
networking.dhcpcd.enable = false; networking.dhcpcd.enable = false;
networking.useDHCP = false; networking.useDHCP = false;
networking.dhcpcd.extraConfig = networking.dhcpcd.extraConfig = ''
''
noarp noarp
nodelay nodelay
''; '';

View File

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
services.nextdns = { services.nextdns = {
enable = true; enable = true;
arguments = ["-config" "75e43d"]; arguments = ["-config" "75e43d"];

View File

@ -1,8 +1,7 @@
{ {
services.stubby = { services.stubby = {
roundRobinUpstreams = false; roundRobinUpstreams = false;
upstreamServers = upstreamServers = let
let
nextDnsId = "75e43d"; nextDnsId = "75e43d";
in '' in ''
- address_data: 45.90.28.0 - address_data: 45.90.28.0

Binary file not shown.

View File

@ -2,10 +2,8 @@
self, self,
inputs, inputs,
... ...
}: }: {
{ modules = with inputs; [
modules =
with inputs; [
#bud.devshellModules.bud #bud.devshellModules.bud
]; ];
exportedModules = [./devos.nix]; exportedModules = [./devos.nix];

View File

@ -2,8 +2,7 @@
pkgs, pkgs,
extraModulesPath, extraModulesPath,
... ...
}: }: let
let
hooks = import ./hooks; hooks = import ./hooks;
pkgWithCategory = category: package: {inherit package category;}; pkgWithCategory = category: package: {inherit package category;};
linter = pkgWithCategory "linter"; linter = pkgWithCategory "linter";
@ -33,8 +32,7 @@ in {
'' ''
); );
packages = with pkgs; [git-crypt]; packages = with pkgs; [git-crypt];
commands = commands = with pkgs;
with pkgs;
[ [
(devos nixUnstable) (devos nixUnstable)
#(devos agenix) #(devos agenix)

View File

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
users.users.nixos = { users.users.nixos = {
uid = 1000; uid = 1000;
password = "nixos"; password = "nixos";

View File

@ -3,8 +3,7 @@
pkgs, pkgs,
lib, lib,
... ...
}: }: let
let
inherit (lib) mapAttrs' nameValuePair; inherit (lib) mapAttrs' nameValuePair;
inherit (builtins) readDir fetchGit; inherit (builtins) readDir fetchGit;
pkgBin = lib.our.pkgBinNoDep pkgs; pkgBin = lib.our.pkgBinNoDep pkgs;
@ -20,8 +19,7 @@ in {
"dialout" "dialout"
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;
hashedPassword = hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/";
"$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/";
}; };
environment = { environment = {
systemPackages = [pkgs.qt5.qtwayland]; systemPackages = [pkgs.qt5.qtwayland];
@ -96,14 +94,12 @@ in {
NetworkManager-wait-online.enable = false; NetworkManager-wait-online.enable = false;
}; };
}; };
home-manager.users.patriot = home-manager.users.patriot = {
{
config, config,
pkgs, pkgs,
suites, suites,
... ...
}: }: let
let
personal = import ../../personal.nix; personal = import ../../personal.nix;
name = personal.name; name = personal.name;
email = personal.emails.primary; email = personal.emails.primary;
@ -145,8 +141,7 @@ in {
white = "3a4d53"; white = "3a4d53";
}; };
}; };
colorSchemeDark = colorSchemeDark = let
let
normal = { normal = {
black = "252525"; black = "252525";
gray = "5b5b5b"; gray = "5b5b5b";
@ -218,8 +213,7 @@ in {
border = "#${acColor2}"; border = "#${acColor2}";
text = "#${acColor2}"; text = "#${acColor2}";
}; };
addIndSway = addIndSway = x: {
x: {
background = x.background; background = x.background;
border = x.border; border = x.border;
childBorder = x.border; childBorder = x.border;
@ -228,8 +222,7 @@ in {
# don't care # don't care
}; };
fonts = [fontComb]; fonts = [fontComb];
extraEnv = extraEnv = ''
''
export SDL_VIDEODRIVER=wayland export SDL_VIDEODRIVER=wayland
# needs qt5.qtwayland in systemPackages # needs qt5.qtwayland in systemPackages
export QT_QPA_PLATFORM=wayland export QT_QPA_PLATFORM=wayland
@ -271,8 +264,7 @@ in {
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home = { home = {
homeDirectory = nixosConfig.users.users.patriot.home; homeDirectory = nixosConfig.users.users.patriot.home;
packages = packages = with pkgs; [
with pkgs; [
# Font stuff # Font stuff
fontPackage fontPackage
noto-fonts-cjk noto-fonts-cjk
@ -302,8 +294,7 @@ in {
lutris.overrideAttrs lutris.overrideAttrs
( (
old: { old: {
profile = profile = ''
''
${old.profile or ""} ${old.profile or ""}
unset VK_ICD_FILENAMES unset VK_ICD_FILENAMES
export VK_ICD_FILENAMES=${nixosConfig.environment.variables.VK_ICD_FILENAMES}''; export VK_ICD_FILENAMES=${nixosConfig.environment.variables.VK_ICD_FILENAMES}'';
@ -323,8 +314,7 @@ in {
steam.override steam.override
{ {
extraLibraries = pkgs: [pkgs.pipewire]; extraLibraries = pkgs: [pkgs.pipewire];
extraProfile = extraProfile = ''
''
unset VK_ICD_FILENAMES unset VK_ICD_FILENAMES
export VK_ICD_FILENAMES=${nixosConfig.environment.variables.VK_ICD_FILENAMES}''; export VK_ICD_FILENAMES=${nixosConfig.environment.variables.VK_ICD_FILENAMES}'';
} }
@ -339,16 +329,18 @@ in {
]; ];
}; };
wayland.windowManager = { wayland.windowManager = {
sway = sway = let
let
mkRofiCmd = args: "${config.programs.rofi.finalPackage}/bin/rofi ${lib.concatStringsSep " " args} | ${pkgs.sway}/bin/swaymsg --"; mkRofiCmd = args: "${config.programs.rofi.finalPackage}/bin/rofi ${lib.concatStringsSep " " args} | ${pkgs.sway}/bin/swaymsg --";
in { in {
enable = true; enable = true;
extraSessionCommands = extraEnv; extraSessionCommands = extraEnv;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
extraConfig = extraConfig = ''
''
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
output HEADLESS-1 {
mode 1920x1080
bg ~/wallpaper.png fill
}
''; '';
config = { config = {
fonts = { fonts = {
@ -367,8 +359,7 @@ in {
menu = mkRofiCmd ["-show" "drun"]; menu = mkRofiCmd ["-show" "drun"];
modifier = "Mod4"; modifier = "Mod4";
terminal = pkgBin "alacritty"; terminal = pkgBin "alacritty";
keybindings = keybindings = let
let
mod = config.wayland.windowManager.sway.config.modifier; mod = config.wayland.windowManager.sway.config.modifier;
cat = pkgs.coreutils + "/bin/cat"; cat = pkgs.coreutils + "/bin/cat";
grim = pkgBin "grim"; grim = pkgBin "grim";
@ -387,13 +378,11 @@ in {
"${mod}+Shift+r" = "reload"; "${mod}+Shift+r" = "reload";
"${mod}+c" = mkRofiCmd ["-show" "calc"]; "${mod}+c" = mkRofiCmd ["-show" "calc"];
# Screenshot and copy it to clipboard # Screenshot and copy it to clipboard
"Mod1+s" = "Mod1+s" = ''
''
exec export SFILE="${shotFile}.png" && ${grim} "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png 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 # 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 exec export SFILE="${shotFile}.png" && ${grim} -g "$(${slurp})" "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png
''; '';
# Record screen # Record screen
@ -443,8 +432,7 @@ in {
escapeTime = 0; escapeTime = 0;
keyMode = "vi"; keyMode = "vi";
shortcut = "a"; shortcut = "a";
extraConfig = extraConfig = ''
''
set -g default-terminal "alacritty" set -g default-terminal "alacritty"
set -ga terminal-overrides ",alacritty:Tc" set -ga terminal-overrides ",alacritty:Tc"
set -g status off set -g status off
@ -482,8 +470,7 @@ in {
tabs_are_windows = true; tabs_are_windows = true;
}; };
}; };
extraConfig = extraConfig = let
let
domains = [ domains = [
"discord.com" "discord.com"
"github.com" "github.com"
@ -495,8 +482,7 @@ in {
"youtube.com" "youtube.com"
"docker.com" "docker.com"
]; ];
enableJsForDomain = enableJsForDomain = d: ''
d: ''
config.set('content.javascript.enabled', True, 'https://*.${d}') config.set('content.javascript.enabled', True, 'https://*.${d}')
''; '';
in '' in ''
@ -532,10 +518,8 @@ in {
enableVteIntegration = true; enableVteIntegration = true;
enableAutosuggestions = true; enableAutosuggestions = true;
enableCompletion = true; enableCompletion = true;
plugins = plugins = let
let fast-syntax-highlighting = let
fast-syntax-highlighting =
let
name = "fast-syntax-highlighting"; name = "fast-syntax-highlighting";
in { in {
inherit name; inherit name;
@ -557,14 +541,12 @@ in {
dotDir = ".config/zsh"; dotDir = ".config/zsh";
history.path = ".local/share/zsh/history"; history.path = ".local/share/zsh/history";
envExtra = extraEnv; envExtra = extraEnv;
loginExtra = loginExtra = ''
''
if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then if [ "$(${pkgs.coreutils}/bin/tty)" = "/dev/tty1" ]; then
exec sway exec sway
fi fi
''; '';
initExtra = initExtra = ''
''
export TERM=alacritty export TERM=alacritty
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
@ -585,8 +567,7 @@ in {
shellAliases = shellAliases =
nixosConfig.environment.shellAliases nixosConfig.environment.shellAliases
// { // {
harmony-ssh = harmony-ssh = ''
''
${pkgs.mosh}/bin/mosh root@chat.harmonyapp.io ${pkgs.mosh}/bin/mosh root@chat.harmonyapp.io
''; '';
}; };
@ -610,11 +591,9 @@ in {
}; };
vscode = { vscode = {
enable = true; enable = true;
package = pkgs.vscodium; package = pkgs.vscode;
extensions = extensions = let
let mkExt = n: v: p: s: {
mkExt =
n: v: p: s: {
name = n; name = n;
version = v; version = v;
publisher = p; publisher = p;
@ -625,39 +604,26 @@ in {
pkgs.vscode-utils.extensionsFromVscodeMarketplace pkgs.vscode-utils.extensionsFromVscodeMarketplace
[ [
# Rust # 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 "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 # Nix
( (
mkExt "nix-env-selector" "1.0.7" "arrterian" "sha256-DnaIXJ27bcpOrIp1hm7DcrlIzGSjo4RTJ9fD72ukKlc=" mkExt "nix-env-selector" "1.0.7" "arrterian" "sha256-DnaIXJ27bcpOrIp1hm7DcrlIzGSjo4RTJ9fD72ukKlc="
) )
# Go # Go
(mkExt "Go" "0.25.1" "golang" "sha256-ZDUWN9lzDnR77W7xcMFQaaFl/6Lf/x1jgaBkwZPqGGw=") (mkExt "Go" "0.32.0" "golang" "sha256-OsKeZrG157l1HUCDvymJ3ovLxlEEJf7RBe2hXOutdyg=")
# Flutter and dart # Flutter and dart
(mkExt "flutter" "3.22.0" "Dart-Code" "sha256-woygN6hOWlP2UayqwDhJh9KcZk1GzH7mDF5IueDRxs4=") (mkExt "flutter" "3.37.20220301" "Dart-Code" "sha256-PS24pbqKNZ/myNcTqgjosG0Pq58yMoATKDgy3k23JlE=")
(mkExt "dart-code" "3.22.0" "Dart-Code" "sha256-1nTewVmlrxbXdRR1EPts46u24LHdnP5BblFsMaGlNYg=") (mkExt "dart-code" "3.37.20220303" "Dart-Code" "sha256-hS+V4kLe+eGIqj/1mZdgbhxWWxqSr2ZUsc2V0HI6tN8=")
# protobuf # protobuf
(mkExt "vscode-proto3" "0.5.4" "zxh404" "sha256-S89qRRlfiTsJ+fJuwdNkZywe6mei48KxIEWbGWChriE=") (mkExt "vscode-proto3" "0.5.5" "zxh404" "sha256-Em+w3FyJLXrpVAe9N7zsHRoMcpvl+psmG1new7nA8iE=")
(mkExt "vscode-buf" "0.3.1" "bufbuild" "sha256-KjU6WlDxYPPJjh45mCq6Kczi6odYwnLaGj4RHe3fc2w=") (mkExt "vscode-buf" "0.4.0" "bufbuild" "sha256-VM6LYYak1rB4AdpVYfKpOfizGaFI/R+iUsf6UT50vdw=")
# git # git
(mkExt "gitlens" "11.6.0" "eamodio" "sha256-JxCNE/IL/v94xWmhebsRZo1Gw+nSSpDgZ41ZGongGVI=") (mkExt "gitlens" "12.0.2" "eamodio" "sha256-et2uam4hOQkxxT+r0fwZhpWGjHk45NAOriFA/43ngpo=")
(
mkExt
"vscode-commitizen"
"0.14.1"
"KnisterPeter"
"sha256-yw8XKGL7Ul9wV+C0yL1LFJCE3+E8u/sR9s3TjkGJPZM="
)
# Customization # Customization
# (mkExt "dance" "0.3.2" "gregoire" "sha256-+g8EXeCkPOPvZ60JoXkGTeSXYWrXmKrcbUaEfDppdgA=") (mkExt "material-icon-theme" "4.14.1" "PKief" "sha256-OHXi0EfeyKMeFiMU5yg0aDoWds4ED0lb+l6T12XZ3LQ=")
(mkExt "material-icon-theme" "4.6.0" "PKief" "sha256-i+3lrw3mDqK2vTMDhJYTACW5JleA+lN1XAC2imgQLUo=") (mkExt "horizon-theme-vscode" "1.0.0" "alexandernanberg" "sha256-M7SmOYPkAVi5jQLynZqTjmFo9UcQ6W4dU4euP6ua9Z8=")
(
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=")
] ]
) )
++ ( ++ (
@ -671,7 +637,7 @@ in {
); );
userSettings = { userSettings = {
"workbench.iconTheme" = "material-icon-theme"; "workbench.iconTheme" = "material-icon-theme";
"workbench.colorTheme" = "GitHub Dark"; "workbench.colorTheme" = "Horizon Bold";
"rust-analyzer.cargo.loadOutDirsFromCheck" = true; "rust-analyzer.cargo.loadOutDirsFromCheck" = true;
"rust-analyzer.procMacro.enable" = true; "rust-analyzer.procMacro.enable" = true;
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer"; "rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
@ -685,12 +651,12 @@ in {
"nix.enableLanguageServer" = true; "nix.enableLanguageServer" = true;
"nix.serverPath" = pkgBin "rnix-lsp"; "nix.serverPath" = pkgBin "rnix-lsp";
"editor.bracketPairColorization.enabled" = true; "editor.bracketPairColorization.enabled" = true;
"editor.semanticHighlighting.enabled" = true;
}; };
}; };
}; };
services = { services = {
gpg-agent = gpg-agent = let
let
defaultCacheTtl = 3600 * 6; defaultCacheTtl = 3600 * 6;
maxCacheTtl = 3600 * 24; maxCacheTtl = 3600 * 24;
in { in {
@ -712,8 +678,7 @@ in {
xdg = { xdg = {
enable = true; enable = true;
configFile = { configFile = {
"helix/themes/mytheme.toml".text = "helix/themes/mytheme.toml".text = ''
''
"attribute" = { fg = "#${colorScheme.bright.yellow}]" } "attribute" = { fg = "#${colorScheme.bright.yellow}]" }
"comment" = { fg = "#${colorScheme.normal.gray}", modifiers = ['italic'] } "comment" = { fg = "#${colorScheme.normal.gray}", modifiers = ['italic'] }
"constant" = { fg = "#${colorScheme.normal.blue}" } "constant" = { fg = "#${colorScheme.normal.blue}" }
@ -756,22 +721,19 @@ in {
"warning" = { fg = "#${colorScheme.normal.yellow}", modifiers = ['bold'] } "warning" = { fg = "#${colorScheme.normal.yellow}", modifiers = ['bold'] }
"error" = { fg = "#${colorScheme.bright.red}", modifiers = ['bold'] } "error" = { fg = "#${colorScheme.bright.red}", modifiers = ['bold'] }
''; '';
"helix/config.toml".text = "helix/config.toml".text = ''
''
theme = "mytheme" theme = "mytheme"
[editor] [editor]
line-number = "relative" line-number = "relative"
[lsp] [lsp]
display-messages = true display-messages = true
''; '';
"helix/languages.toml".text = "helix/languages.toml".text = ''
''
[[language]] [[language]]
name = "nix" name = "nix"
language-server = { command = "${pkgBin "rnix-lsp"}" } language-server = { command = "${pkgBin "rnix-lsp"}" }
''; '';
"waybar/config".text = "waybar/config".text = let
let
swayEnabled = config.wayland.windowManager.sway.enable; swayEnabled = config.wayland.windowManager.sway.enable;
in in
builtins.toJSON builtins.toJSON
@ -803,11 +765,9 @@ in {
format-source-muted = "/mic/"; format-source-muted = "/mic/";
}; };
}; };
"waybar/style.css".text = "waybar/style.css".text = let
let
makeBorder = color: "border-bottom: 3px solid #${color};"; makeBorder = color: "border-bottom: 3px solid #${color};";
makeInfo = makeInfo = color: ''
color: ''
color: #${color}; color: #${color};
${makeBorder color} ${makeBorder color}
''; '';

View File

@ -31,8 +31,7 @@
rs1ft = "soft HEAD~1"; rs1ft = "soft HEAD~1";
rh1rd = "hard HEAD~1"; rh1rd = "hard HEAD~1";
# logging # logging
l = l = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
"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'"; 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"; tlog = "log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative";
rank = "shortlog -sn --no-merges"; rank = "shortlog -sn --no-merges";

View File

@ -3,14 +3,12 @@
config, config,
pkgs, pkgs,
... ...
}: }: {
{
home.packages = with pkgs; [hikari xwayland]; home.packages = with pkgs; [hikari xwayland];
xdg = { xdg = {
enable = true; enable = true;
configFile = { configFile = {
"hikari/hikari.conf".text = "hikari/hikari.conf".text = ''
''
ui { ui {
border = 1 border = 1
gap = 0 gap = 0
@ -195,8 +193,7 @@
} }
} }
''; '';
"hikari/autostart".source = "hikari/autostart".source = "${
"${
pkgs.writeScriptBin pkgs.writeScriptBin
"hikari-autostart" "hikari-autostart"
'' ''

View File

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
programs.starship = { programs.starship = {
enable = true; enable = true;
settings = { settings = {

View File

@ -1,5 +1 @@
{ {pkgs, ...}: {home.packages = [pkgs.wtf];}
pkgs,
...
}:
{ home.packages = [pkgs.wtf]; }

View File

@ -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/";
} }