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,15 +3,13 @@
lib, lib,
budUtils, budUtils,
... ...
}: }: {
{ bud.cmds = with pkgs; {
bud.cmds = get = {
with pkgs; { writer = budUtils.writeBashWithPaths [nixUnstable git coreutils];
get = { synopsis = "get [DEST]";
writer = budUtils.writeBashWithPaths [nixUnstable git coreutils]; help = "Copy the desired template to DEST";
synopsis = "get [DEST]"; script = ./get.bash;
help = "Copy the desired template to DEST";
script = ./get.bash;
};
}; };
};
} }

View File

@ -3,15 +3,14 @@ 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);
systemOutputs = systemOutputs =
lib.filterAttrs lib.filterAttrs
(name: set: lib.isAttrs set && lib.any (system: set ? ${system} && name != "legacyPackages") ciSystems) (name: set: lib.isAttrs set && lib.any (system: set ? ${system} && name != "legacyPackages") ciSystems)
default.outputs; default.outputs;
ciDrvs = lib.mapAttrs (_: system: filterSystems system) systemOutputs; ciDrvs = lib.mapAttrs (_: system: filterSystems system) systemOutputs;
in in
(recurseIntoAttrsRecursive ciDrvs) // { shell = import ./shell.nix; } (recurseIntoAttrsRecursive ciDrvs) // {shell = import ./shell.nix;}

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": {

192
flake.nix
View File

@ -34,106 +34,102 @@
inputs.nixpkgs.follows = "nixos"; inputs.nixpkgs.follows = "nixos";
}; };
}; };
outputs = outputs = {
self,
digga,
nixos,
home,
nixos-hardware,
nixosPersistence,
nixpkgsWayland,
rnixLsp,
alejandra,
...
} @ inputs:
digga.lib.mkFlake
{ {
self, inherit self inputs;
digga, channelsConfig = {allowUnfree = true;};
nixos, channels = {
home,
nixos-hardware,
nixosPersistence,
nixpkgsWayland,
rnixLsp,
alejandra,
...
}
@ inputs:
digga.lib.mkFlake
{
inherit self inputs;
channelsConfig = { allowUnfree = true; };
channels = {
nixos = {
imports = [(digga.lib.importOverlays ./overlays)];
overlays = [
nixpkgsWayland.overlay
(
_: prev: {
#helix = helix.packages.${prev.system}.helix;
#helix-src = prev.helix.src;
#rnix-lsp = rnixLsp.packages.${prev.system}.rnix-lsp;
}
)
(
_: prev: {
alejandra = alejandra.defaultPackage.${prev.system};
remarshal =
prev.remarshal.overrideAttrs
(
old: {
postPatch =
''
substituteInPlace pyproject.toml \
--replace "poetry.masonry.api" "poetry.core.masonry.api" \
--replace 'PyYAML = "^5.3"' 'PyYAML = "*"' \
--replace 'tomlkit = "^0.7"' 'tomlkit = "*"'
'';
}
);
}
)
./pkgs/default.nix
];
};
};
lib = import ./lib { lib = digga.lib // nixos.lib; };
sharedOverlays = [
(
_: prev: {
__dontExport = true;
lib = prev.lib.extend (_: _: { our = self.lib; });
}
)
];
nixos = { nixos = {
hostDefaults = { imports = [(digga.lib.importOverlays ./overlays)];
system = "x86_64-linux"; overlays = [
channelName = "nixos"; nixpkgsWayland.overlay
imports = [(digga.lib.importExportableModules ./modules)]; (
modules = [ _: prev: {
{ lib.our = self.lib; } #helix = helix.packages.${prev.system}.helix;
digga.nixosModules.bootstrapIso #helix-src = prev.helix.src;
digga.nixosModules.nixConfig #rnix-lsp = rnixLsp.packages.${prev.system}.rnix-lsp;
home.nixosModules.home-manager }
nixosPersistence.nixosModules.impermanence )
]; (
}; _: prev: {
imports = [(digga.lib.importHosts ./hosts)]; alejandra = alejandra.defaultPackage.${prev.system};
hosts = {}; remarshal =
importables = rec { prev.remarshal.overrideAttrs
profiles = (
(digga.lib.rakeLeaves ./profiles) old: {
// { postPatch = ''
users = digga.lib.rakeLeaves ./users; substituteInPlace pyproject.toml \
nixos-hardware = nixos-hardware.nixosModules; --replace "poetry.masonry.api" "poetry.core.masonry.api" \
}; --replace 'PyYAML = "^5.3"' 'PyYAML = "*"' \
suites = --replace 'tomlkit = "^0.7"' 'tomlkit = "*"'
with profiles; { '';
base = [cachix core users.root]; }
work = [users.patriot develop]; );
}; }
}; )
./pkgs/default.nix
];
}; };
home = {
imports = [(digga.lib.importExportableModules ./users/modules)];
modules = [];
importables = rec {
profiles = digga.lib.rakeLeaves ./users/profiles;
suites = with profiles; rec { base = [direnv git starship]; };
};
};
devshell = ./shell;
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {};
}; };
lib = import ./lib {lib = digga.lib // nixos.lib;};
sharedOverlays = [
(
_: prev: {
__dontExport = true;
lib = prev.lib.extend (_: _: {our = self.lib;});
}
)
];
nixos = {
hostDefaults = {
system = "x86_64-linux";
channelName = "nixos";
imports = [(digga.lib.importExportableModules ./modules)];
modules = [
{lib.our = self.lib;}
digga.nixosModules.bootstrapIso
digga.nixosModules.nixConfig
home.nixosModules.home-manager
nixosPersistence.nixosModules.impermanence
];
};
imports = [(digga.lib.importHosts ./hosts)];
hosts = {};
importables = rec {
profiles =
(digga.lib.rakeLeaves ./profiles)
// {
users = digga.lib.rakeLeaves ./users;
nixos-hardware = nixos-hardware.nixosModules;
};
suites = with profiles; {
base = [cachix core users.root];
work = [users.patriot develop];
};
};
};
home = {
imports = [(digga.lib.importExportableModules ./users/modules)];
modules = [];
importables = rec {
profiles = digga.lib.rakeLeaves ./users/profiles;
suites = with profiles; rec {base = [direnv git starship];};
};
};
devshell = ./shell;
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {};
};
} }

View File

@ -1,12 +1,8 @@
{ {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;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; }; fileSystems."/" = {device = "/dev/disk/by-label/nixos";};
} }

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
@ -16,5 +12,5 @@
]; ];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
# will be overridden by the bootstrapIso instrumentation # will be overridden by the bootstrapIso instrumentation
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; }; fileSystems."/" = {device = "/dev/disk/by-label/nixos";};
} }

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 =
@ -76,7 +75,7 @@ in {
btrfs subvolume snapshot /mnt/root-blank /mnt/root btrfs subvolume snapshot /mnt/root-blank /mnt/root
umount /mnt umount /mnt
''; '';
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; }; kernel.sysctl = {"fs.inotify.max_user_watches" = 524288;};
}; };
security.pam.loginLimits = [ security.pam.loginLimits = [
{ {
@ -132,10 +131,9 @@ 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;
}; };
sound.enable = false; sound.enable = false;
@ -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,13 +183,19 @@ 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;
autoMount = true; autoMount = true;
}; };
flatpak.enable = false; flatpak.enable = false;
xserver = { videoDrivers = ["amdgpu"]; }; xserver = {videoDrivers = ["amdgpu"];};
postgresql = { postgresql = {
enable = false; enable = false;
enableTCPIP = true; enableTCPIP = true;
@ -203,7 +206,7 @@ in {
local all all trust local all all trust
host all all 0.0.0.0/0 md5 host all all 0.0.0.0/0 md5
''; '';
settings = { listen_addresses = "*"; }; settings = {listen_addresses = "*";};
initialScript = initialScript =
pkgs.writeText pkgs.writeText
"backend-initScript" "backend-initScript"
@ -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

@ -9,7 +9,7 @@ let
sha256 = "0zd3x46fswh5n6faq4x2kkpy6p3c6j593xbdlbsl40ppkclwc80x"; sha256 = "0zd3x46fswh5n6faq4x2kkpy6p3c6j593xbdlbsl40ppkclwc80x";
} }
) )
{ src = ../../.; } {src = ../../.;}
); );
in in
flake flake

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,8 +1,8 @@
{ lib }: {lib}:
lib.makeExtensible lib.makeExtensible
( (
self: { self: {
pkgBinNoDep = pkgs: name: "${pkgs.${name}}/bin/${name}"; pkgBinNoDep = pkgs: name: "${pkgs.${name}}/bin/${name}";
html = import ./html.nix { format = true; }; html = import ./html.nix {format = true;};
} }
) )

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
@ -10,24 +9,23 @@ let
evalAttrs = attrs: concatStrings (mapAttrsToList (name: value: " ${name}=\"${value}\"") attrs); evalAttrs = attrs: concatStrings (mapAttrsToList (name: value: " ${name}=\"${value}\"") attrs);
genAttrs = f: names: genAttrs = f: names:
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
// { // {
inherit tag; inherit tag;
link = url: tags.a { href = url; }; link = url: tags.a {href = url;};
} }

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,11 +1,7 @@
{ {config, ...}: {
config,
...
}:
{
home-manager.sharedModules = [ home-manager.sharedModules = [
{ {
home.sessionVariables = { inherit (config.environment.sessionVariables) NIX_PATH; }; home.sessionVariables = {inherit (config.environment.sessionVariables) NIX_PATH;};
xdg.configFile."nix/registry.json".text = config.environment.etc."nix/registry.json".text; xdg.configFile."nix/registry.json".text = config.environment.etc."nix/registry.json".text;
} }
]; ];

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,9 +6,8 @@
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 = {
security.mitigations.disable = security.mitigations.disable =
@ -16,13 +15,12 @@ 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. '';
'';
}; };
}; };
config = mkIf cfg.disable { boot.kernelParams = splitString " " cmdline; }; config = mkIf cfg.disable {boot.kernelParams = splitString " " cmdline;};
} }

View File

@ -1,19 +1,18 @@
_: 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" "--flag-switches-end"
"--flag-switches-end" "--ozone-platform=wayland"
"--ozone-platform=wayland" "--enable-webrtc-pipewire-capturer"
"--enable-webrtc-pipewire-capturer" "--ignore-gpu-blocklist"
"--ignore-gpu-blocklist" "--enable-gpu-rasterization"
"--enable-gpu-rasterization" "--enable-zero-copy"
"--enable-zero-copy" "--disable-gpu-driver-bug-workarounds"
"--disable-gpu-driver-bug-workarounds" "--force-dark-mode"
"--force-dark-mode" "--process-per-site"
"--process-per-site" ];
]; in
in prev.lib.concatStringsSep " " flags;
prev.lib.concatStringsSep " " flags; in {chromium = prev.chromium.override {commandLineArgs = cliArgs;};}
in { chromium = prev.chromium.override { commandLineArgs = cliArgs; }; }

View File

@ -2,211 +2,206 @@ 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"; binaryName = "DiscordCanary";
binaryName = "DiscordCanary"; desktopName = "Discord Canary";
desktopName = "Discord Canary"; src =
src = prev.fetchurl
prev.fetchurl {
{ 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 = "sha256-ZYPdE02Jq79LmvXu7KIJFugJX++Nnj0Og/mBuaP/+SA=";
sha256 = "sha256-ZYPdE02Jq79LmvXu7KIJFugJX++Nnj0Og/mBuaP/+SA="; };
}; isWayland = true;
isWayland = true; enableVulkan = false;
enableVulkan = false; extraOptions = [
extraOptions = [ "--ignore-gpu-blocklist"
"--ignore-gpu-blocklist" "--enable-gpu-rasterization"
"--enable-gpu-rasterization" "--enable-zero-copy"
"--enable-zero-copy" "--disable-gpu-driver-bug-workarounds"
"--disable-gpu-driver-bug-workarounds" ];
]; };
} mkDiscord = {
); pname,
mkDiscord = version,
{ src,
pname, binaryName,
version, desktopName,
src, isWayland ? false,
binaryName, enableVulkan ? false,
desktopName, extraOptions ? [],
isWayland ? false, autoPatchelfHook,
enableVulkan ? false, makeDesktopItem,
extraOptions ? [], lib,
autoPatchelfHook, stdenv,
makeDesktopItem, wrapGAppsHook,
lib, alsaLib,
stdenv, at-spi2-atk,
wrapGAppsHook, at-spi2-core,
alsaLib, atk,
at-spi2-atk, cairo,
at-spi2-core, cups,
atk, dbus,
cairo, electron,
cups, expat,
dbus, fontconfig,
electron, freetype,
expat, gdk-pixbuf,
fontconfig, glib,
freetype, gtk3,
gdk-pixbuf, libcxx,
glib, libdrm,
gtk3, libnotify,
libcxx, libpulseaudio,
libdrm, libuuid,
libnotify, libX11,
libpulseaudio, libXScrnSaver,
libuuid, libXcomposite,
libX11, libXcursor,
libXScrnSaver, libXdamage,
libXcomposite, libXext,
libXcursor, libXfixes,
libXdamage, libXi,
libXext, libXrandr,
libXfixes, libXrender,
libXi, libXtst,
libXrandr, libxcb,
libXrender, mesa,
libXtst, nspr,
libxcb, nss,
mesa, pango,
nspr, systemd,
nss, libappindicator-gtk3,
pango, libdbusmenu,
systemd, nodePackages,
libappindicator-gtk3, vulkan-loader,
libdbusmenu, vulkan-extension-layer,
nodePackages, libGL,
vulkan-loader, pipewire,
vulkan-extension-layer, }:
libGL, stdenv.mkDerivation
pipewire, rec {
}: inherit pname version src;
stdenv.mkDerivation nativeBuildInputs = [
rec { nodePackages.asar
inherit pname version src; alsaLib
nativeBuildInputs = [ autoPatchelfHook
nodePackages.asar cups
libdrm
libuuid
libXdamage
libX11
libXScrnSaver
libXtst
libxcb
mesa.drivers
nss
wrapGAppsHook
];
dontWrapGApps = true;
libPath =
lib.makeLibraryPath
[
libcxx
systemd
libpulseaudio
stdenv.cc.cc
alsaLib alsaLib
autoPatchelfHook atk
at-spi2-atk
at-spi2-core
cairo
cups cups
libdrm dbus
libuuid expat
libXdamage fontconfig
freetype
gdk-pixbuf
glib
gtk3
libnotify
libX11 libX11
libXScrnSaver libXcomposite
libuuid
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libXtst libXtst
libxcb nspr
mesa.drivers
nss nss
wrapGAppsHook libxcb
pango
systemd
libXScrnSaver
libappindicator-gtk3
libdbusmenu
vulkan-loader
vulkan-extension-layer
libGL
pipewire
]; ];
dontWrapGApps = true; flags =
libPath = (
lib.makeLibraryPath lib.optionals
isWayland
[ [
libcxx "--flag-switches-begin"
systemd "--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer${
libpulseaudio lib.optionalString enableVulkan ",Vulkan"
stdenv.cc.cc }"
alsaLib "--flag-switches-end"
atk "--ozone-platform=wayland"
at-spi2-atk "--enable-webrtc-pipewire-capturer"
at-spi2-core ]
cairo )
cups ++ extraOptions;
dbus installPhase = ''
expat mkdir -p $out/{bin,usr/lib/${pname},share/pixmaps}
fontconfig ln -s discord.png $out/share/pixmaps/${pname}.png
freetype ln -s "${desktopItem}/share/applications" $out/share/
gdk-pixbuf
glib
gtk3
libnotify
libX11
libXcomposite
libuuid
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libXtst
nspr
nss
libxcb
pango
systemd
libXScrnSaver
libappindicator-gtk3
libdbusmenu
vulkan-loader
vulkan-extension-layer
libGL
pipewire
];
flags =
(
lib.optionals
isWayland
[
"--flag-switches-begin"
"--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer${
lib.optionalString enableVulkan ",Vulkan"
}"
"--flag-switches-end"
"--ozone-platform=wayland"
"--enable-webrtc-pipewire-capturer"
]
)
++ extraOptions;
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/
# HACKS FOR SYSTEM ELECTRON # HACKS FOR SYSTEM ELECTRON
asar e resources/app.asar resources/app asar e resources/app.asar resources/app
rm resources/app.asar rm resources/app.asar
sed -i "s|process.resourcesPath|'$out/usr/lib/${pname}'|" resources/app/app_bootstrap/buildInfo.js sed -i "s|process.resourcesPath|'$out/usr/lib/${pname}'|" resources/app/app_bootstrap/buildInfo.js
sed -i "s|exeDir,|'$out/share/pixmaps',|" resources/app/app_bootstrap/autoStart/linux.js sed -i "s|exeDir,|'$out/share/pixmaps',|" resources/app/app_bootstrap/autoStart/linux.js
asar p resources/app resources/app.asar --unpack-dir '**' asar p resources/app resources/app.asar --unpack-dir '**'
rm -rf resources/app rm -rf resources/app
# Copy Relevanat data # Copy Relevanat data
cp -r resources/* $out/usr/lib/${pname}/ cp -r resources/* $out/usr/lib/${pname}/
# Create starter script for discord # Create starter script for discord
echo "#!${stdenv.shell}" > $out/bin/${pname} echo "#!${stdenv.shell}" > $out/bin/${pname}
echo "exec ${electron}/bin/electron ${lib.concatStringsSep " " flags} $out/usr/lib/${pname}/app.asar \$@" >> $out/bin/${pname} echo "exec ${electron}/bin/electron ${lib.concatStringsSep " " flags} $out/usr/lib/${pname}/app.asar \$@" >> $out/bin/${pname}
chmod 755 $out/bin/${pname} chmod 755 $out/bin/${pname}
wrapProgram $out/bin/${pname} \ wrapProgram $out/bin/${pname} \
"''${gappsWrapperArgs[@]}" \ "''${gappsWrapperArgs[@]}" \
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
--prefix LD_LIBRARY_PATH : ${libPath} --prefix LD_LIBRARY_PATH : ${libPath}
''; '';
desktopItem = desktopItem =
makeDesktopItem makeDesktopItem
{ {
name = pname; name = pname;
exec = pname; exec = pname;
icon = pname; icon = pname;
inherit desktopName; inherit desktopName;
genericName = meta.description; genericName = meta.description;
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"; platforms = ["x86_64-linux"];
platforms = ["x86_64-linux"];
};
}; };
};
} }

View File

@ -12,21 +12,20 @@ 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} patchelf --set-interpreter ${prev.stdenv.cc.bintools.dynamicLinker} \
patchelf --set-interpreter ${prev.stdenv.cc.bintools.dynamicLinker} \ $out/opt/${binaryName}/${binaryName}
$out/opt/${binaryName}/${binaryName} wrapProgram $out/opt/${binaryName}/${binaryName} \
wrapProgram $out/opt/${binaryName}/${binaryName} \ "''${gappsWrapperArgs[@]}" \
"''${gappsWrapperArgs[@]}" \ --prefix XDG_DATA_DIRS : "${prev.gtk3}/share/gsettings-schemas/${prev.gtk3.name}/" \
--prefix XDG_DATA_DIRS : "${prev.gtk3}/share/gsettings-schemas/${prev.gtk3.name}/" \ --prefix LD_LIBRARY_PATH : "${old.libPath}:${prev.electron_9}/lib/electron:${prev.libdrm}/lib:${prev.libGL_driver.out}/lib"
--prefix LD_LIBRARY_PATH : "${old.libPath}:${prev.electron_9}/lib/electron:${prev.libdrm}/lib:${prev.libGL_driver.out}/lib" ln -s $out/opt/${binaryName}/${binaryName} $out/bin/
ln -s $out/opt/${binaryName}/${binaryName} $out/bin/ ln -s $out/opt/${binaryName}/discord.png $out/share/pixmaps/${old.pname}.png
ln -s $out/opt/${binaryName}/discord.png $out/share/pixmaps/${old.pname}.png ln -s "${old.desktopItem}/share/applications" $out/share/
ln -s "${old.desktopItem}/share/applications" $out/share/ '';
'';
} }
); );
} }

View File

@ -1 +1 @@
final: prev: { manix = prev.manix.overrideAttrs (o: rec { inherit (prev.sources.manix) pname version src; }); } final: prev: {manix = prev.manix.overrideAttrs (o: rec {inherit (prev.sources.manix) pname version src;});}

View File

@ -12,15 +12,13 @@ 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
'' mv libphantomstyleplugin.so $out/$qtPluginPrefix/styles
mkdir -p $out/$qtPluginPrefix/styles '';
mv libphantomstyleplugin.so $out/$qtPluginPrefix/styles
'';
}; };
} }

View File

@ -2,6 +2,6 @@ final: prev: {
# Since: https://github.com/NixOS/nixpkgs/pull/126137 # Since: https://github.com/NixOS/nixpkgs/pull/126137
nix-direnv = nix-direnv =
if builtins.hasAttr "enableFlakes" prev.nix-direnv.override.__functionArgs if builtins.hasAttr "enableFlakes" prev.nix-direnv.override.__functionArgs
then prev.nix-direnv.override { enableFlakes = true; } then prev.nix-direnv.override {enableFlakes = true;}
else prev.nix-direnv; else prev.nix-direnv;
} }

View File

@ -1,52 +1,49 @@
_: 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" "--flag-switches-end"
"--flag-switches-end" "--ozone-platform=wayland"
"--ozone-platform=wayland" "--ignore-gpu-blocklist"
"--ignore-gpu-blocklist" "--enable-gpu-rasterization"
"--enable-gpu-rasterization" "--enable-zero-copy"
"--enable-zero-copy" "--disable-gpu-driver-bug-workarounds"
"--disable-gpu-driver-bug-workarounds" ];
]; in
in pkgs.writeScriptBin
pkgs.writeScriptBin "vscode-wayland"
"vscode-wayland" ''
'' #!${pkgs.stdenv.shell}
#!${pkgs.stdenv.shell} ${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 {
{ name = pname;
name = pname; exec = pname;
exec = pname; icon = "vscode";
icon = "vscode"; desktopName = "VSCode Wayland";
desktopName = "VSCode Wayland"; };
}; in
in lib.hiPrio
lib.hiPrio (
( pkgs.stdenv.mkDerivation
pkgs.stdenv.mkDerivation {
{ inherit pname;
inherit pname; version = pkgs.vscode.version;
version = pkgs.vscode.version; nativeBuildInputs = [pkgs.makeWrapper];
nativeBuildInputs = [pkgs.makeWrapper]; phases = ["installPhase"];
phases = ["installPhase"]; installPhase = ''
installPhase = mkdir -p $out/bin
'' install -m755 ${vscodeWayland}/bin/${pname}-wayland $out/bin/${pname}
mkdir -p $out/bin cp -r ${desktop}/share $out/share
install -m755 ${vscodeWayland}/bin/${pname}-wayland $out/bin/${pname} '';
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,174 +5,167 @@
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 direnv
direnv dnsutils
dnsutils dosfstools
dosfstools fd
fd git
git bottom
bottom gptfdisk
gptfdisk iputils
iputils jq
jq manix
manix moreutils
moreutils nix-index
nix-index nmap
nmap ripgrep
ripgrep skim
skim tealdeer
tealdeer usbutils
usbutils utillinux
utillinux whois
whois bat
bat fzf
fzf exa
exa git
git lm_sensors
lm_sensors mkpasswd
mkpasswd ntfs3g
ntfs3g zoxide
zoxide bottom
bottom amber
amber unzip
unzip unrar
unrar grit
grit hydra-check
hydra-check nix-index
nix-index du-dust
du-dust mosh
mosh (
( pkgs.runCommand
pkgs.runCommand "0x0.sh"
"0x0.sh" {}
{}
''
mkdir -p $out/bin
cp ${
pkgs.fetchurl
{
url = "https://raw.githubusercontent.com/Calinou/0x0/master/bin/0x0";
sha256 = "sha256-Fad+AKBuA49qtRQfnroqjaNWeuRaCekXZG9sS9JVeaM=";
}
} $out/bin/0x0
chmod +x $out/bin/0x0
''
)
];
shellAliases =
let
ifSudo = string: mkIf config.security.sudo.enable string;
in {
gtw = "${pkgBin "grit"} tree wnv";
gtwa = "${pkgBin "grit"} add -p wnv";
gt = pkgBin "grit";
g = pkgBin "git";
git-optimize = "${pkgBin "git"} gc --aggressive --prune=now";
cat = "${pkgBin "bat"} -pp --theme=base16";
c = "cat";
du = "${pkgs.du-dust}/bin/dust";
df = "${coreBin "df"} -h";
free = "${pkgs.procps}/bin/free -h";
ls = pkgBin "exa";
l = "${pkgBin "exa"} -lhg --git";
la = "${pkgBin "exa"} -lhg --git -a";
t = "${pkgBin "exa"} -lhg --git -T";
ta = "${pkgBin "exa"} -lhg --git -a -T";
n = nixBin;
nf = "${nixBin} flake";
nfc = "${nixBin} flake check";
nfu = "${nixBin} flake update";
nfui = "${nixBin} flake lock --update-input";
nfs = "${nixBin} flake show";
np = "${nixBin} profile";
nb = "${nixBin} build";
npl = "${nixBin} profile info";
npi = "${nixBin} profile install";
npr = "${nixBin} profile remove";
nsh = "${nixBin} shell";
nsr = "${nixBin} search";
nsrp = "${nixBin} search nixpkgs";
ndev = "${nixBin} develop";
nrun = "${nixBin} run";
nrefs = "nix-store -qR";
noscd = "cd /etc/nixos";
nosrs = ifSudo "sudo nixos-rebuild --fast switch";
nosrb = ifSudo "sudo nixos-rebuild --fast boot";
nosrt = ifSudo "sudo nixos-rebuild --fast test";
ngc = ifSudo "sudo nix-collect-garbage";
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
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
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
# sudo
s = ifSudo "sudo -E";
si = ifSudo "sudo -i";
se = ifSudo "sudoedit";
# systemd
ctl = "systemctl";
stl = ifSudo "s systemctl";
utl = "systemctl --user";
ut = "systemctl --user start";
un = "systemctl --user stop";
up = ifSudo "s systemctl start";
dn = ifSudo "s systemctl stop";
jtl = "journalctl";
};
};
system.activationScripts.diff =
''
${pkgs.nixUnstable}/bin/nix store \
--experimental-features 'nix-command' \
diff-closures /run/current-system "$systemConfig"
'';
nix =
let
registry =
builtins.removeAttrs
(builtins.mapAttrs (_: v: { flake = v; }) (lib.filterAttrs (_: v: v ? outputs) inputs))
["bud"];
in {
package = pkgs.nixUnstable;
gc.automatic = true;
optimise.automatic = true;
extraOptions =
'' ''
min-free = 536870912 mkdir -p $out/bin
keep-outputs = true cp ${
keep-derivations = true pkgs.fetchurl
fallback = true {
''; url = "https://raw.githubusercontent.com/Calinou/0x0/master/bin/0x0";
inherit registry; sha256 = "sha256-Fad+AKBuA49qtRQfnroqjaNWeuRaCekXZG9sS9JVeaM=";
settings = { }
sandbox = true; } $out/bin/0x0
allowed-users = ["@wheel"]; chmod +x $out/bin/0x0
trusted-users = ["root" "@wheel"]; ''
auto-optimise-store = true; )
}; ];
shellAliases = let
ifSudo = string: mkIf config.security.sudo.enable string;
in {
gtw = "${pkgBin "grit"} tree wnv";
gtwa = "${pkgBin "grit"} add -p wnv";
gt = pkgBin "grit";
g = pkgBin "git";
git-optimize = "${pkgBin "git"} gc --aggressive --prune=now";
cat = "${pkgBin "bat"} -pp --theme=base16";
c = "cat";
du = "${pkgs.du-dust}/bin/dust";
df = "${coreBin "df"} -h";
free = "${pkgs.procps}/bin/free -h";
ls = pkgBin "exa";
l = "${pkgBin "exa"} -lhg --git";
la = "${pkgBin "exa"} -lhg --git -a";
t = "${pkgBin "exa"} -lhg --git -T";
ta = "${pkgBin "exa"} -lhg --git -a -T";
n = nixBin;
nf = "${nixBin} flake";
nfc = "${nixBin} flake check";
nfu = "${nixBin} flake update";
nfui = "${nixBin} flake lock --update-input";
nfs = "${nixBin} flake show";
np = "${nixBin} profile";
nb = "${nixBin} build";
npl = "${nixBin} profile info";
npi = "${nixBin} profile install";
npr = "${nixBin} profile remove";
nsh = "${nixBin} shell";
nsr = "${nixBin} search";
nsrp = "${nixBin} search nixpkgs";
ndev = "${nixBin} develop";
nrun = "${nixBin} run";
nrefs = "nix-store -qR";
noscd = "cd /etc/nixos";
nosrs = ifSudo "sudo nixos-rebuild --fast switch";
nosrb = ifSudo "sudo nixos-rebuild --fast boot";
nosrt = ifSudo "sudo nixos-rebuild --fast test";
ngc = ifSudo "sudo nix-collect-garbage";
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
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
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
# sudo
s = ifSudo "sudo -E";
si = ifSudo "sudo -i";
se = ifSudo "sudoedit";
# systemd
ctl = "systemctl";
stl = ifSudo "s systemctl";
utl = "systemctl --user";
ut = "systemctl --user start";
un = "systemctl --user stop";
up = ifSudo "s systemctl start";
dn = ifSudo "s systemctl stop";
jtl = "journalctl";
}; };
};
system.activationScripts.diff = ''
${pkgs.nixUnstable}/bin/nix store \
--experimental-features 'nix-command' \
diff-closures /run/current-system "$systemConfig"
'';
nix = let
registry =
builtins.removeAttrs
(builtins.mapAttrs (_: v: {flake = v;}) (lib.filterAttrs (_: v: v ? outputs) inputs))
["bud"];
in {
package = pkgs.nixUnstable;
gc.automatic = true;
optimise.automatic = true;
extraOptions = ''
min-free = 536870912
keep-outputs = true
keep-derivations = true
fallback = true
'';
inherit registry;
settings = {
sandbox = true;
allowed-users = ["@wheel"];
trusted-users = ["root" "@wheel"];
auto-optimise-store = true;
};
};
programs.command-not-found.enable = false; programs.command-not-found.enable = false;
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
users.mutableUsers = false; users.mutableUsers = false;

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,9 +1,5 @@
{ {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 {
@ -11,5 +7,5 @@ in {
EDITOR = bin; EDITOR = bin;
VISUAL = bin; VISUAL = bin;
}; };
environment.shellAliases = { e = bin; }; environment.shellAliases = {e = bin;};
} }

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];
@ -10,5 +6,5 @@ in {
EDITOR = "${pkg}/bin/kak"; EDITOR = "${pkg}/bin/kak";
VISUAL = "${pkg}/bin/kak"; VISUAL = "${pkg}/bin/kak";
}; };
environment.shellAliases = { k = "${pkg}/bin/kak"; }; environment.shellAliases = {k = "${pkg}/bin/kak";};
} }

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,9 +2,8 @@
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,18 +1,17 @@
{ {
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 tls_auth_name: "${nextDnsId}.dns1.nextdns.io"
tls_auth_name: "${nextDnsId}.dns1.nextdns.io" - address_data: 2a07:a8c0::0
- address_data: 2a07:a8c0::0 tls_auth_name: "${nextDnsId}.dns1.nextdns.io"
tls_auth_name: "${nextDnsId}.dns1.nextdns.io" - address_data: 45.90.30.0
- address_data: 45.90.30.0 tls_auth_name: "${nextDnsId}.dns2.nextdns.io"
tls_auth_name: "${nextDnsId}.dns2.nextdns.io" - address_data: 2a07:a8c1::0
- address_data: 2a07:a8c1::0 tls_auth_name: "${nextDnsId}.dns2.nextdns.io"
tls_auth_name: "${nextDnsId}.dns2.nextdns.io" '';
'';
}; };
} }

Binary file not shown.

View File

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

View File

@ -2,17 +2,16 @@
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";
docs = pkgWithCategory "docs"; docs = pkgWithCategory "docs";
devos = pkgWithCategory "devos"; devos = pkgWithCategory "devos";
in { in {
_file = toString ./.; _file = toString ./.;
imports = ["${extraModulesPath}/git/hooks.nix"]; imports = ["${extraModulesPath}/git/hooks.nix"];
git = { inherit hooks; }; git = {inherit hooks;};
# tempfix: remove when merged https://github.com/numtide/devshell/pull/123 # tempfix: remove when merged https://github.com/numtide/devshell/pull/123
devshell.startup.load_profiles = devshell.startup.load_profiles =
pkgs.lib.mkForce pkgs.lib.mkForce
@ -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";

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{ {
programs.git = { programs.git = {
enable = true; enable = true;
extraConfig = { pull.rebase = true; }; extraConfig = {pull.rebase = true;};
lfs.enable = true; lfs.enable = true;
aliases = { aliases = {
a = "add -p"; a = "add -p";
@ -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,207 +3,204 @@
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 step = 120
step = 120 font = "${fontComb}"
font = "${fontComb}"
colorscheme { colorscheme {
background = 0x282C34 background = 0x282C34
foreground = 0x000000 foreground = 0x000000
selected = 0xF5E094 selected = 0xF5E094
grouped = 0xFDAF53 grouped = 0xFDAF53
first = 0xB8E673 first = 0xB8E673
conflict = 0xED6B32 conflict = 0xED6B32
insert = 0xE3C3FA insert = 0xE3C3FA
active = 0xFFFFFF active = 0xFFFFFF
inactive = 0x465457 inactive = 0x465457
}
} }
}
outputs { outputs {
"*" {
background = "${config.home.homeDirectory}/wallpaper.png"
}
}
inputs {
keyboards {
"*" { "*" {
background = "${config.home.homeDirectory}/wallpaper.png" xkb = {
} layout = "tr"
}
inputs {
keyboards {
"*" {
xkb = {
layout = "tr"
}
}
}
pointers {
"*" {
accel-profile = "flat"
} }
} }
} }
pointers {
layouts { "*" {
# main stack accel-profile = "flat"
s = {
scale = {
min = 0.5
max = 0.75
}
left = single
right = stack
}
# main queue
q = {
scale = 0.75
top = single
bottom = queue
}
f = full
h = stack
v = queue
g = grid
}
actions {
terminal = "${pkgs.alacritty}/bin/alacritty"
run = "${pkgs.wofi}/bin/wofi --show drun"
}
bindings {
keyboard {
"L+0" = workspace-switch-to-sheet-0
"L+1" = workspace-switch-to-sheet-1
"L+2" = workspace-switch-to-sheet-2
"L+3" = workspace-switch-to-sheet-3
"L+4" = workspace-switch-to-sheet-4
"L+5" = workspace-switch-to-sheet-5
"L+6" = workspace-switch-to-sheet-6
"L+7" = workspace-switch-to-sheet-7
"L+8" = workspace-switch-to-sheet-8
"L+9" = workspace-switch-to-sheet-9
"L+numbersign" = workspace-switch-to-sheet-alternate
"L+Period" = workspace-switch-to-sheet-current
"L+j" = workspace-switch-to-sheet-next
"L+k" = workspace-switch-to-sheet-prev
"L+Comma" = workspace-switch-to-sheet-next-inhabited
"LS+Comma" = workspace-switch-to-sheet-prev-inhabited
"LSC+g" = workspace-show-group
"LSC+i" = workspace-show-invisible
"LSC+Period" = workspace-show-all
"LC+n" = workspace-cycle-next
"LC+p" = workspace-cycle-prev
"LC+i" = sheet-show-invisible
"LC+Period" = sheet-show-all
"LC+g" = sheet-show-group
"LA+r" = layout-reset
"LA+Return" = layout-restack-append
"LAS+Return" = layout-restack-prepend
"L+Home" = layout-cycle-view-first
"L+End" = layout-cycle-view-last
"L+n" = layout-cycle-view-next
"L+p" = layout-cycle-view-prev
"L+x" = layout-exchange-view-next
"LS+x" = layout-exchange-view-prev
"LA+x" = layout-exchange-view-main
"LS+0" = view-pin-to-sheet-0
"LS+1" = view-pin-to-sheet-1
"LS+2" = view-pin-to-sheet-2
"LS+3" = view-pin-to-sheet-3
"LS+4" = view-pin-to-sheet-4
"LS+5" = view-pin-to-sheet-5
"LS+6" = view-pin-to-sheet-6
"LS+7" = view-pin-to-sheet-7
"LS+8" = view-pin-to-sheet-8
"LS+9" = view-pin-to-sheet-9
"LS+numbersign" = view-pin-to-sheet-alternate
"LS+Period" = view-pin-to-sheet-current
"LS+j" = view-pin-to-sheet-next
"LS+k" = view-pin-to-sheet-prev
"L+q" = view-quit
"L+Tab" = view-cycle-next
"LS+Tab" = view-cycle-prev
"L+Up" = view-move-up
"L+Down" = view-move-down
"L+Left" = view-move-left
"L+Right" = view-move-right
"LA+Up" = view-decrease-size-up
"LAS+Up" = view-increase-size-up
"LA+Down" = view-increase-size-down
"LAS+Down" = view-decrease-size-down
"LA+Left" = view-decrease-size-left
"LAS+Left" = view-increase-size-left
"LA+Right" = view-increase-size-right
"LAS+Right" = view-decrease-size-right
"LS+Up" = view-snap-up
"LS+Down" = view-snap-down
"LS+Left" = view-snap-left
"LS+Right" = view-snap-right
"L+r" = view-reset-geometry
"L+minus" = view-toggle-maximize-vertical
"L+less" = view-toggle-maximize-horizontal
"L+f" = view-toggle-maximize-full
"L5+plus" = view-toggle-floating
"L+i" = view-toggle-invisible
"L5+p" = view-toggle-public
"L+l" = mode-enter-layout
"L+s" = mode-enter-sheet-assign
"L+g" = mode-enter-group-assign
"L+m" = mode-enter-mark-assign
"L+acute" = mode-enter-mark-select
"LS+acute" = mode-enter-mark-switch-select
"LCA+g" = mode-enter-input-grab
"LS+Backspace" = lock
"LCA+q" = quit
"LCA+r" = reload
"L+Return" = action-terminal
"L+d" = action-run
"A+F1" = vt-switch-to-1
"A+F2" = vt-switch-to-2
"A+F3" = vt-switch-to-3
"A+F4" = vt-switch-to-4
"A+F5" = vt-switch-to-5
"A+F6" = vt-switch-to-6
"A+F7" = vt-switch-to-7
"A+F8" = vt-switch-to-8
"A+F9" = vt-switch-to-9
}
mouse {
"L+left" = mode-enter-move
"L+right" = mode-enter-resize
} }
} }
''; }
"hikari/autostart".source =
"${ layouts {
pkgs.writeScriptBin # main stack
"hikari-autostart" s = {
'' scale = {
#!${pkgs.stdenv.shell} min = 0.5
${pkgs.waybar}/bin/waybar & max = 0.75
'' }
}/bin/hikari-autostart"; left = single
right = stack
}
# main queue
q = {
scale = 0.75
top = single
bottom = queue
}
f = full
h = stack
v = queue
g = grid
}
actions {
terminal = "${pkgs.alacritty}/bin/alacritty"
run = "${pkgs.wofi}/bin/wofi --show drun"
}
bindings {
keyboard {
"L+0" = workspace-switch-to-sheet-0
"L+1" = workspace-switch-to-sheet-1
"L+2" = workspace-switch-to-sheet-2
"L+3" = workspace-switch-to-sheet-3
"L+4" = workspace-switch-to-sheet-4
"L+5" = workspace-switch-to-sheet-5
"L+6" = workspace-switch-to-sheet-6
"L+7" = workspace-switch-to-sheet-7
"L+8" = workspace-switch-to-sheet-8
"L+9" = workspace-switch-to-sheet-9
"L+numbersign" = workspace-switch-to-sheet-alternate
"L+Period" = workspace-switch-to-sheet-current
"L+j" = workspace-switch-to-sheet-next
"L+k" = workspace-switch-to-sheet-prev
"L+Comma" = workspace-switch-to-sheet-next-inhabited
"LS+Comma" = workspace-switch-to-sheet-prev-inhabited
"LSC+g" = workspace-show-group
"LSC+i" = workspace-show-invisible
"LSC+Period" = workspace-show-all
"LC+n" = workspace-cycle-next
"LC+p" = workspace-cycle-prev
"LC+i" = sheet-show-invisible
"LC+Period" = sheet-show-all
"LC+g" = sheet-show-group
"LA+r" = layout-reset
"LA+Return" = layout-restack-append
"LAS+Return" = layout-restack-prepend
"L+Home" = layout-cycle-view-first
"L+End" = layout-cycle-view-last
"L+n" = layout-cycle-view-next
"L+p" = layout-cycle-view-prev
"L+x" = layout-exchange-view-next
"LS+x" = layout-exchange-view-prev
"LA+x" = layout-exchange-view-main
"LS+0" = view-pin-to-sheet-0
"LS+1" = view-pin-to-sheet-1
"LS+2" = view-pin-to-sheet-2
"LS+3" = view-pin-to-sheet-3
"LS+4" = view-pin-to-sheet-4
"LS+5" = view-pin-to-sheet-5
"LS+6" = view-pin-to-sheet-6
"LS+7" = view-pin-to-sheet-7
"LS+8" = view-pin-to-sheet-8
"LS+9" = view-pin-to-sheet-9
"LS+numbersign" = view-pin-to-sheet-alternate
"LS+Period" = view-pin-to-sheet-current
"LS+j" = view-pin-to-sheet-next
"LS+k" = view-pin-to-sheet-prev
"L+q" = view-quit
"L+Tab" = view-cycle-next
"LS+Tab" = view-cycle-prev
"L+Up" = view-move-up
"L+Down" = view-move-down
"L+Left" = view-move-left
"L+Right" = view-move-right
"LA+Up" = view-decrease-size-up
"LAS+Up" = view-increase-size-up
"LA+Down" = view-increase-size-down
"LAS+Down" = view-decrease-size-down
"LA+Left" = view-decrease-size-left
"LAS+Left" = view-increase-size-left
"LA+Right" = view-increase-size-right
"LAS+Right" = view-decrease-size-right
"LS+Up" = view-snap-up
"LS+Down" = view-snap-down
"LS+Left" = view-snap-left
"LS+Right" = view-snap-right
"L+r" = view-reset-geometry
"L+minus" = view-toggle-maximize-vertical
"L+less" = view-toggle-maximize-horizontal
"L+f" = view-toggle-maximize-full
"L5+plus" = view-toggle-floating
"L+i" = view-toggle-invisible
"L5+p" = view-toggle-public
"L+l" = mode-enter-layout
"L+s" = mode-enter-sheet-assign
"L+g" = mode-enter-group-assign
"L+m" = mode-enter-mark-assign
"L+acute" = mode-enter-mark-select
"LS+acute" = mode-enter-mark-switch-select
"LCA+g" = mode-enter-input-grab
"LS+Backspace" = lock
"LCA+q" = quit
"LCA+r" = reload
"L+Return" = action-terminal
"L+d" = action-run
"A+F1" = vt-switch-to-1
"A+F2" = vt-switch-to-2
"A+F3" = vt-switch-to-3
"A+F4" = vt-switch-to-4
"A+F5" = vt-switch-to-5
"A+F6" = vt-switch-to-6
"A+F7" = vt-switch-to-7
"A+F8" = vt-switch-to-8
"A+F9" = vt-switch-to-9
}
mouse {
"L+left" = mode-enter-move
"L+right" = mode-enter-resize
}
}
'';
"hikari/autostart".source = "${
pkgs.writeScriptBin
"hikari-autostart"
''
#!${pkgs.stdenv.shell}
${pkgs.waybar}/bin/waybar &
''
}/bin/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/";
} }