mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
Compare commits
10 commits
57e19055c4
...
efdba54fc4
| Author | SHA1 | Date | |
|---|---|---|---|
| efdba54fc4 | |||
| eb9e567865 | |||
| fb1f6624f9 | |||
| 5fa1113757 | |||
| a9701f83b3 | |||
| 9e79cd2347 | |||
| fe52691061 | |||
| ebf8468807 | |||
| ec704b5272 | |||
| e218086537 |
129 changed files with 2412 additions and 1810 deletions
|
|
@ -5,4 +5,4 @@ vim.bo.shiftwidth = 2
|
||||||
vim.bo.expandtab = true
|
vim.bo.expandtab = true
|
||||||
|
|
||||||
-- useful for CPP extension
|
-- useful for CPP extension
|
||||||
vim.o.smartindent = true
|
vim.bo.smartindent = true
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ local servers = {
|
||||||
tinymist = {},
|
tinymist = {},
|
||||||
nil_ls = {
|
nil_ls = {
|
||||||
settings = {
|
settings = {
|
||||||
["nil"] = { formatting = { command = { "alejandra" } } },
|
["nil"] = { formatting = { command = { "nixfmt" } } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,6 @@ e91471432f7b7e3e5cb6cdb245819998d6653b5e
|
||||||
|
|
||||||
# Reformat with stylua
|
# Reformat with stylua
|
||||||
94ab5d51f10e609cee0159636c29cd404e3a6570
|
94ab5d51f10e609cee0159636c29cd404e3a6570
|
||||||
|
|
||||||
|
# Reformat with nixfmt
|
||||||
|
ebf84688079b537b3a34a7f5decdf30e165b7933
|
||||||
|
|
|
||||||
24
README.md
24
README.md
|
|
@ -53,6 +53,30 @@ The `(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")` allows this.
|
||||||
|
|
||||||
- profit
|
- profit
|
||||||
|
|
||||||
|
## Hetzner, nixos-anywhere
|
||||||
|
References:
|
||||||
|
- <https://github.com/nix-community/nixos-anywhere/blob/main/docs/quickstart.md>
|
||||||
|
- <https://wiki.nixos.org/wiki/Install_NixOS_on_Hetzner_Cloud>
|
||||||
|
|
||||||
|
I haven't figured out how to use raid on this machine, as it failed half-way
|
||||||
|
through the installer when I used the raid configuration.
|
||||||
|
|
||||||
|
### Pitfalls
|
||||||
|
- nixos-anywhere will wipe the disk, even if you use the flag `--generate-hardware-config`.
|
||||||
|
|
||||||
|
- The command is quite long and isn't non-flake friendly.
|
||||||
|
Note that the diskoScript has to come before toplevel derivation.
|
||||||
|
Read more on the order <https://github.com/nix-community/nixos-anywhere/issues/597>.
|
||||||
|
```fish
|
||||||
|
nixos-anywhere \
|
||||||
|
--generate-hardware-config nixos-generate-config ./hardware-configuration.nix \
|
||||||
|
-i <ssh_identity> \
|
||||||
|
--store-paths $(nix-build --no-out-link \
|
||||||
|
-A nixosConfigurations.hetzner_benchmark.config.system.build.diskoScript \
|
||||||
|
-A nixosConfigurations.hetzner_benchmark.config.system.build.toplevel) \
|
||||||
|
<user>@<host>
|
||||||
|
```
|
||||||
|
|
||||||
# Pitfalls
|
# Pitfalls
|
||||||
## `users.mutableUsers`
|
## `users.mutableUsers`
|
||||||
NEVER set this to true without declaratively setting the passwords.
|
NEVER set this to true without declaratively setting the passwords.
|
||||||
|
|
|
||||||
15
default.nix
15
default.nix
|
|
@ -1,9 +1,14 @@
|
||||||
{sources ? import ./npins}: {
|
{
|
||||||
|
sources ? import ./npins,
|
||||||
|
}:
|
||||||
|
{
|
||||||
# for repl sessions
|
# for repl sessions
|
||||||
inherit sources;
|
inherit sources;
|
||||||
lib = import (sources.nixpkgs + "/lib");
|
lib = import (sources.nixpkgs + "/lib");
|
||||||
|
|
||||||
nixosConfigurations = builtins.mapAttrs (_: import (sources.nixpkgs + "/nixos/lib/eval-config.nix")) {
|
nixosConfigurations =
|
||||||
|
builtins.mapAttrs (_: import (sources.nixpkgs + "/nixos/lib/eval-config.nix"))
|
||||||
|
{
|
||||||
vanadium = {
|
vanadium = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [ ./nix/configurations/vanadium.nix ];
|
modules = [ ./nix/configurations/vanadium.nix ];
|
||||||
|
|
@ -16,6 +21,12 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [ ./nix/configurations/installer.nix ];
|
modules = [ ./nix/configurations/installer.nix ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Not mine, rented on hetzner
|
||||||
|
hetzner_benchmark = {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [ ./nix/configurations/hetzner_benchmark.nix ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = import ./nix/packages { inherit sources; };
|
packages = import ./nix/packages { inherit sources; };
|
||||||
|
|
|
||||||
111
nix/configurations/hetzner_benchmark.nix
Normal file
111
nix/configurations/hetzner_benchmark.nix
Normal file
|
|
@ -0,0 +1,111 @@
|
||||||
|
# The hetzner machine rented to benchmark the cabal comment parser
|
||||||
|
let
|
||||||
|
sources = import ../../npins;
|
||||||
|
|
||||||
|
hostname = "hetzner_benchmark";
|
||||||
|
username = "leana";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib.modules) mkAliasOptionModule;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
#
|
||||||
|
# Shorthands
|
||||||
|
#
|
||||||
|
(mkAliasOptionModule [ "me" ] [ "users" "users" username ])
|
||||||
|
(mkAliasOptionModule [ "hm" ] [ "home-manager" "users" username ])
|
||||||
|
|
||||||
|
#
|
||||||
|
# hostname
|
||||||
|
#
|
||||||
|
{ _module.args = { inherit hostname; }; }
|
||||||
|
|
||||||
|
#
|
||||||
|
# nixpkgs
|
||||||
|
#
|
||||||
|
{
|
||||||
|
nixpkgs = {
|
||||||
|
overlays = map import [
|
||||||
|
../packages/overlay.nix
|
||||||
|
|
||||||
|
# use lix everywhere and wrap it with nom
|
||||||
|
../overlays/lix.nix
|
||||||
|
../overlays/nix-monitored.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Set NIX_PATH and flake registry at the same time
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/254405
|
||||||
|
flake.source = sources.nixpkgs;
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.package = pkgs.nix-monitored;
|
||||||
|
|
||||||
|
system.nixos.version = lib.substring 0 8 sources.nixpkgs.revision;
|
||||||
|
}
|
||||||
|
|
||||||
|
./hetzner_benchmark/nixos/hardware-configuration.nix
|
||||||
|
./hetzner_benchmark/nixos/misc.nix
|
||||||
|
|
||||||
|
../nixosModules/common/fish.nix
|
||||||
|
../nixosModules/common/disable-command-not-found.nix
|
||||||
|
../nixosModules/common/network.nix
|
||||||
|
../nixosModules/common/sudo-conf.nix
|
||||||
|
../nixosModules/common/system-nixconf.nix
|
||||||
|
|
||||||
|
../nixosModules/extra/leana.nix
|
||||||
|
|
||||||
|
#
|
||||||
|
# Extern modules
|
||||||
|
#
|
||||||
|
(sources.disko + "/module.nix")
|
||||||
|
../disko/hetzner_benchmark/ext4.nix
|
||||||
|
|
||||||
|
#
|
||||||
|
# home-manager
|
||||||
|
#
|
||||||
|
(sources.home-manager + "/nixos")
|
||||||
|
{
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
sharedModules = [ { home.stateVersion = lib.mkDefault config.system.stateVersion; } ];
|
||||||
|
};
|
||||||
|
|
||||||
|
hm.imports = [
|
||||||
|
#
|
||||||
|
# hostname
|
||||||
|
#
|
||||||
|
{ _module.args = { inherit hostname; }; }
|
||||||
|
|
||||||
|
#
|
||||||
|
# home modules
|
||||||
|
#
|
||||||
|
./hetzner_benchmark/home/programs.nix
|
||||||
|
./hetzner_benchmark/home/dev.nix
|
||||||
|
|
||||||
|
../homeModules/common/btop
|
||||||
|
../homeModules/common/fish
|
||||||
|
../homeModules/common/starship
|
||||||
|
../homeModules/common/fzf.nix
|
||||||
|
../homeModules/common/tmux
|
||||||
|
../homeModules/common/vim
|
||||||
|
../homeModules/common/direnv.nix
|
||||||
|
../homeModules/common/git.nix
|
||||||
|
../homeModules/common/gpg.nix
|
||||||
|
../homeModules/common/leana.nix
|
||||||
|
../homeModules/common/locale.nix
|
||||||
|
../homeModules/common/packages.nix
|
||||||
|
../homeModules/common/tealdeer.nix
|
||||||
|
|
||||||
|
../homeModules/extra/tmux-fish-integration.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
23
nix/configurations/hetzner_benchmark/home/dev.nix
Normal file
23
nix/configurations/hetzner_benchmark/home/dev.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
signing.signByDefault = false; # no need to setup the key
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.gpg.enable = true;
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
settings = {
|
||||||
|
extra-substituters = [
|
||||||
|
"https://ghc-nix.cachix.org"
|
||||||
|
"https://haskell-language-server.cachix.org"
|
||||||
|
"https://cache.iog.io"
|
||||||
|
];
|
||||||
|
extra-trusted-public-keys = [
|
||||||
|
"ghc-nix.cachix.org-1:ziC/I4BPqeA4VbtOFpFpu6D1t6ymFvRWke/lc2+qjcg="
|
||||||
|
"haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8="
|
||||||
|
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
54
nix/configurations/hetzner_benchmark/home/programs.nix
Normal file
54
nix/configurations/hetzner_benchmark/home/programs.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
# TODO: remove some packages for this machine
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.sessionVariables =
|
||||||
|
let
|
||||||
|
fishCfg = config.programs.fish;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package);
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
pkgs.stow
|
||||||
|
pkgs.zip
|
||||||
|
pkgs.unzip
|
||||||
|
pkgs.gnutar
|
||||||
|
pkgs.p7zip
|
||||||
|
pkgs.bc
|
||||||
|
pkgs.dig
|
||||||
|
pkgs.hutils
|
||||||
|
|
||||||
|
# pretty tui tools
|
||||||
|
pkgs.du-dust
|
||||||
|
pkgs.tokei
|
||||||
|
pkgs.hyperfine
|
||||||
|
pkgs.watchexec
|
||||||
|
pkgs.onefetch
|
||||||
|
pkgs.just
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
neovim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
};
|
||||||
|
lazygit.enable = true;
|
||||||
|
fish.enable = true;
|
||||||
|
starship.enable = true;
|
||||||
|
tmux.enable = true;
|
||||||
|
direnv.enable = true;
|
||||||
|
ripgrep.enable = true;
|
||||||
|
|
||||||
|
btop.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
gpg-agent.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp41s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
13
nix/configurations/hetzner_benchmark/nixos/misc.nix
Normal file
13
nix/configurations/hetzner_benchmark/nixos/misc.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
users.users = {
|
||||||
|
"root".openssh.authorizedKeys.keys = import ../../../identities.nix ++ [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFza3UN1gWQqh//FkJBzmssQ4lxHdllQGfqPHzG4LQI8 benchmark-machine"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "25.05";
|
||||||
|
}
|
||||||
|
|
@ -10,9 +10,11 @@ in
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (lib.modules) mkAliasOptionModule;
|
inherit (lib.modules) mkAliasOptionModule;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# The generator and hardware configuration
|
# The generator and hardware configuration
|
||||||
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
|
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
|
||||||
|
|
@ -120,7 +122,6 @@ in
|
||||||
# Extern modules
|
# Extern modules
|
||||||
#
|
#
|
||||||
(sources.agenix + "/modules/age-home.nix")
|
(sources.agenix + "/modules/age-home.nix")
|
||||||
(import sources.wired-notify).homeManagerModules.default
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.nil # nix
|
|
||||||
pkgs.pyright # python
|
pkgs.pyright # python
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,13 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
home.sessionVariables = let
|
{
|
||||||
|
home.sessionVariables =
|
||||||
|
let
|
||||||
fishCfg = config.programs.fish;
|
fishCfg = config.programs.fish;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
"SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package);
|
"SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -21,23 +24,15 @@
|
||||||
pkgs.dig
|
pkgs.dig
|
||||||
pkgs.hutils
|
pkgs.hutils
|
||||||
pkgs.miniserve
|
pkgs.miniserve
|
||||||
pkgs.agenix
|
|
||||||
pkgs.nix-which
|
pkgs.nix-which
|
||||||
|
|
||||||
# pretty tui tools
|
# # pretty tui tools
|
||||||
pkgs.du-dust
|
# pkgs.du-dust
|
||||||
pkgs.tokei
|
# pkgs.tokei
|
||||||
pkgs.hyperfine
|
# pkgs.hyperfine
|
||||||
pkgs.watchexec
|
# pkgs.watchexec
|
||||||
pkgs.onefetch
|
# pkgs.onefetch
|
||||||
pkgs.just
|
# pkgs.just
|
||||||
|
|
||||||
# nix tools
|
|
||||||
pkgs.alejandra
|
|
||||||
pkgs.nurl
|
|
||||||
pkgs.npins
|
|
||||||
pkgs.nix-tree
|
|
||||||
pkgs.nh
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
users.users.root.openssh.authorizedKeys.keys = import ../../../identities.nix;
|
users.users.root.openssh.authorizedKeys.keys = import ../../../identities.nix;
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
@ -22,13 +23,12 @@
|
||||||
userControlled.enable = true;
|
userControlled.enable = true;
|
||||||
secretsFile = config.age.secrets.wpa_password.path;
|
secretsFile = config.age.secrets.wpa_password.path;
|
||||||
scanOnLowSignal = false;
|
scanOnLowSignal = false;
|
||||||
networks = let
|
networks =
|
||||||
|
let
|
||||||
fromList = import ../../../networks/wpa_supplicant-compat.nix;
|
fromList = import ../../../networks/wpa_supplicant-compat.nix;
|
||||||
networks = import ../../../networks/list.nix;
|
networks = import ../../../networks/list.nix;
|
||||||
in
|
in
|
||||||
fromList (
|
fromList (builtins.filter (x: x.ssid == "~") networks);
|
||||||
builtins.filter (x: x.ssid == "~") networks
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,7 @@
|
||||||
# modprobe: FATAL: Module sun4i-drm not found in directory /nix/store/gvvwpdckzcr4iamp1iyrqw3nzb7bg6c4-linux-rpi-6.6.51-stable_20241008-modules/lib/modules/6.6.51
|
# modprobe: FATAL: Module sun4i-drm not found in directory /nix/store/gvvwpdckzcr4iamp1iyrqw3nzb7bg6c4-linux-rpi-6.6.51-stable_20241008-modules/lib/modules/6.6.51
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
makeModulesClosure = x:
|
makeModulesClosure = x: prev.makeModulesClosure (x // { allowMissing = true; });
|
||||||
prev.makeModulesClosure (x // {allowMissing = true;});
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.man-pages
|
pkgs.man-pages
|
||||||
pkgs.man-pages-posix
|
pkgs.man-pages-posix
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@
|
||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../nixosModules/common/system-nixconf.nix
|
../nixosModules/common/system-nixconf.nix
|
||||||
../nixosModules/common/sudo-conf.nix
|
../nixosModules/common/sudo-conf.nix
|
||||||
|
|
@ -20,8 +21,13 @@
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
extra-substituters = [ "https://leana8959.cachix.org" ];
|
extra-substituters = [ "https://leana8959.cachix.org" ];
|
||||||
extra-trusted-substituters = [ "https://leana8959.cachix.org" ];
|
extra-trusted-substituters = [ "https://leana8959.cachix.org" ];
|
||||||
extra-trusted-public-keys = ["leana8959.cachix.org-1:CxQSAp8lcgMv8Me459of0jdXRW2tcyeYRKTiiUq8z0M="];
|
extra-trusted-public-keys = [
|
||||||
experimental-features = ["nix-command" "flakes"];
|
"leana8959.cachix.org-1:CxQSAp8lcgMv8Me459of0jdXRW2tcyeYRKTiiUq8z0M="
|
||||||
|
];
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,11 @@ in
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (lib.modules) mkAliasOptionModule;
|
inherit (lib.modules) mkAliasOptionModule;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
#
|
#
|
||||||
# Shorthands
|
# Shorthands
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
home.packages = [
|
home.packages = [
|
||||||
# preview markdown
|
# preview markdown
|
||||||
pkgs.python3Packages.grip
|
pkgs.python3Packages.grip
|
||||||
|
|
@ -42,7 +43,8 @@
|
||||||
"haskell/cabal"
|
"haskell/cabal"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
includes = let
|
includes =
|
||||||
|
let
|
||||||
fromList = import ../../../git-identities/git-compat.nix;
|
fromList = import ../../../git-identities/git-compat.nix;
|
||||||
identities = import ../../../git-identities/list.nix;
|
identities = import ../../../git-identities/list.nix;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -2,25 +2,15 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs) nur;
|
inherit (pkgs) nur;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
policies = {
|
policies.SearchEngines.Add = [
|
||||||
SearchEngines = {
|
|
||||||
Default = "leta";
|
|
||||||
Remove = ["Google"];
|
|
||||||
Add = [
|
|
||||||
{
|
|
||||||
Name = "leta";
|
|
||||||
Alias = "@lt";
|
|
||||||
IconURL = "https://leta.mullvad.net/favicon.ico";
|
|
||||||
URLTemplate = "https://leta.mullvad.net/search?q={searchTerms}&engine=brave";
|
|
||||||
SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Forges
|
# Forges
|
||||||
{
|
{
|
||||||
Name = "GitHub";
|
Name = "GitHub";
|
||||||
|
|
@ -103,8 +93,6 @@ in {
|
||||||
URLTemplate = "https://genius.com/search?q={searchTerms}";
|
URLTemplate = "https://genius.com/search?q={searchTerms}";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
profiles = {
|
profiles = {
|
||||||
default = {
|
default = {
|
||||||
|
|
@ -120,9 +108,11 @@ in {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
extensions.packages = let
|
extensions.packages =
|
||||||
|
let
|
||||||
addons = nur.repos.rycee.firefox-addons;
|
addons = nur.repos.rycee.firefox-addons;
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
addons.sponsorblock
|
addons.sponsorblock
|
||||||
addons.return-youtube-dislikes
|
addons.return-youtube-dislikes
|
||||||
addons.consent-o-matic
|
addons.consent-o-matic
|
||||||
|
|
@ -131,15 +121,16 @@ in {
|
||||||
|
|
||||||
junk = {
|
junk = {
|
||||||
id = 1;
|
id = 1;
|
||||||
inherit
|
inherit (config.programs.firefox.profiles.default)
|
||||||
(config.programs.firefox.profiles.default)
|
|
||||||
settings
|
settings
|
||||||
userChrome
|
userChrome
|
||||||
;
|
;
|
||||||
|
|
||||||
extensions.packages = let
|
extensions.packages =
|
||||||
|
let
|
||||||
addons = nur.repos.rycee.firefox-addons;
|
addons = nur.repos.rycee.firefox-addons;
|
||||||
in [addons.multi-account-containers];
|
in
|
||||||
|
[ addons.multi-account-containers ];
|
||||||
|
|
||||||
containers = {
|
containers = {
|
||||||
raisin = {
|
raisin = {
|
||||||
|
|
@ -158,15 +149,16 @@ in {
|
||||||
# Isolate it because it's proprietary
|
# Isolate it because it's proprietary
|
||||||
tampermonkey = {
|
tampermonkey = {
|
||||||
id = 2;
|
id = 2;
|
||||||
inherit
|
inherit (config.programs.firefox.profiles.default)
|
||||||
(config.programs.firefox.profiles.default)
|
|
||||||
settings
|
settings
|
||||||
userChrome
|
userChrome
|
||||||
;
|
;
|
||||||
|
|
||||||
extensions.packages = let
|
extensions.packages =
|
||||||
|
let
|
||||||
addons = nur.repos.rycee.firefox-addons;
|
addons = nur.repos.rycee.firefox-addons;
|
||||||
in [addons.tampermonkey];
|
in
|
||||||
|
[ addons.tampermonkey ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,18 @@
|
||||||
lib,
|
lib,
|
||||||
nixosConfig ? { },
|
nixosConfig ? { },
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
#
|
#
|
||||||
# fonts
|
# fonts
|
||||||
#
|
#
|
||||||
fonts.fontconfig = {
|
fonts.fontconfig = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultFonts = lib.mapAttrsRecursive (_: v: v ++ [ "Last Resort" ]) {
|
defaultFonts = lib.mapAttrsRecursive (_: v: v ++ [ "Last Resort" ]) {
|
||||||
sansSerif = ["Ubuntu" "Noto Sans CJK TC"];
|
sansSerif = [
|
||||||
|
"Ubuntu"
|
||||||
|
"Noto Sans CJK TC"
|
||||||
|
];
|
||||||
serif = [ "Noto Serif CJK TC" ];
|
serif = [ "Noto Serif CJK TC" ];
|
||||||
monospace = [ "Iosevka" ];
|
monospace = [ "Iosevka" ];
|
||||||
emoji = [ "Noto Color Emoji" ];
|
emoji = [ "Noto Color Emoji" ];
|
||||||
|
|
@ -39,8 +43,7 @@
|
||||||
x11.enable = true;
|
x11.enable = true;
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
|
|
||||||
inherit
|
inherit (nixosConfig.services.xserver.displayManager.lightdm.greeters.gtk.cursorTheme)
|
||||||
(nixosConfig.services.xserver.displayManager.lightdm.greeters.gtk.cursorTheme)
|
|
||||||
name
|
name
|
||||||
package
|
package
|
||||||
size
|
size
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,17 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
home.sessionPath = [
|
home.sessionPath = [
|
||||||
"${config.home.homeDirectory}/.local/bin"
|
"${config.home.homeDirectory}/.local/bin"
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = let
|
home.sessionVariables =
|
||||||
|
let
|
||||||
fishCfg = config.programs.fish;
|
fishCfg = config.programs.fish;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
"SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package);
|
"SHELL" = lib.mkIf fishCfg.enable (lib.getExe fishCfg.package);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -37,9 +40,7 @@
|
||||||
# lol
|
# lol
|
||||||
pkgs.macchanger
|
pkgs.macchanger
|
||||||
|
|
||||||
/*
|
# The file picker is not ergonomic enough, sadly
|
||||||
The file picker is not ergonomic enough, sadly
|
|
||||||
*/
|
|
||||||
# pkgs.helix
|
# pkgs.helix
|
||||||
# pkgs.nushell
|
# pkgs.nushell
|
||||||
|
|
||||||
|
|
@ -69,7 +70,10 @@
|
||||||
pkgs.just
|
pkgs.just
|
||||||
|
|
||||||
# nix tools
|
# nix tools
|
||||||
pkgs.alejandra
|
# # Alejandra handles inline comments poorly
|
||||||
|
# # https://github.com/kamadorueda/alejandra/issues/429
|
||||||
|
# pkgs.alejandra
|
||||||
|
pkgs.nixfmt-rfc-style
|
||||||
pkgs.nurl
|
pkgs.nurl
|
||||||
pkgs.dix
|
pkgs.dix
|
||||||
pkgs.niv
|
pkgs.niv
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
home.packages = let
|
{
|
||||||
|
home.packages =
|
||||||
|
let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
ghc = pkgs.haskellPackages.ghc.withPackages (haskellPackages: [
|
ghc = pkgs.haskellPackages.ghc.withPackages (haskellPackages: [
|
||||||
|
|
@ -12,10 +14,16 @@
|
||||||
buildInputs = [ pkgs.makeWrapper ];
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/xmobar \
|
wrapProgram $out/bin/xmobar \
|
||||||
--prefix PATH : "${lib.makeBinPath [ghc pkgs.libnotify]}"
|
--prefix PATH : "${
|
||||||
|
lib.makeBinPath [
|
||||||
|
ghc
|
||||||
|
pkgs.libnotify
|
||||||
|
]
|
||||||
|
}"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
wrapped-xmobar
|
wrapped-xmobar
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
final: prev: let
|
final: prev:
|
||||||
|
let
|
||||||
inherit (final) lib;
|
inherit (final) lib;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
linuxPackages = final.linuxPackagesFor (
|
linuxPackages = final.linuxPackagesFor (
|
||||||
prev.linuxPackages.kernel.override {
|
prev.linuxPackages.kernel.override {
|
||||||
# TODO: The error message is quite unintuitive, maybe improve it?
|
# TODO: The error message is quite unintuitive, maybe improve it?
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,16 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
# For nautilius and iOS
|
# For nautilius and iOS
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
# iOS
|
# iOS
|
||||||
services.usbmuxd.enable = true;
|
services.usbmuxd.enable = true;
|
||||||
environment.systemPackages = with pkgs; [libimobiledevice idevicerestore];
|
environment.systemPackages = with pkgs; [
|
||||||
|
libimobiledevice
|
||||||
|
idevicerestore
|
||||||
|
];
|
||||||
|
|
||||||
# https://unix.stackexchange.com/questions/592775/how-can-i-enable-apple-ios-fast-charge-support
|
# https://unix.stackexchange.com/questions/592775/how-can-i-enable-apple-ios-fast-charge-support
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
|
|
@ -34,7 +38,8 @@
|
||||||
userControlled.enable = true;
|
userControlled.enable = true;
|
||||||
secretsFile = config.age.secrets.wpa_password.path;
|
secretsFile = config.age.secrets.wpa_password.path;
|
||||||
scanOnLowSignal = false;
|
scanOnLowSignal = false;
|
||||||
networks = let
|
networks =
|
||||||
|
let
|
||||||
fromList = import ../../../networks/wpa_supplicant-compat.nix;
|
fromList = import ../../../networks/wpa_supplicant-compat.nix;
|
||||||
networks = import ../../../networks/list.nix;
|
networks = import ../../../networks/list.nix;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
#
|
#
|
||||||
# builtin screen
|
# builtin screen
|
||||||
|
|
@ -33,13 +34,18 @@
|
||||||
"20_xmonad" = "${lib.getExe pkgs.haskellPackages.xmonad} --restart"; # make sure feh keeps up
|
"20_xmonad" = "${lib.getExe pkgs.haskellPackages.xmonad} --restart"; # make sure feh keeps up
|
||||||
};
|
};
|
||||||
|
|
||||||
profiles = let
|
profiles =
|
||||||
|
let
|
||||||
singleton = k: v: { ${k} = v; };
|
singleton = k: v: { ${k} = v; };
|
||||||
|
|
||||||
fingerprints = {
|
fingerprints = {
|
||||||
built-in = singleton "eDP-1" "00ffffffffffff0009e5ca0b000000002f200104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a0073";
|
built-in = singleton "eDP-1" "00ffffffffffff0009e5ca0b000000002f200104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a0073";
|
||||||
amethyst = device: singleton device "00ffffffffffff0006b35b27010101012c210103803c22782a29d5ad4f44a7240f5054bfef00714f81809500d1c0d1e8d1fc01010101565e00a0a0a029503020350055502100001a000000fd0030901edf3c000a202020202020000000fc005647323741514c33410a202020000000ff0052414c4d51533139373533370a0111020347f14a90030204014061603f1f230907078301000067030c002000384468d85dc401788003026d1a000002013090f00069096909e305ff01e6060701696900e2006ae20fc0eae70070a0a067500820980455502100001a6fc200a0a0a055503020350055502100001a5aa000a0a0a046503020350055502100001a0000bc";
|
amethyst =
|
||||||
orchid = device: singleton device "00ffffffffffff0004699a24642900002416010380341d782a2ac5a4564f9e280f5054b7ef00714f814081809500b300d1c081c08100023a801871382d40582c450009252100001e000000ff0043394c4d54463031303539360a000000fd00324b185311000a202020202020000000fc00415355532056533234370a20200173020322714f0102031112130414050e0f1d1e1f10230917078301000065030c0010008c0ad08a20e02d10103e9600092521000018011d007251d01e206e28550009252100001e011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000180000000000000000000000000000000000000000005d";
|
device:
|
||||||
|
singleton device "00ffffffffffff0006b35b27010101012c210103803c22782a29d5ad4f44a7240f5054bfef00714f81809500d1c0d1e8d1fc01010101565e00a0a0a029503020350055502100001a000000fd0030901edf3c000a202020202020000000fc005647323741514c33410a202020000000ff0052414c4d51533139373533370a0111020347f14a90030204014061603f1f230907078301000067030c002000384468d85dc401788003026d1a000002013090f00069096909e305ff01e6060701696900e2006ae20fc0eae70070a0a067500820980455502100001a6fc200a0a0a055503020350055502100001a5aa000a0a0a046503020350055502100001a0000bc";
|
||||||
|
orchid =
|
||||||
|
device:
|
||||||
|
singleton device "00ffffffffffff0004699a24642900002416010380341d782a2ac5a4564f9e280f5054b7ef00714f814081809500b300d1c081c08100023a801871382d40582c450009252100001e000000ff0043394c4d54463031303539360a000000fd00324b185311000a202020202020000000fc00415355532056533234370a20200173020322714f0102031112130414050e0f1d1e1f10230917078301000065030c0010008c0ad08a20e02d10103e9600092521000018011d007251d01e206e28550009252100001e011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000180000000000000000000000000000000000000000005d";
|
||||||
};
|
};
|
||||||
|
|
||||||
devices = rec {
|
devices = rec {
|
||||||
|
|
@ -50,14 +56,16 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
switches = {
|
switches = {
|
||||||
setDPI = {dpi}:
|
setDPI =
|
||||||
|
{ dpi }:
|
||||||
singleton "10_xrdb-dpi" "${lib.getExe pkgs.xorg.xrdb} -merge ${pkgs.writeText "xrdb-dpi-config" ''
|
singleton "10_xrdb-dpi" "${lib.getExe pkgs.xorg.xrdb} -merge ${pkgs.writeText "xrdb-dpi-config" ''
|
||||||
Xcursor.size: 64
|
Xcursor.size: 64
|
||||||
Xft.dpi: ${toString dpi}
|
Xft.dpi: ${toString dpi}
|
||||||
''}";
|
''}";
|
||||||
|
|
||||||
# Is scoped to an output device, no need to be called on built-in display
|
# Is scoped to an output device, no need to be called on built-in display
|
||||||
setSoftwareBrightness = {
|
setSoftwareBrightness =
|
||||||
|
{
|
||||||
device, # obtain with `xrandr`
|
device, # obtain with `xrandr`
|
||||||
brightness, # [0..1]
|
brightness, # [0..1]
|
||||||
}:
|
}:
|
||||||
|
|
@ -66,27 +74,35 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Is scoped to an output device, no need to be called on built-in display
|
# Is scoped to an output device, no need to be called on built-in display
|
||||||
setDDCBrightness = {
|
setDDCBrightness =
|
||||||
|
{
|
||||||
modelName, # obtain with `ddcutil detect`
|
modelName, # obtain with `ddcutil detect`
|
||||||
brightness, # [0..1]
|
brightness, # [0..1]
|
||||||
}:
|
}:
|
||||||
singleton "10_ddc_brightness" ''
|
singleton "10_ddc_brightness" ''
|
||||||
${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 10 ${toString (builtins.floor (brightness * 100))}
|
${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 10 ${
|
||||||
|
toString (builtins.floor (brightness * 100))
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setDDCContrast = {
|
setDDCContrast =
|
||||||
|
{
|
||||||
modelName, # obtain with `ddcutil detect`
|
modelName, # obtain with `ddcutil detect`
|
||||||
contrast, # [0..1]
|
contrast, # [0..1]
|
||||||
}:
|
}:
|
||||||
singleton "10_ddc_contrast" ''
|
singleton "10_ddc_contrast" ''
|
||||||
${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 12 ${toString (builtins.floor (contrast * 100))}
|
${lib.getExe pkgs.ddcutil} --model ${modelName} setvcp 12 ${
|
||||||
|
toString (builtins.floor (contrast * 100))
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Note: the "position" field corresponds to the "pos" field outputted by autorandr
|
# Note: the "position" field corresponds to the "pos" field outputted by autorandr
|
||||||
# To get the current config, run `xrandr --auto` and then `autorandr --config`
|
# To get the current config, run `xrandr --auto` and then `autorandr --config`
|
||||||
configs = {
|
configs = {
|
||||||
allOff = lib.genAttrs devices.all (_: {enable = lib.mkDefault false;});
|
allOff = lib.genAttrs devices.all (_: {
|
||||||
|
enable = lib.mkDefault false;
|
||||||
|
});
|
||||||
enableBuiltin = {
|
enableBuiltin = {
|
||||||
eDP-1 = {
|
eDP-1 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
services.btrfs.autoScrub = {
|
services.btrfs.autoScrub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
fileSystems = [
|
fileSystems = [
|
||||||
|
|
@ -53,7 +54,8 @@
|
||||||
sgbk /dev/disk/by-uuid/21b5207e-c3cf-49da-b944-fb405ae1eee2 ${config.age.secrets.sgbk_pwd.path} noauto
|
sgbk /dev/disk/by-uuid/21b5207e-c3cf-49da-b944-fb405ae1eee2 ${config.age.secrets.sgbk_pwd.path} noauto
|
||||||
'';
|
'';
|
||||||
|
|
||||||
systemd.mounts = let
|
systemd.mounts =
|
||||||
|
let
|
||||||
bindToCryptDev = dev: {
|
bindToCryptDev = dev: {
|
||||||
what = "/dev/mapper/${dev}";
|
what = "/dev/mapper/${dev}";
|
||||||
where = "/mnt/${dev}";
|
where = "/mnt/${dev}";
|
||||||
|
|
@ -63,7 +65,8 @@
|
||||||
PropagatesStopTo = [ "systemd-cryptsetup@${dev}.service" ];
|
PropagatesStopTo = [ "systemd-cryptsetup@${dev}.service" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
(bindToCryptDev "four")
|
(bindToCryptDev "four")
|
||||||
(bindToCryptDev "two")
|
(bindToCryptDev "two")
|
||||||
(bindToCryptDev "sgbk")
|
(bindToCryptDev "sgbk")
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
services.xserver.windowManager.xmonad = {
|
services.xserver.windowManager.xmonad = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableContribAndExtras = true;
|
enableContribAndExtras = true;
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,17 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt"];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"thunderbolt"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
# `timedatectl list-timezones`
|
# `timedatectl list-timezones`
|
||||||
time.timeZone = "Asia/Taipei";
|
time.timeZone = "Asia/Taipei";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
#
|
#
|
||||||
# Docker
|
# Docker
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
services.restic.backups = let
|
{
|
||||||
|
services.restic.backups =
|
||||||
|
let
|
||||||
pruneOpts = [
|
pruneOpts = [
|
||||||
"--keep-daily 7"
|
"--keep-daily 7"
|
||||||
"--keep-weekly 4"
|
"--keep-weekly 4"
|
||||||
"--keep-monthly 12"
|
"--keep-monthly 12"
|
||||||
"--keep-yearly 10"
|
"--keep-yearly 10"
|
||||||
];
|
];
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
"backblaze" = {
|
"backblaze" = {
|
||||||
paths = [
|
paths = [
|
||||||
"/home/leana/Documents"
|
"/home/leana/Documents"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
nixpkgs.config.allowUnfreePredicate = lib.mkDefault (
|
nixpkgs.config.allowUnfreePredicate = lib.mkDefault (
|
||||||
pkg: let
|
pkg:
|
||||||
|
let
|
||||||
name = lib.getName pkg;
|
name = lib.getName pkg;
|
||||||
in
|
in
|
||||||
builtins.elem name [
|
builtins.elem name [
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,8 @@ in
|
||||||
# TODO:
|
# TODO:
|
||||||
# pinned branch of https://github.com/astrand/xclip/tree/xerror
|
# pinned branch of https://github.com/astrand/xclip/tree/xerror
|
||||||
# use this until #43 gets resolved properly
|
# use this until #43 gets resolved properly
|
||||||
xclip.__output.src = _:
|
xclip.__output.src =
|
||||||
|
_:
|
||||||
final.fetchFromGitHub {
|
final.fetchFromGitHub {
|
||||||
owner = "astrand";
|
owner = "astrand";
|
||||||
repo = "xclip";
|
repo = "xclip";
|
||||||
|
|
@ -67,13 +68,14 @@ in
|
||||||
# Backport has failed in upstream currently <https://github.com/NixOS/nixpkgs/pull/457804>,
|
# Backport has failed in upstream currently <https://github.com/NixOS/nixpkgs/pull/457804>,
|
||||||
# might as well patch it while people are blogging about it <https://github.com/Xe/site/pull/1062>
|
# might as well patch it while people are blogging about it <https://github.com/Xe/site/pull/1062>
|
||||||
# Upstream talks about it here https://lists.x.org/archives/xorg-announce/2025-October/003635.html
|
# Upstream talks about it here https://lists.x.org/archives/xorg-announce/2025-October/003635.html
|
||||||
xorg.xorgserver.__output.version = oldVersion: let
|
xorg.xorgserver.__output.version =
|
||||||
|
oldVersion:
|
||||||
|
let
|
||||||
version = "21.1.20";
|
version = "21.1.20";
|
||||||
in
|
in
|
||||||
if oldVersion == version
|
if oldVersion == version then throw "This patch has been merged upstream" else version;
|
||||||
then throw "This patch has been merged upstream"
|
xorg.xorgserver.__output.src =
|
||||||
else version;
|
_:
|
||||||
xorg.xorgserver.__output.src = _:
|
|
||||||
final.fetchurl {
|
final.fetchurl {
|
||||||
url = "mirror://xorg/individual/xserver/xorg-server-21.1.20.tar.xz";
|
url = "mirror://xorg/individual/xserver/xorg-server-21.1.20.tar.xz";
|
||||||
sha256 = "sha256-dpW8YYJLOoG2utL3iwVADKAVAD3kAtGzIhFxBbcC6Tc=";
|
sha256 = "sha256-dpW8YYJLOoG2utL3iwVADKAVAD3kAtGzIhFxBbcC6Tc=";
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,11 @@
|
||||||
let
|
let
|
||||||
sources = import ../../npins;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
{pkgs ? import sources.pin-florashell {}}:
|
{
|
||||||
pkgs.mkShell (let
|
pkgs ? import sources.pin-florashell { },
|
||||||
|
}:
|
||||||
|
pkgs.mkShell (
|
||||||
|
let
|
||||||
libs = with pkgs; [
|
libs = with pkgs; [
|
||||||
zlib
|
zlib
|
||||||
libpq
|
libpq
|
||||||
|
|
@ -14,16 +17,21 @@ in
|
||||||
|
|
||||||
hlib = pkgs.haskell.lib;
|
hlib = pkgs.haskell.lib;
|
||||||
|
|
||||||
callHackage = {
|
callHackage =
|
||||||
|
{
|
||||||
name,
|
name,
|
||||||
version,
|
version,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
pkg = pkgs.haskell.packages.ghc910.callHackage name version { };
|
pkg = pkgs.haskell.packages.ghc910.callHackage name version { };
|
||||||
in
|
in
|
||||||
hlib.dontCheck (hlib.doJailbreak pkg);
|
hlib.dontCheck (hlib.doJailbreak pkg);
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
name = "flora";
|
name = "flora";
|
||||||
packages = with pkgs; let
|
packages =
|
||||||
|
with pkgs;
|
||||||
|
let
|
||||||
haskellPackages = haskell.packages.ghc910;
|
haskellPackages = haskell.packages.ghc910;
|
||||||
in
|
in
|
||||||
# These don't build directly and need to be pinned
|
# These don't build directly and need to be pinned
|
||||||
|
|
@ -56,4 +64,5 @@ in
|
||||||
++ libs;
|
++ libs;
|
||||||
|
|
||||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs;
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs;
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
{pkgs ? import <nixpkgs> {}}: let
|
{
|
||||||
|
pkgs ? import <nixpkgs> { },
|
||||||
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
|
|
@ -14,7 +17,10 @@ in
|
||||||
nodePackages.npm
|
nodePackages.npm
|
||||||
];
|
];
|
||||||
|
|
||||||
LD_LIBRARY_PATH = lib.makeLibraryPath (with pkgs; [
|
LD_LIBRARY_PATH = lib.makeLibraryPath (
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
libuuid
|
libuuid
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{pkgs ? import <nixpkgs> {}}:
|
{
|
||||||
|
pkgs ? import <nixpkgs> { },
|
||||||
|
}:
|
||||||
pkgs.mkShell rec {
|
pkgs.mkShell rec {
|
||||||
name = "haddock2";
|
name = "haddock2";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,11 @@
|
||||||
let
|
let
|
||||||
sources = import ../../npins;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
{pkgs ? import sources.pin-masna3shell {}}:
|
{
|
||||||
pkgs.mkShell (let
|
pkgs ? import sources.pin-masna3shell { },
|
||||||
|
}:
|
||||||
|
pkgs.mkShell (
|
||||||
|
let
|
||||||
libs = with pkgs; [
|
libs = with pkgs; [
|
||||||
zlib
|
zlib
|
||||||
libpq
|
libpq
|
||||||
|
|
@ -11,20 +14,22 @@ in
|
||||||
|
|
||||||
hlib = pkgs.haskell.lib;
|
hlib = pkgs.haskell.lib;
|
||||||
|
|
||||||
callHackage = {
|
callHackage =
|
||||||
|
{
|
||||||
name,
|
name,
|
||||||
version,
|
version,
|
||||||
haskellPackages ? pkgs.haskellPackages,
|
haskellPackages ? pkgs.haskellPackages,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
pkg = haskellPackages.callHackage name version { };
|
pkg = haskellPackages.callHackage name version { };
|
||||||
in
|
in
|
||||||
hlib.dontCheck (hlib.doJailbreak pkg);
|
hlib.dontCheck (hlib.doJailbreak pkg);
|
||||||
|
|
||||||
haskellPackages = pkgs.haskell.packages.ghc910;
|
haskellPackages = pkgs.haskell.packages.ghc910;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
name = "masna3";
|
name = "masna3";
|
||||||
packages =
|
packages = [
|
||||||
[
|
|
||||||
pkgs.haskell.packages.ghc9102.ghc
|
pkgs.haskell.packages.ghc9102.ghc
|
||||||
pkgs.haskell.packages.ghc9102.haskell-language-server
|
pkgs.haskell.packages.ghc9102.haskell-language-server
|
||||||
|
|
||||||
|
|
@ -50,4 +55,5 @@ in
|
||||||
++ libs;
|
++ libs;
|
||||||
|
|
||||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs;
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs;
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
let
|
let
|
||||||
sources = import ../../npins;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
{pkgs ? import sources.pin-necro-man-nixpkgs {}}: let
|
{
|
||||||
shell = {
|
pkgs ? import sources.pin-necro-man-nixpkgs { },
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
shell =
|
||||||
|
{
|
||||||
mkShell,
|
mkShell,
|
||||||
#
|
#
|
||||||
pkgs,
|
pkgs,
|
||||||
|
|
@ -16,8 +20,7 @@ in
|
||||||
python310Packages.pygments
|
python310Packages.pygments
|
||||||
|
|
||||||
(texlive.combine {
|
(texlive.combine {
|
||||||
inherit
|
inherit (texlive)
|
||||||
(texlive)
|
|
||||||
scheme-medium
|
scheme-medium
|
||||||
#
|
#
|
||||||
wrapfig
|
wrapfig
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
let
|
let
|
||||||
sources = import ../../npins;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
{pkgs ? import sources.pin-vim-tw {}}:
|
{
|
||||||
|
pkgs ? import sources.pin-vim-tw { },
|
||||||
|
}:
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
name = "vim-tw";
|
name = "vim-tw";
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
|
||||||
37
nix/disko/hetzner_benchmark/ext4.nix
Normal file
37
nix/disko/hetzner_benchmark/ext4.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
main = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme1n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02";
|
||||||
|
priority = 1;
|
||||||
|
};
|
||||||
|
ESP = {
|
||||||
|
size = "512M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
93
nix/disko/hetzner_benchmark/raid.nix
Normal file
93
nix/disko/hetzner_benchmark/raid.nix
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
# I can't get this working for now :(
|
||||||
|
# Only nvme1n1 is detected in the installer environment
|
||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
one = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme0n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
BOOT = {
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02"; # for grub MBR
|
||||||
|
};
|
||||||
|
ESP = {
|
||||||
|
size = "500M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "mdraid";
|
||||||
|
name = "boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mdadm = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "mdraid";
|
||||||
|
name = "raid1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
two = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme1n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
boot = {
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02"; # for grub MBR
|
||||||
|
};
|
||||||
|
ESP = {
|
||||||
|
size = "500M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "mdraid";
|
||||||
|
name = "boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mdadm = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "mdraid";
|
||||||
|
name = "raid1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mdadm = {
|
||||||
|
boot = {
|
||||||
|
type = "mdadm";
|
||||||
|
level = 1;
|
||||||
|
metadata = "1.0";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
raid1 = {
|
||||||
|
type = "mdadm";
|
||||||
|
level = 1;
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions.primary = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "ext4";
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -79,7 +79,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
"/nix" = {
|
"/nix" = {
|
||||||
mountOptions = ["compress=zstd" "noatime"];
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
"/nix" = {
|
"/nix" = {
|
||||||
mountOptions = ["compress=zstd" "noatime"];
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,18 @@
|
||||||
let
|
let
|
||||||
hasconfigRemoteCondition = {
|
hasconfigRemoteCondition =
|
||||||
|
{
|
||||||
# Custom arguments
|
# Custom arguments
|
||||||
url,
|
url,
|
||||||
path ? "*/**",
|
path ? "*/**",
|
||||||
...
|
...
|
||||||
} @ cfg: let
|
}@cfg:
|
||||||
cfg' = builtins.removeAttrs cfg ["url" "path"];
|
let
|
||||||
in [
|
cfg' = builtins.removeAttrs cfg [
|
||||||
|
"url"
|
||||||
|
"path"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
[
|
||||||
(cfg' // { condition = "hasconfig:remote.*.url:git@${url}:${path}"; })
|
(cfg' // { condition = "hasconfig:remote.*.url:git@${url}:${path}"; })
|
||||||
(cfg' // { condition = "hasconfig:remote.*.url:https://${url}/${path}"; })
|
(cfg' // { condition = "hasconfig:remote.*.url:https://${url}/${path}"; })
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ let
|
||||||
blameIgnore = {
|
blameIgnore = {
|
||||||
blame.ignoreRevsFile = ".git-blame-ignore-revs";
|
blame.ignoreRevsFile = ".git-blame-ignore-revs";
|
||||||
};
|
};
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
# Univ stuff
|
# Univ stuff
|
||||||
{
|
{
|
||||||
url = "gitlab.istic.univ-rennes1.fr";
|
url = "gitlab.istic.univ-rennes1.fr";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
programs.btop = {
|
programs.btop = {
|
||||||
settings.color_theme = "${config.programs.btop.package}/share/btop/themes/onedark.theme";
|
settings.color_theme = "${config.programs.btop.package}/share/btop/themes/onedark.theme";
|
||||||
extraConfig = builtins.readFile ./btop.conf;
|
extraConfig = builtins.readFile ./btop.conf;
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
programs.cmus.extraConfig = let
|
{
|
||||||
|
programs.cmus.extraConfig =
|
||||||
|
let
|
||||||
# dispatch to multiple callbacks
|
# dispatch to multiple callbacks
|
||||||
callback-script = pkgs.writeShellApplication {
|
callback-script = pkgs.writeShellApplication {
|
||||||
name = "cmus-callback-script";
|
name = "cmus-callback-script";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{config, ...}: {
|
{ config, ... }:
|
||||||
|
{
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
config = {
|
config = {
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,11 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.i18n.inputMethod;
|
cfg = config.i18n.inputMethod;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
i18n.inputMethod = {
|
i18n.inputMethod = {
|
||||||
fcitx5.addons = [
|
fcitx5.addons = [
|
||||||
pkgs.fcitx5-chinese-addons
|
pkgs.fcitx5-chinese-addons
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,13 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (pkgs) nur;
|
inherit (pkgs) nur;
|
||||||
|
|
||||||
cfg = config.programs.firefox;
|
cfg = config.programs.firefox;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
# https://mozilla.github.io/policy-templates
|
# https://mozilla.github.io/policy-templates
|
||||||
# The following have more complex logic, keep them as policies and not profiles
|
# The following have more complex logic, keep them as policies and not profiles
|
||||||
|
|
@ -19,7 +21,31 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
SearchEngines = {
|
SearchEngines = {
|
||||||
Remove = ["Bing" "DuckDuckGo" "Qwant" "eBay" "Perplexity"];
|
Remove = [
|
||||||
|
"Google"
|
||||||
|
"Bing"
|
||||||
|
"DuckDuckGo"
|
||||||
|
"Qwant"
|
||||||
|
"eBay"
|
||||||
|
"Perplexity"
|
||||||
|
];
|
||||||
|
Default = "leta";
|
||||||
|
Add = [
|
||||||
|
{
|
||||||
|
Name = "leta";
|
||||||
|
Alias = "@lt";
|
||||||
|
IconURL = "https://leta.mullvad.net/favicon.ico";
|
||||||
|
URLTemplate = "https://leta.mullvad.net/search?q={searchTerms}&engine=brave";
|
||||||
|
SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Name = "leta";
|
||||||
|
Alias = "@ltfr";
|
||||||
|
IconURL = "https://leta.mullvad.net/favicon.ico";
|
||||||
|
URLTemplate = "https://leta.mullvad.net/search?q={searchTerms}&engine=brave&language=fr";
|
||||||
|
SuggestURLTemplate = "https://suggestqueries.google.com/complete/search?q={searchTerms}";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
NoDefaultBookmarks = true;
|
NoDefaultBookmarks = true;
|
||||||
DisplayMenuBar = "never";
|
DisplayMenuBar = "never";
|
||||||
|
|
@ -85,9 +111,11 @@ in {
|
||||||
"media.peerconnection.enabled" = false;
|
"media.peerconnection.enabled" = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
extensions.packages = let
|
extensions.packages =
|
||||||
|
let
|
||||||
addons = nur.repos.rycee.firefox-addons;
|
addons = nur.repos.rycee.firefox-addons;
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
addons.ublock-origin
|
addons.ublock-origin
|
||||||
addons.privacy-badger
|
addons.privacy-badger
|
||||||
addons.user-agent-string-switcher
|
addons.user-agent-string-switcher
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
shellAbbrs = lib.mkMerge [
|
shellAbbrs = lib.mkMerge [
|
||||||
(lib.mkIf pkgs.stdenv.isLinux {
|
(lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./aliasesAbbrs.nix
|
./aliasesAbbrs.nix
|
||||||
];
|
];
|
||||||
|
|
@ -24,11 +25,9 @@
|
||||||
#
|
#
|
||||||
# Scripts and functions
|
# Scripts and functions
|
||||||
#
|
#
|
||||||
xdg.configFile =
|
xdg.configFile = lib.mapAttrs' (
|
||||||
lib.mapAttrs'
|
path: _: lib.nameValuePair "fish/functions/${path}" { source = "${./functions}/${path}"; }
|
||||||
(path: _:
|
) (builtins.readDir ./functions);
|
||||||
lib.nameValuePair "fish/functions/${path}" {source = "${./functions}/${path}";})
|
|
||||||
(builtins.readDir ./functions);
|
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
interactiveShellInit = builtins.readFile ./shellInit.fish;
|
interactiveShellInit = builtins.readFile ./shellInit.fish;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
# git plugins
|
# git plugins
|
||||||
programs.git = {
|
programs.git = {
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
|
|
@ -11,8 +12,7 @@
|
||||||
# known to fail on aarch64-linux
|
# known to fail on aarch64-linux
|
||||||
(lib.mkIf (pkgs.system == "aarch64-linux") (
|
(lib.mkIf (pkgs.system == "aarch64-linux") (
|
||||||
# TODO: investigate this
|
# TODO: investigate this
|
||||||
lib.warn "patdiff has been forcibly disabled because it has previously failed to build"
|
lib.warn "patdiff has been forcibly disabled because it has previously failed to build" lib.mkForce
|
||||||
lib.mkForce
|
|
||||||
false
|
false
|
||||||
))
|
))
|
||||||
(lib.mkDefault true)
|
(lib.mkDefault true)
|
||||||
|
|
@ -20,7 +20,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# 懶惰鬼賴皮
|
# 懶惰鬼賴皮
|
||||||
programs.lazygit = let
|
programs.lazygit =
|
||||||
|
let
|
||||||
patdiffCfg = config.programs.git.patdiff;
|
patdiffCfg = config.programs.git.patdiff;
|
||||||
in
|
in
|
||||||
lib.mkIf patdiffCfg.enable {
|
lib.mkIf patdiffCfg.enable {
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,26 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
services = {
|
services = {
|
||||||
gpg-agent.defaultCacheTtl = 1209600;
|
gpg-agent.defaultCacheTtl = 1209600;
|
||||||
gpg-agent.pinentry.package = pkgs.pinentry-tty;
|
gpg-agent.pinentry.package = pkgs.pinentry-tty;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.gpg.publicKeys = let
|
programs.gpg.publicKeys =
|
||||||
fromUrl = {
|
let
|
||||||
|
fromUrl =
|
||||||
|
{
|
||||||
url,
|
url,
|
||||||
hash,
|
hash,
|
||||||
trust ? 5,
|
trust ? 5,
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
source = pkgs.fetchurl { inherit url hash; };
|
source = pkgs.fetchurl { inherit url hash; };
|
||||||
inherit trust;
|
inherit trust;
|
||||||
};
|
};
|
||||||
|
|
||||||
github = {user, ...} @ args:
|
github =
|
||||||
fromUrl (
|
{ user, ... }@args:
|
||||||
builtins.removeAttrs args ["user"]
|
fromUrl (builtins.removeAttrs args [ "user" ] // { url = "https://github.com/${user}.gpg"; });
|
||||||
// {url = "https://github.com/${user}.gpg";}
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
map github [
|
map github [
|
||||||
# Do not depend on my own forgejo instance / self-host server to avoid a single point of failure
|
# Do not depend on my own forgejo instance / self-host server to avoid a single point of failure
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,11 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.programs.kitty;
|
cfg = config.programs.kitty;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.nerd-fonts.iosevka
|
pkgs.nerd-fonts.iosevka
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.programs.lazygit;
|
cfg = config.programs.lazygit;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.tmux.extraConfig = lib.mkIf cfg.enable ''
|
programs.tmux.extraConfig = lib.mkIf cfg.enable ''
|
||||||
bind g run-shell "tmux new-window ${lib.getExe cfg.package}"
|
bind g run-shell "tmux new-window ${lib.getExe cfg.package}"
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,12 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
home = {
|
home = {
|
||||||
username = lib.mkDefault "leana";
|
username = lib.mkDefault "leana";
|
||||||
homeDirectory = let
|
homeDirectory =
|
||||||
|
let
|
||||||
inherit (config.home) username;
|
inherit (config.home) username;
|
||||||
in
|
in
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
nixosConfig ? null,
|
nixosConfig ? null,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
home.language = {
|
home.language = {
|
||||||
base = lib.mkDefault nixosConfig.i18n.defaultLocale or "en_US.UTF-8";
|
base = lib.mkDefault nixosConfig.i18n.defaultLocale or "en_US.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,13 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs = {
|
programs = {
|
||||||
vim.enable = true;
|
vim.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages =
|
home.packages = [
|
||||||
[
|
|
||||||
pkgs.file
|
pkgs.file
|
||||||
pkgs.gnused
|
pkgs.gnused
|
||||||
pkgs.tree
|
pkgs.tree
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,11 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.programs.password-store;
|
cfg = config.programs.password-store;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
home.packages = lib.mkIf cfg.enable [
|
home.packages = lib.mkIf cfg.enable [
|
||||||
pkgs.pwgen
|
pkgs.pwgen
|
||||||
pkgs.diceware
|
pkgs.diceware
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs.sioyek = {
|
programs.sioyek = {
|
||||||
bindings = {
|
bindings = {
|
||||||
"move_up" = "k";
|
"move_up" = "k";
|
||||||
|
|
@ -18,7 +19,10 @@
|
||||||
"<C-u>"
|
"<C-u>"
|
||||||
];
|
];
|
||||||
"toggle_two_page_mode" = [ "T" ];
|
"toggle_two_page_mode" = [ "T" ];
|
||||||
"goto_mark" = ["`" "'"];
|
"goto_mark" = [
|
||||||
|
"`"
|
||||||
|
"'"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
config.should_launch_new_window = "1";
|
config.should_launch_new_window = "1";
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.programs.starship;
|
cfg = config.programs.starship;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
xdg.configFile = lib.mkIf cfg.enable {
|
xdg.configFile = lib.mkIf cfg.enable {
|
||||||
"starship.toml".source = "${./starship.toml}";
|
"starship.toml".source = "${./starship.toml}";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
programs.tmux.extraConfig =
|
programs.tmux.extraConfig =
|
||||||
builtins.readFile ./tmux.conf
|
builtins.readFile ./tmux.conf
|
||||||
+ lib.optionalString pkgs.stdenv.isDarwin ''
|
+ lib.optionalString pkgs.stdenv.isDarwin ''
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
nix = {
|
nix = {
|
||||||
package = lib.mkDefault (nixosConfig.nix.package or pkgs.nix);
|
package = lib.mkDefault (nixosConfig.nix.package or pkgs.nix);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
programs.vim = {
|
programs.vim = {
|
||||||
extraConfig = builtins.readFile ./vimrc;
|
extraConfig = builtins.readFile ./vimrc;
|
||||||
plugins = let
|
plugins =
|
||||||
|
let
|
||||||
vpkgs = pkgs.vimPlugins;
|
vpkgs = pkgs.vimPlugins;
|
||||||
|
|
||||||
paramount = pkgs.vimUtils.buildVimPlugin {
|
paramount = pkgs.vimUtils.buildVimPlugin {
|
||||||
|
|
@ -13,7 +15,8 @@
|
||||||
hash = "sha256-j9nMjKYK7bqrGHprYp0ddLEWs1CNMudxXD13sOROVmY=";
|
hash = "sha256-j9nMjKYK7bqrGHprYp0ddLEWs1CNMudxXD13sOROVmY=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
vpkgs.vim-sleuth
|
vpkgs.vim-sleuth
|
||||||
vpkgs.vim-surround
|
vpkgs.vim-surround
|
||||||
vpkgs.vim-fugitive
|
vpkgs.vim-fugitive
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.packages = [ pkgs.iosevka ];
|
home.packages = [ pkgs.iosevka ];
|
||||||
services.wired = {
|
services.wired = {
|
||||||
config = "${./wired.ron}";
|
config = "${./wired.ron}";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = config.programs.fish.enable;
|
assertion = config.programs.fish.enable;
|
||||||
|
|
@ -22,7 +23,9 @@
|
||||||
WORKTREE_PATH = "wt";
|
WORKTREE_PATH = "wt";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.direnv.config.whitelist.prefix = [(config.home.sessionVariables.REPO_PATH + "/leana8959")];
|
programs.direnv.config.whitelist.prefix = [
|
||||||
|
(config.home.sessionVariables.REPO_PATH + "/leana8959")
|
||||||
|
];
|
||||||
programs.tmux.extraConfig = lib.mkBefore ''
|
programs.tmux.extraConfig = lib.mkBefore ''
|
||||||
# sessionizer binds
|
# sessionizer binds
|
||||||
bind -n C-f run-shell "tmux new-window tmux-sessionizer"
|
bind -n C-f run-shell "tmux new-window tmux-sessionizer"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
nerd-font-patcher,
|
nerd-font-patcher,
|
||||||
parallel,
|
parallel,
|
||||||
stdenvNoCC,
|
stdenvNoCC,
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
font,
|
font,
|
||||||
extraArgs ? [ ],
|
extraArgs ? [ ],
|
||||||
useDefaultsArgs ? true,
|
useDefaultsArgs ? true,
|
||||||
|
|
@ -24,7 +25,8 @@ stdenvNoCC.mkDerivation {
|
||||||
parallel
|
parallel
|
||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = let
|
buildPhase =
|
||||||
|
let
|
||||||
args =
|
args =
|
||||||
lib.optionals useDefaultsArgs [
|
lib.optionals useDefaultsArgs [
|
||||||
"--careful"
|
"--careful"
|
||||||
|
|
@ -33,7 +35,8 @@ stdenvNoCC.mkDerivation {
|
||||||
"--no-progressbars"
|
"--no-progressbars"
|
||||||
]
|
]
|
||||||
++ extraArgs;
|
++ extraArgs;
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
mkdir -p nerd-font
|
mkdir -p nerd-font
|
||||||
find \( -name \*.ttf -o -name \*.otf \) | parallel --jobs=$NIX_BUILD_CORES nerd-font-patcher {} \
|
find \( -name \*.ttf -o -name \*.otf \) | parallel --jobs=$NIX_BUILD_CORES nerd-font-patcher {} \
|
||||||
--outputdir nerd-font ${builtins.concatStringsSep " " args}
|
--outputdir nerd-font ${builtins.concatStringsSep " " args}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@ let
|
||||||
preferredPriority = 20;
|
preferredPriority = 20;
|
||||||
privatePriority = 10;
|
privatePriority = 10;
|
||||||
limitedPriority = -10;
|
limitedPriority = -10;
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
{
|
{
|
||||||
ssid = "~";
|
ssid = "~";
|
||||||
priority = preferredPriority;
|
priority = preferredPriority;
|
||||||
|
|
|
||||||
|
|
@ -8,16 +8,23 @@ let
|
||||||
# wpa_supplicant uses `strchr` to seek to the first `=`, so the only forbidden character is `=`.
|
# wpa_supplicant uses `strchr` to seek to the first `=`, so the only forbidden character is `=`.
|
||||||
escapePwdKey = lib.replaceStrings [ "=" ] [ "_" ];
|
escapePwdKey = lib.replaceStrings [ "=" ] [ "_" ];
|
||||||
|
|
||||||
go = networkArgs @ {
|
go =
|
||||||
|
networkArgs@{
|
||||||
ssid,
|
ssid,
|
||||||
# Custom fields wrapping nixpkgs module options
|
# Custom fields wrapping nixpkgs module options
|
||||||
hasPassword ? false,
|
hasPassword ? false,
|
||||||
scanOnLowSignal ? false,
|
scanOnLowSignal ? false,
|
||||||
randomizeMac ? false,
|
randomizeMac ? false,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
${ssid} = lib.mkMerge [
|
${ssid} = lib.mkMerge [
|
||||||
(builtins.removeAttrs networkArgs ["ssid" "hasPassword" "scanOnLowSignal" "randomizeMac"])
|
(builtins.removeAttrs networkArgs [
|
||||||
|
"ssid"
|
||||||
|
"hasPassword"
|
||||||
|
"scanOnLowSignal"
|
||||||
|
"randomizeMac"
|
||||||
|
])
|
||||||
(lib.optionalAttrs hasPassword {
|
(lib.optionalAttrs hasPassword {
|
||||||
pskRaw = "ext:${escapePwdKey ssid}";
|
pskRaw = "ext:${escapePwdKey ssid}";
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,18 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
fishNixOSEnabled = config.programs.fish.enable;
|
fishNixOSEnabled = config.programs.fish.enable;
|
||||||
fishHMEnabled =
|
fishHMEnabled =
|
||||||
if config ? home-manager
|
if config ? home-manager then
|
||||||
then lib.any (userConfig: userConfig.programs.fish.enable) (lib.attrValues config.home-manager.users)
|
lib.any (userConfig: userConfig.programs.fish.enable) (lib.attrValues config.home-manager.users)
|
||||||
else false;
|
else
|
||||||
|
false;
|
||||||
|
|
||||||
fishEnabled = fishNixOSEnabled || fishHMEnabled;
|
fishEnabled = fishNixOSEnabled || fishHMEnabled;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
environment.pathsToLink = lib.mkIf fishEnabled [
|
environment.pathsToLink = lib.mkIf fishEnabled [
|
||||||
"/share/fish/vendor_conf.d"
|
"/share/fish/vendor_conf.d"
|
||||||
"/share/fish/vendor_completions.d"
|
"/share/fish/vendor_completions.d"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{hostname, ...}: {
|
{ hostname, ... }:
|
||||||
|
{
|
||||||
networking.hostName = hostname;
|
networking.hostName = hostname;
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
security.sudo.enable = false;
|
security.sudo.enable = false;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
nix = {
|
nix = {
|
||||||
package = lib.mkDefault pkgs.nix;
|
package = lib.mkDefault pkgs.nix;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,11 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.services.xscreensaver;
|
cfg = config.services.xscreensaver;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
services.xscreensaver.hooks = lib.mkOption {
|
services.xscreensaver.hooks = lib.mkOption {
|
||||||
type = with lib.types; attrsOf str;
|
type = with lib.types; attrsOf str;
|
||||||
|
|
@ -20,19 +22,22 @@ in {
|
||||||
systemd.user.services = {
|
systemd.user.services = {
|
||||||
"xscreensaver-hooks" = {
|
"xscreensaver-hooks" = {
|
||||||
description = "Run commands on xscreensaver events";
|
description = "Run commands on xscreensaver events";
|
||||||
after = ["graphical-session.target" "xscreensaver.service"];
|
after = [
|
||||||
|
"graphical-session.target"
|
||||||
|
"xscreensaver.service"
|
||||||
|
];
|
||||||
partOf = [ "graphical-session.target" ];
|
partOf = [ "graphical-session.target" ];
|
||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
script = let
|
script =
|
||||||
handlers =
|
let
|
||||||
lib.concatMapAttrsStringSep "\n" (event: action: ''
|
handlers = lib.concatMapAttrsStringSep "\n" (event: action: ''
|
||||||
"${event}")
|
"${event}")
|
||||||
( ${action}
|
( ${action}
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
'')
|
'') cfg.hooks;
|
||||||
cfg.hooks;
|
in
|
||||||
in ''
|
''
|
||||||
xscreensaver-command -watch | while read event rest; do
|
xscreensaver-command -watch | while read event rest; do
|
||||||
echo "The handler script got \"$event\""
|
echo "The handler script got \"$event\""
|
||||||
case $event in
|
case $event in
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
#
|
#
|
||||||
# My user
|
# My user
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,12 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.services.parrot;
|
cfg = config.services.parrot;
|
||||||
t = lib.types;
|
t = lib.types;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
services.parrot = {
|
services.parrot = {
|
||||||
enable = lib.mkEnableOption "parrot";
|
enable = lib.mkEnableOption "parrot";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
# https://nixos.wiki/wiki/Encrypted_DNS
|
# https://nixos.wiki/wiki/Encrypted_DNS
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
networking = {
|
networking = {
|
||||||
nameservers = ["127.0.0.1" "::1"];
|
nameservers = [
|
||||||
|
"127.0.0.1"
|
||||||
|
"::1"
|
||||||
|
];
|
||||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
# networkmanager.dns = "none";
|
# networkmanager.dns = "none";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,12 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
cfg = config.services.typst-bot;
|
cfg = config.services.typst-bot;
|
||||||
t = lib.types;
|
t = lib.types;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
services.typst-bot = {
|
services.typst-bot = {
|
||||||
enable = lib.mkEnableOption "typst-bot";
|
enable = lib.mkEnableOption "typst-bot";
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,10 @@ in
|
||||||
final: prev: {
|
final: prev: {
|
||||||
fcitx5-table-extra = prev.fcitx5-table-extra.overrideAttrs (oldAttrs: {
|
fcitx5-table-extra = prev.fcitx5-table-extra.overrideAttrs (oldAttrs: {
|
||||||
src = sources.fcitx5-table-extra;
|
src = sources.fcitx5-table-extra;
|
||||||
nativeBuildInputs =
|
nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [
|
||||||
oldAttrs.nativeBuildInputs or []
|
|
||||||
++ [
|
|
||||||
final.python3
|
final.python3
|
||||||
];
|
];
|
||||||
preConfigure =
|
preConfigure = oldAttrs.preConfigure or "" + ''
|
||||||
oldAttrs.preConfigure or ""
|
|
||||||
+ ''
|
|
||||||
python3 ./generate.py
|
python3 ./generate.py
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
final: prev: rec {
|
final: prev: rec {
|
||||||
nerd-fonts = let
|
nerd-fonts =
|
||||||
|
let
|
||||||
mkNerdFont = final.callPackage ../lib/mkNerdFont.nix { };
|
mkNerdFont = final.callPackage ../lib/mkNerdFont.nix { };
|
||||||
in
|
in
|
||||||
prev.nerd-fonts
|
prev.nerd-fonts
|
||||||
|
|
|
||||||
|
|
@ -3,20 +3,17 @@ let
|
||||||
sources = import ../../npins;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
final: _: {
|
final: _: {
|
||||||
nil = let
|
nil =
|
||||||
|
let
|
||||||
pkg = sources.nil.asFlake.packages.${final.system}.default;
|
pkg = sources.nil.asFlake.packages.${final.system}.default;
|
||||||
in
|
in
|
||||||
pkg.overrideAttrs (
|
pkg.overrideAttrs (oldAttrs: {
|
||||||
oldAttrs: {
|
patches = oldAttrs.patches or [ ] ++ [
|
||||||
patches =
|
|
||||||
oldAttrs.patches or []
|
|
||||||
++ [
|
|
||||||
(final.fetchpatch {
|
(final.fetchpatch {
|
||||||
name = "fix-handling-inherit-and-patfield-in-inline-assist";
|
name = "fix-handling-inherit-and-patfield-in-inline-assist";
|
||||||
url = "https://github.com/oxalica/nil/pull/178.patch";
|
url = "https://github.com/oxalica/nil/pull/178.patch";
|
||||||
hash = "sha256-4f7DeWJtt63IyOjqlwzz0f05rv1NBYZO4JWEkFeDimk=";
|
hash = "sha256-4f7DeWJtt63IyOjqlwzz0f05rv1NBYZO4JWEkFeDimk=";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@ let
|
||||||
in
|
in
|
||||||
# The final nix is lix in this case
|
# The final nix is lix in this case
|
||||||
final: prev: {
|
final: prev: {
|
||||||
nix-monitored =
|
nix-monitored = sources.nix-monitored.asFlake.packages.${final.system}.default.override {
|
||||||
sources.nix-monitored.asFlake.packages.${final.system}.default
|
|
||||||
.override {
|
|
||||||
inherit (final) nix;
|
inherit (final) nix;
|
||||||
withNotify = false; # noisy, spams "command completed" even for nix shells
|
withNotify = false; # noisy, spams "command completed" even for nix shells
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
stdenvNoCC,
|
stdenvNoCC,
|
||||||
lib,
|
lib,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
rev = "9bb188e2701138e03f73bacebd6b19b181ca0012";
|
rev = "9bb188e2701138e03f73bacebd6b19b181ca0012";
|
||||||
in
|
in
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,13 @@
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
fetchFromGitea,
|
fetchFromGitea,
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage (finalAttrs: let
|
rustPlatform.buildRustPackage (
|
||||||
|
finalAttrs:
|
||||||
|
let
|
||||||
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
|
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
|
||||||
cargoLock = finalAttrs.src + "/Cargo.lock";
|
cargoLock = finalAttrs.src + "/Cargo.lock";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
pname = "audio-lint";
|
pname = "audio-lint";
|
||||||
version = cargoToml.package.version;
|
version = cargoToml.package.version;
|
||||||
|
|
||||||
|
|
@ -18,4 +21,5 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoLock.lockFile = cargoLock;
|
cargoLock.lockFile = cargoLock;
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,13 @@
|
||||||
libxcb,
|
libxcb,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage (finalAttrs: let
|
rustPlatform.buildRustPackage (
|
||||||
|
finalAttrs:
|
||||||
|
let
|
||||||
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
|
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
|
||||||
cargoLock = finalAttrs.src + "/Cargo.lock";
|
cargoLock = finalAttrs.src + "/Cargo.lock";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
pname = "emoji-picker";
|
pname = "emoji-picker";
|
||||||
version = cargoToml.package.version;
|
version = cargoToml.package.version;
|
||||||
|
|
||||||
|
|
@ -31,4 +34,5 @@ in {
|
||||||
openssl.dev
|
openssl.dev
|
||||||
libxcb
|
libxcb
|
||||||
];
|
];
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
stdenvNoCC,
|
stdenvNoCC,
|
||||||
lib,
|
lib,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
rev = "cc19c050997d5f54014bb20c764b131e003dfb17";
|
rev = "cc19c050997d5f54014bb20c764b131e003dfb17";
|
||||||
in
|
in
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,21 @@
|
||||||
haskell,
|
haskell,
|
||||||
fetchFromGitea,
|
fetchFromGitea,
|
||||||
installShellFiles,
|
installShellFiles,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
||||||
|
|
||||||
drv =
|
drv = haskellPackages.callCabal2nix "hbrainfuck" (fetchFromGitea {
|
||||||
haskellPackages.callCabal2nix "hbrainfuck"
|
|
||||||
(fetchFromGitea {
|
|
||||||
domain = "git.confusedcompiler.org";
|
domain = "git.confusedcompiler.org";
|
||||||
owner = "leana8959";
|
owner = "leana8959";
|
||||||
repo = "hbrainfuck";
|
repo = "hbrainfuck";
|
||||||
rev = "5eea5ff0d7efc0bd866a2273686032ba9cab5baa";
|
rev = "5eea5ff0d7efc0bd866a2273686032ba9cab5baa";
|
||||||
hash = "sha256-/htXOULUJN8+PsAYaG281Ge/9ULZoWip63IUxuVbTSg=";
|
hash = "sha256-/htXOULUJN8+PsAYaG281Ge/9ULZoWip63IUxuVbTSg=";
|
||||||
})
|
}) { };
|
||||||
{};
|
|
||||||
|
|
||||||
cabalOverrides = o: {
|
cabalOverrides = o: {
|
||||||
buildTools = o.buildTools or [ ] ++ [ installShellFiles ];
|
buildTools = o.buildTools or [ ] ++ [ installShellFiles ];
|
||||||
postInstall =
|
postInstall = o.postInstall or "" + ''
|
||||||
o.postInstall or ""
|
|
||||||
+ ''
|
|
||||||
installShellCompletion --cmd hbrainfuck \
|
installShellCompletion --cmd hbrainfuck \
|
||||||
--bash <("$out/bin/hbf" --bash-completion-script "$out/bin/hbf") \
|
--bash <("$out/bin/hbf" --bash-completion-script "$out/bin/hbf") \
|
||||||
--fish <("$out/bin/hbf" --fish-completion-script "$out/bin/hbf") \
|
--fish <("$out/bin/hbf" --fish-completion-script "$out/bin/hbf") \
|
||||||
|
|
@ -29,5 +25,4 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
justStaticExecutables
|
justStaticExecutables (overrideCabal cabalOverrides drv)
|
||||||
(overrideCabal cabalOverrides drv)
|
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,16 @@
|
||||||
haskellPackages,
|
haskellPackages,
|
||||||
haskell,
|
haskell,
|
||||||
fetchFromGitea,
|
fetchFromGitea,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (haskell.lib.compose) justStaticExecutables;
|
inherit (haskell.lib.compose) justStaticExecutables;
|
||||||
|
|
||||||
drv =
|
drv = haskellPackages.callCabal2nix "hutils" (fetchFromGitea {
|
||||||
haskellPackages.callCabal2nix "hutils"
|
|
||||||
(fetchFromGitea {
|
|
||||||
domain = "git.confusedcompiler.org";
|
domain = "git.confusedcompiler.org";
|
||||||
owner = "leana8959";
|
owner = "leana8959";
|
||||||
repo = "hutils";
|
repo = "hutils";
|
||||||
rev = "30b503bec011f8908e26c0e1e961936d56da74cc";
|
rev = "30b503bec011f8908e26c0e1e961936d56da74cc";
|
||||||
hash = "sha256-lPwqxsz7WXdDMonjdWvTziR5HuE5HY2GyU2rQkwn0VU=";
|
hash = "sha256-lPwqxsz7WXdDMonjdWvTziR5HuE5HY2GyU2rQkwn0VU=";
|
||||||
})
|
}) { };
|
||||||
{};
|
|
||||||
in
|
in
|
||||||
justStaticExecutables drv
|
justStaticExecutables drv
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
fetchFromGitLab,
|
fetchFromGitLab,
|
||||||
ocaml-ng,
|
ocaml-ng,
|
||||||
ocamlPackages ? ocaml-ng.ocamlPackages_5_1,
|
ocamlPackages ? ocaml-ng.ocamlPackages_5_1,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
version = "v0.16.2";
|
version = "v0.16.2";
|
||||||
in
|
in
|
||||||
ocamlPackages.buildDunePackage {
|
ocamlPackages.buildDunePackage {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
writeShellApplication,
|
writeShellApplication,
|
||||||
which,
|
which,
|
||||||
lib,
|
lib,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
# Use this to not pollute the PATH inside
|
# Use this to not pollute the PATH inside
|
||||||
# Otherwise nix-which which will be an edge case
|
# Otherwise nix-which which will be an edge case
|
||||||
whichExe = "${lib.getExe which}";
|
whichExe = "${lib.getExe which}";
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,21 @@
|
||||||
haskell,
|
haskell,
|
||||||
fetchFromGitea,
|
fetchFromGitea,
|
||||||
installShellFiles,
|
installShellFiles,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
||||||
|
|
||||||
drv =
|
drv = haskellPackages.callCabal2nix "prop-solveur" (fetchFromGitea {
|
||||||
haskellPackages.callCabal2nix "prop-solveur"
|
|
||||||
(fetchFromGitea {
|
|
||||||
domain = "git.confusedcompiler.org";
|
domain = "git.confusedcompiler.org";
|
||||||
owner = "leana8959";
|
owner = "leana8959";
|
||||||
repo = "prop_solveur";
|
repo = "prop_solveur";
|
||||||
rev = "cc2430dc5a396b01d02bd925070ce5d009d05bc4";
|
rev = "cc2430dc5a396b01d02bd925070ce5d009d05bc4";
|
||||||
hash = "sha256-jwNfRBytf/w0d2CWczXp+rVRXYNzptkuFE3OKSdOhLc=";
|
hash = "sha256-jwNfRBytf/w0d2CWczXp+rVRXYNzptkuFE3OKSdOhLc=";
|
||||||
})
|
}) { };
|
||||||
{};
|
|
||||||
|
|
||||||
cabalOverrides = o: {
|
cabalOverrides = o: {
|
||||||
buildTools = o.buildTools or [ ] ++ [ installShellFiles ];
|
buildTools = o.buildTools or [ ] ++ [ installShellFiles ];
|
||||||
postInstall =
|
postInstall = o.postInstall or "" + ''
|
||||||
o.postInstall or ""
|
|
||||||
+ ''
|
|
||||||
installShellCompletion --cmd prop-solveur \
|
installShellCompletion --cmd prop-solveur \
|
||||||
--bash <("$out/bin/prop-solveur" --bash-completion-script "$out/bin/prop-solveur") \
|
--bash <("$out/bin/prop-solveur" --bash-completion-script "$out/bin/prop-solveur") \
|
||||||
--fish <("$out/bin/prop-solveur" --fish-completion-script "$out/bin/prop-solveur") \
|
--fish <("$out/bin/prop-solveur" --fish-completion-script "$out/bin/prop-solveur") \
|
||||||
|
|
@ -29,5 +25,4 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
justStaticExecutables
|
justStaticExecutables (overrideCabal cabalOverrides drv)
|
||||||
(overrideCabal cabalOverrides drv)
|
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,21 @@
|
||||||
haskell,
|
haskell,
|
||||||
fetchFromGitea,
|
fetchFromGitea,
|
||||||
installShellFiles,
|
installShellFiles,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
inherit (haskell.lib.compose) justStaticExecutables overrideCabal;
|
||||||
|
|
||||||
drv =
|
drv = haskellPackages.callCabal2nix "ruler" (fetchFromGitea {
|
||||||
haskellPackages.callCabal2nix "ruler"
|
|
||||||
(fetchFromGitea {
|
|
||||||
domain = "git.confusedcompiler.org";
|
domain = "git.confusedcompiler.org";
|
||||||
owner = "leana8959";
|
owner = "leana8959";
|
||||||
repo = "ruler";
|
repo = "ruler";
|
||||||
rev = "f328620a52b25d4c9dea64425afe5995dfb8cb5a";
|
rev = "f328620a52b25d4c9dea64425afe5995dfb8cb5a";
|
||||||
hash = "sha256-8nSVFckWXkf9dRTdzjbHRhf/qPdbXHEkVI4DyW3zfSo=";
|
hash = "sha256-8nSVFckWXkf9dRTdzjbHRhf/qPdbXHEkVI4DyW3zfSo=";
|
||||||
})
|
}) { };
|
||||||
{};
|
|
||||||
|
|
||||||
cabalOverrides = o: {
|
cabalOverrides = o: {
|
||||||
buildTools = o.buildTools or [ ] ++ [ installShellFiles ];
|
buildTools = o.buildTools or [ ] ++ [ installShellFiles ];
|
||||||
postInstall =
|
postInstall = o.postInstall or "" + ''
|
||||||
o.postInstall or ""
|
|
||||||
+ ''
|
|
||||||
installShellCompletion --cmd ruler \
|
installShellCompletion --cmd ruler \
|
||||||
--bash <("$out/bin/ruler" --bash-completion-script "$out/bin/ruler") \
|
--bash <("$out/bin/ruler" --bash-completion-script "$out/bin/ruler") \
|
||||||
--fish <("$out/bin/ruler" --fish-completion-script "$out/bin/ruler") \
|
--fish <("$out/bin/ruler" --fish-completion-script "$out/bin/ruler") \
|
||||||
|
|
@ -29,5 +25,4 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
justStaticExecutables
|
justStaticExecutables (overrideCabal cabalOverrides drv)
|
||||||
(overrideCabal cabalOverrides drv)
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,8 @@
|
||||||
gnused,
|
gnused,
|
||||||
lib,
|
lib,
|
||||||
symlinkJoin,
|
symlinkJoin,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
tmux-register-session = writeShellApplication {
|
tmux-register-session = writeShellApplication {
|
||||||
name = "__tmux-register-session";
|
name = "__tmux-register-session";
|
||||||
runtimeInputs = [ tmux ];
|
runtimeInputs = [ tmux ];
|
||||||
|
|
@ -27,7 +28,10 @@
|
||||||
|
|
||||||
tmux-maybe-create = writeShellApplication {
|
tmux-maybe-create = writeShellApplication {
|
||||||
name = "__tmux-maybe-create";
|
name = "__tmux-maybe-create";
|
||||||
runtimeInputs = [procps tmux];
|
runtimeInputs = [
|
||||||
|
procps
|
||||||
|
tmux
|
||||||
|
];
|
||||||
text = ''
|
text = ''
|
||||||
session_name="$1"
|
session_name="$1"
|
||||||
session_dir="$2"
|
session_dir="$2"
|
||||||
|
|
@ -55,7 +59,10 @@
|
||||||
|
|
||||||
tmux-sessionizer = writeShellApplication {
|
tmux-sessionizer = writeShellApplication {
|
||||||
name = "tmux-sessionizer";
|
name = "tmux-sessionizer";
|
||||||
runtimeInputs = [fzf gnused];
|
runtimeInputs = [
|
||||||
|
fzf
|
||||||
|
gnused
|
||||||
|
];
|
||||||
text = ''
|
text = ''
|
||||||
selected=$(
|
selected=$(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,13 @@
|
||||||
darwin,
|
darwin,
|
||||||
zlib,
|
zlib,
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage (finalAttrs: let
|
rustPlatform.buildRustPackage (
|
||||||
|
finalAttrs:
|
||||||
|
let
|
||||||
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
|
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
|
||||||
cargoLock = finalAttrs.src + "/Cargo.lock";
|
cargoLock = finalAttrs.src + "/Cargo.lock";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
pname = "tokei";
|
pname = "tokei";
|
||||||
version = cargoToml.package.version;
|
version = cargoToml.package.version;
|
||||||
|
|
||||||
|
|
@ -32,4 +35,5 @@ in {
|
||||||
|
|
||||||
# enable all output formats
|
# enable all output formats
|
||||||
buildFeatures = [ "all" ];
|
buildFeatures = [ "all" ];
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
lib,
|
lib,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
rev = "c9d4b164ff5dc2567bb0de3876460e51da62ba94";
|
rev = "c9d4b164ff5dc2567bb0de3876460e51da62ba94";
|
||||||
in
|
in
|
||||||
rustPlatform.buildRustPackage (finalAttrs: {
|
rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,13 @@
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
fetchpatch,
|
fetchpatch,
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage (finalAttrs: let
|
rustPlatform.buildRustPackage (
|
||||||
|
finalAttrs:
|
||||||
|
let
|
||||||
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
|
cargoToml = fromTOML (builtins.readFile (finalAttrs.src + "/Cargo.toml"));
|
||||||
cargoLock = finalAttrs.src + "/Cargo.lock";
|
cargoLock = finalAttrs.src + "/Cargo.lock";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
pname = "typst-mutilate";
|
pname = "typst-mutilate";
|
||||||
version = cargoToml.package.version;
|
version = cargoToml.package.version;
|
||||||
|
|
||||||
|
|
@ -26,4 +29,5 @@ in {
|
||||||
hash = "sha256-+6DMQo4cjVASgkX4gcYrEkwQ/uxttV/61fDnXBqbNcg=";
|
hash = "sha256-+6DMQo4cjVASgkX4gcYrEkwQ/uxttV/61fDnXBqbNcg=";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
})
|
}
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
{sources ? import ../../npins}: let
|
{
|
||||||
|
sources ? import ../../npins,
|
||||||
|
}:
|
||||||
|
let
|
||||||
scopeOverlay = overlay: final: prev: { export = prev.export or { } // overlay final prev; };
|
scopeOverlay = overlay: final: prev: { export = prev.export or { } // overlay final prev; };
|
||||||
in
|
in
|
||||||
(
|
(import sources.nixpkgs {
|
||||||
import sources.nixpkgs {
|
|
||||||
overlays = map scopeOverlay [
|
overlays = map scopeOverlay [
|
||||||
(import ./overlay.nix)
|
(import ./overlay.nix)
|
||||||
(import ../overlays/iosevka.nix)
|
(import ../overlays/iosevka.nix)
|
||||||
];
|
];
|
||||||
}
|
}).export
|
||||||
).export
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue