Started rewriting my nixos config
This commit is contained in:
parent
f9f3b19299
commit
1b17dc6cf3
186 changed files with 135 additions and 7404 deletions
modules
applications
alacritty.nixchromium.nixdefault.nixdirenv.nixdiscord.nixdocker.nixedopro.nix
bluetooth.nixdefault.nixgit
hamachi.nixkdeconnect.nixkmonad.nixlocale.nixmemes.nixmisc.nixneovim.nixpolybar.nixpostgres.nixrofi
shells
steam.nixtmux.nixtmux
vieb.nixwakatime
wine.nixxmodmap
xmonad
zathura.nixdev
agda.nixdefault.nixdhall.nixelm.nixfsharp.nix
foreign.nixhelpers.nixhaskell
idris.nixjavascript.nixkotlin.nixlean.nixnix.nixpurescript.nixracket.nixrust.nixhome-manager
meta
network.nixnix.nixnixos
overlays
printers.nixthemes
catppuccin
default.nixfonts.nixgithubVariant.nixgtk.nixthemes.nixwallpaper.nixwallpapers
xresources.nix
|
@ -1,31 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
theme = pkgs.myThemes.current;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
{
|
||||
# Load theme
|
||||
home-manager.users.adrielus.programs.alacritty.settings = theme.alacritty.settings;
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
|
||||
home-manager.users.adrielus = {
|
||||
xdg.configFile."alacritty/extraConfig.yml".text = theme.alacritty.extraConfig or "";
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
import = [ "~/.config/alacritty/extraConfig.yml" ];
|
||||
|
||||
window.decorations = "none";
|
||||
fonts.normal.family = "Nerd Font Source Code Pro";
|
||||
|
||||
env = { TERM = "xterm-256color"; };
|
||||
working_directory = "/home/adrielus/Projects/";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
theme = pkgs.myThemes.current;
|
||||
extensions = theme.chromium.extensions or [ ];
|
||||
in
|
||||
{
|
||||
home-manager.users.adrielus.programs.chromium = {
|
||||
enable = true;
|
||||
extensions = lib.lists.map (id: { inherit id; }) extensions;
|
||||
};
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./git
|
||||
./shells
|
||||
# ./wakatime
|
||||
./rofi
|
||||
# ./xmodmap
|
||||
|
||||
# ./wine.nix
|
||||
./kdeconnect.nix
|
||||
./steam.nix
|
||||
./docker.nix
|
||||
./misc.nix
|
||||
./zathura.nix
|
||||
./discord.nix
|
||||
./locale.nix
|
||||
# ./memes.nix
|
||||
./alacritty.nix
|
||||
# ./postgres.nix
|
||||
./neovim.nix
|
||||
./tmux.nix
|
||||
./kmonad.nix
|
||||
./direnv.nix
|
||||
# ./chromium.nix
|
||||
./vieb.nix
|
||||
./polybar.nix
|
||||
./hamachi.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
# https://github.com/nix-community/nix-direnv
|
||||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus = {
|
||||
programs.direnv.enable = true;
|
||||
programs.direnv.nix-direnv.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus = {
|
||||
xdg.configFile."discord/settings.json".text = ''
|
||||
{
|
||||
"BACKGROUND_COLOR": "#ffffff",
|
||||
"SKIP_HOST_UPDATE": true
|
||||
}
|
||||
'';
|
||||
home.packages = with pkgs; [
|
||||
unstable.discord
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
liveRestore = false;
|
||||
extraOptions = ''
|
||||
--default-address-pool "base=192.168.100.0/20,size=24"
|
||||
'';
|
||||
};
|
||||
home-manager.users.adrielus.home.packages = with pkgs; [
|
||||
docker
|
||||
docker-compose
|
||||
docker-machine
|
||||
];
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
# TODO: make this actually build
|
||||
{ pkgs, stdenv, ... }:
|
||||
let
|
||||
# It's considered good practice to specify the version in the derivation name
|
||||
version = "38.1.1";
|
||||
# In case the name they build it into changes I can just modify this
|
||||
execName = "EDOPro";
|
||||
edopro = stdenv.mkDerivation rec {
|
||||
name = "edopro-${version}";
|
||||
|
||||
src = builtins.path {
|
||||
path = pkgs.fetchurl {
|
||||
url =
|
||||
"https://mega.nz/file/pfglCAyK#IlqEOy1kBLmFiIDu4z6afbj1wTcWTFTyvYzPW0D2m24";
|
||||
sha256 =
|
||||
"99be240086ccae834998b821df5abb17f7d22d26fb757fc5106b4812ca4b3f36";
|
||||
};
|
||||
name = "edopro-source";
|
||||
};
|
||||
|
||||
# Add the derivation to the PATH
|
||||
buildInputs = with pkgs; [
|
||||
mono # this is needed for the ai support
|
||||
freetype # font rendering engine
|
||||
];
|
||||
|
||||
# This just moves the bin over and calls it a day
|
||||
installPhase = ''
|
||||
# Make the output directory
|
||||
mkdir -p $out/bin
|
||||
|
||||
# Copy the script there and make it executable
|
||||
cp ${execName} $out/bin/
|
||||
chmod +x $out/bin/${execName}
|
||||
'';
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "edopro-environment";
|
||||
buildInputs = [ edopro ];
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
# Most of these are copied from: https://github.com/Brettm12345/nixos-config/blob/1400c71bce/modules/applications/git/aliases.nix
|
||||
|
||||
let
|
||||
git = text: ''"!git ${text}"'';
|
||||
f = text: ''"!f(){ ${text} };f"'';
|
||||
in {
|
||||
# Unstage all changes
|
||||
unstage = "reset HEAD --";
|
||||
|
||||
# Ammend to the last commit
|
||||
amend = "commit --amend -C HEAD";
|
||||
|
||||
# List branches sorted by last modified
|
||||
b = git
|
||||
"for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'";
|
||||
|
||||
# Test merge for conflicts before merging
|
||||
mergetest = f ''
|
||||
git merge --no-commit --no-ff "$1"; git merge --abort; echo "Merge aborted";'';
|
||||
|
||||
# Get description of current repo
|
||||
description = git
|
||||
''config --get "branch.$(git rev-parse --abbrev-ref HEAD).description"'';
|
||||
|
||||
# Show authors
|
||||
authors = ''
|
||||
"!f() { git log --no-merges --pretty='format:%<(26)%an <%ae>' --author "$*" | sort | uniq# }# f"'';
|
||||
|
||||
a = "add";
|
||||
cm = "commit --message";
|
||||
caa = "commit --ammend";
|
||||
cl = "clone";
|
||||
co = "checkout";
|
||||
col = "checkout @{-1}";
|
||||
cob = "checkout -b";
|
||||
st = "stash";
|
||||
pop = "stash pop";
|
||||
t = "tag";
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus = {
|
||||
home.packages = with pkgs;
|
||||
with gitAndTools; [
|
||||
# Render a git repo
|
||||
gource
|
||||
# Store secrets in github repos
|
||||
git-secret
|
||||
git-crypt
|
||||
# Both of these are github clis
|
||||
gh
|
||||
hub
|
||||
];
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
userName = "Matei Adriel";
|
||||
userEmail = "rafaeladriel11@gmail.com";
|
||||
extraConfig.core.editor = "nvim";
|
||||
|
||||
aliases = import ./aliases.nix;
|
||||
|
||||
extraConfig = {
|
||||
github.user = "Mateiadrielrafael";
|
||||
hub.protocol = "ssh";
|
||||
|
||||
rebase.autoStash = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
services.logmein-hamachi.enable = true;
|
||||
home-manager.users.adrielus.home.packages = [
|
||||
pkgs.logmein-hamachi
|
||||
pkgs.unstable.haguichi
|
||||
];
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus = {
|
||||
services.kdeconnect.enable = true;
|
||||
};
|
||||
|
||||
# Open port for kdeconnect
|
||||
networking.firewall.allowedTCPPortRanges = [{ from = 1714; to = 1764; }];
|
||||
networking.firewall.allowedUDPPortRanges = [{ from = 1714; to = 1764; }];
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
kmonadRoot = ../../dotfiles/kmonad;
|
||||
kmonadInstances = [{
|
||||
config = kmonadRoot + "/keymap.kbd";
|
||||
inputDevices = [
|
||||
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
|
||||
];
|
||||
}];
|
||||
|
||||
createKmonadInstances = ({ config, inputDevices }:
|
||||
let
|
||||
configContent = builtins.readFile config;
|
||||
in
|
||||
lib.lists.map
|
||||
(device:
|
||||
"${pkgs.writeTextDir "configs/kmonad.kbd" (builtins.replaceStrings [ "$DEVICE" ] [ device ] configContent)}/kmonad.kbd"
|
||||
)
|
||||
inputDevices
|
||||
|
||||
);
|
||||
in
|
||||
{
|
||||
users.extraUsers.adrielus.extraGroups = [ "input" "uinput" ];
|
||||
|
||||
services = {
|
||||
kmonad = {
|
||||
enable = true;
|
||||
# configfiles = lib.lists.concatMap createKmonadInstances kmonadInstances;
|
||||
configfiles = lib.lists.map ({ config, ... }: config) kmonadInstances;
|
||||
};
|
||||
|
||||
xserver = {
|
||||
xkbOptions = "compose:ralt";
|
||||
layout = "us";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
home-manager.users.adrielus = {
|
||||
home.file.".XCompose".source = kmonadRoot + "/xcompose";
|
||||
};
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
# time.timeZone = "Europe/Bucharest";
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
i18n.inputMethod = {
|
||||
enabled = "ibus";
|
||||
# ibus.engines = with pkgs.ibus-engines; [ /* any engine you want, for example */ anthy ];
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.source-code-pro
|
||||
];
|
||||
|
||||
console = {
|
||||
keyMap = "us";
|
||||
font = "SourceCodePro";
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs; [
|
||||
# I love combining these together and generating random stuff lol
|
||||
fortune
|
||||
cowsay
|
||||
lolcat
|
||||
figlet
|
||||
toilet
|
||||
|
||||
# stuff to look at
|
||||
doge
|
||||
sl
|
||||
asciiquarium
|
||||
cmatrix
|
||||
];
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs; [
|
||||
# cmd stuff
|
||||
tree # print a directory structure
|
||||
exa # ls replacement
|
||||
mkpasswd # hash passwords
|
||||
gnupg # forgot what this was
|
||||
# acpi # show remaining battery
|
||||
# typespeed # speed typing game
|
||||
# unixtools.xxd # to dump binary stuff into a text file (used it for a ctf)
|
||||
# youtube-dl # download from youtube
|
||||
neofetch # display system information
|
||||
xclip # copy paste stuff
|
||||
# feh # image viewer
|
||||
# speedtest-cli # test the internet speed and stuff
|
||||
# openssl
|
||||
# pkgconfig
|
||||
# ngrok
|
||||
# hugo
|
||||
unzip # for working with .zip files
|
||||
unrar # for extracting shit from rars
|
||||
# jdk11o
|
||||
# jdk8
|
||||
# gtk3
|
||||
gnumake
|
||||
cmake
|
||||
# unison-ucm
|
||||
xorg.libX11 # wtf is this
|
||||
okular # forgot what this does
|
||||
spotify-tui # spotify terminal ui
|
||||
# kdeconnect # connect with your phone
|
||||
sloc # line of code counter
|
||||
update-nix-fetchgit # for updating fetchgit calls in nix files
|
||||
pamixer # set pipewire volume
|
||||
pulseaudio # pactl and stuff (same thing as above)
|
||||
|
||||
# editors
|
||||
# vscodium
|
||||
# vscode
|
||||
# vim
|
||||
# emacs
|
||||
vimclip # use neovim anywhere
|
||||
|
||||
# chat apps
|
||||
# slack
|
||||
signal-desktop
|
||||
# tdesktop # telegram for the desktop
|
||||
# deluge
|
||||
zoom-us
|
||||
# teams
|
||||
|
||||
# browsers
|
||||
unstable.google-chrome
|
||||
# brave
|
||||
# firefox
|
||||
|
||||
# other stuff
|
||||
obsidian # knowedge base
|
||||
# milkytracker # music tracker thingy
|
||||
spectacle # take screenshots
|
||||
peek # record gifs
|
||||
vlc # video player
|
||||
gimp # image editing
|
||||
# korganizer # calendar
|
||||
libreoffice # free office suite
|
||||
# edopro # yugioh simulator (my derivation doesn't work yet)
|
||||
# akonadi
|
||||
# obs-studio # video recorder
|
||||
# blueman # bluetooth manager
|
||||
# freesweep # minesweeper I can play w the keyboard.
|
||||
# multimc
|
||||
# lmms # music software
|
||||
libsForQt5.dolphin
|
||||
|
||||
# Nes emulators and stuff
|
||||
# zsnes
|
||||
# higan
|
||||
# fceux
|
||||
|
||||
# games
|
||||
# tetrio-desktop # competitive tetris
|
||||
# vassal # wargame engine
|
||||
# mindustry # factory building game
|
||||
# edopro # yugioh sim
|
||||
];
|
||||
}
|
|
@ -1,87 +0,0 @@
|
|||
{ pkgs, lib, paths, ... }:
|
||||
let
|
||||
teal = pkgs.fetchFromGitHub {
|
||||
owner = "teal-language";
|
||||
repo = "tl";
|
||||
rev = "526fe3640fe6265706541c251e984c033a1a5ec9";
|
||||
sha256 = "0l31qj492iaiadpp4s0wflfb7vn6zzxwhbiyczisdgpd9ydj20gf";
|
||||
};
|
||||
|
||||
theme = pkgs.myThemes.current;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
# Language servers
|
||||
nodePackages.typescript-language-server # typescript
|
||||
easy-purescript-nix.purescript-language-server # purescript
|
||||
sumneko-lua-language-server # lua
|
||||
rnix-lsp # nix
|
||||
haskell-language-server # haskell
|
||||
tectonic # also latex something?
|
||||
texlab # latex
|
||||
nodePackages_latest.vscode-langservers-extracted
|
||||
|
||||
# Formatters
|
||||
luaformatter # lua
|
||||
stylua # lua
|
||||
ormolu # haskell
|
||||
easy-purescript-nix.purs-tidy
|
||||
nodePackages_latest.prettier_d_slim
|
||||
|
||||
# Others
|
||||
nodePackages.typescript # typescript
|
||||
wakatime # time tracking
|
||||
fd # file finder
|
||||
ripgrep # grep rewrite (I think?)
|
||||
update-nix-fetchgit # useful for nix stuff
|
||||
tree-sitter # syntax highlighting
|
||||
libstdcxx5 # required by treesitter aparently
|
||||
zathura # pdf reader
|
||||
xdotool # for zathura reverse search or whatever it's called
|
||||
lua # for repls and whatnot
|
||||
glow # md preview in terminal
|
||||
pandoc # md processing
|
||||
libsForQt5.falkon # aparently needed for md preview
|
||||
luajitPackages.luarocks # lua package manager
|
||||
|
||||
texlive.combined.scheme-full # latex stuff
|
||||
python38Packages.pygments # required for latex syntax highlighting
|
||||
];
|
||||
|
||||
|
||||
wrapClient = { base, name }:
|
||||
pkgs.symlinkJoin {
|
||||
inherit (base) name meta;
|
||||
paths = [ base ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/${name} \
|
||||
--prefix PATH : ${lib.makeBinPath extraPackages} \
|
||||
--set LAZY_NVIM_PATH ${lazy-nvim} \
|
||||
--set INSIDE_NEOVIDE ${if name == "neovide" then "1" else "0"}
|
||||
'';
|
||||
};
|
||||
|
||||
neovim = wrapClient { base = pkgs.neovim-nightly; name = "nvim"; };
|
||||
neovide = wrapClient { base = pkgs.neovide; name = "neovide"; };
|
||||
|
||||
nixPlugins = ".local/share/nvim/site/pack/nix";
|
||||
in
|
||||
{
|
||||
home-manager.users.adrielus = { config, ... }:
|
||||
let simlink = config.lib.file.mkOutOfStoreSymlink; in
|
||||
{
|
||||
home.file."${nixPlugins}/start/paq-nvim".source = paq;
|
||||
home.file."${nixPlugins}/start/theming/lua/my/theme.lua".source = theme.neovim.theme;
|
||||
home.file."${nixPlugins}/start/teal/lua".source = teal; # teal (typed lua)
|
||||
home.file."${nixPlugins}/start/snippets".source = simlink "${paths.dotfiles}/vscode-snippets";
|
||||
home.file.".config/nvim".source = simlink "${paths.dotfiles}/neovim";
|
||||
# home.file.".config/nvim".source = ../../dotfiles/neovim;
|
||||
|
||||
programs.neovim.enable = false;
|
||||
|
||||
home.packages = [
|
||||
neovim
|
||||
neovide
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{ pkgs, lib, paths, ... }:
|
||||
{
|
||||
home-manager.users.adrielus.services.polybar = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
${pkgs.myThemes.current.polybar.config or ""}
|
||||
include-file = ${paths.dotfiles}/polybar/config.ini
|
||||
'';
|
||||
|
||||
script = ''
|
||||
polybar main &
|
||||
'';
|
||||
};
|
||||
|
||||
home-manager.users.adrielus.xsession = {
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
polybar main &
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
package = pkgs.postgresql_10;
|
||||
enableTCPIP = true;
|
||||
|
||||
authentication = lib.mkForce ''
|
||||
# Generated file; do not edit!
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
local all all trust
|
||||
host all all 127.0.0.1/32 trust
|
||||
host all all ::1/128 trust
|
||||
'';
|
||||
|
||||
initialScript = pkgs.writeText "backend-initScript" ''
|
||||
CREATE ROLE adrielus WITH
|
||||
LOGIN
|
||||
SUPERUSER
|
||||
INHERIT
|
||||
CREATEDB
|
||||
CREATEROLE
|
||||
REPLICATION;
|
||||
|
||||
CREATE DATABASE lunarbox;
|
||||
GRANT ALL PRIVILEGES ON DATABASE lunarbox TO adrielus;
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
theme = pkgs.myThemes.current;
|
||||
rofi = pkgs.rofi.override
|
||||
{
|
||||
plugins = with pkgs;[
|
||||
rofi-power-menu
|
||||
rofi-calc
|
||||
rofi-emoji
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
home-manager.users.adrielus = {
|
||||
home.packages = [ rofi ];
|
||||
home.file.".local/share/rofi/themes".source = theme.rofi.themes or "/home/adrielus/.temp-empty-rofi-themes-directory";
|
||||
|
||||
xdg.configFile."rofi/config.rasi".text = ''
|
||||
@import "${./pre.rasi}"
|
||||
${theme.rofi.config or ""}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
configuration {
|
||||
location: 0;
|
||||
cycle: true;
|
||||
font: "Source Code Pro 16";
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
# Ls but looks nicer
|
||||
ls = "exa -la";
|
||||
|
||||
# What even is this???
|
||||
sl = "sl -e";
|
||||
|
||||
# WIfi stuff
|
||||
wifi = "sudo nmcli con up id";
|
||||
|
||||
# Volume controls
|
||||
"v-up" = "pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"v-down" = "pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"v-min" = "pactl set-sink-volume @DEFAULT_SINK@ 0%";
|
||||
"v-mid" = "pactl set-sink-volume @DEFAULT_SINK@ 50%";
|
||||
"v-max" = "pactl set-sink-volume @DEFAULT_SINK@ 100%";
|
||||
# "v-up" = "amixer set Master 8%+";
|
||||
# "v-down" = "amixer set Master 8%-";
|
||||
# "v-min" = "amixer set Master 0%";
|
||||
# "v-mid" = "amixer set Master 50%";
|
||||
# "v-max" = "amixer set Master 100%";
|
||||
|
||||
# Print available battery
|
||||
battery = "acpi";
|
||||
|
||||
# Rebuuild nixos
|
||||
rebuild = "sudo -u adrielus nixos-rebuild switch --flake ~/Projects/nixos-config/";
|
||||
|
||||
# Render git repo using gource
|
||||
"git-render" = "gource -f -s 1 -c 4 --key";
|
||||
|
||||
# Neovide multigrid by default
|
||||
neovide = "neovide --multigrid";
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
shellInit = ''
|
||||
export GITHUB_TOKEN=$(cat ~/water/gh-token)
|
||||
'';
|
||||
# "neofetch --package_managers on --cpu_brand on --cpu_cores on --memory_percent on --memory_display infobar --os_arch on";
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
{ pkgs, ... }: { imports = [ ./sessionVariables.nix ./fish.nix ]; }
|
|
@ -1,52 +0,0 @@
|
|||
{ lib, pkgs, ... }:
|
||||
let
|
||||
shellAliases = import ./aliases.nix;
|
||||
common = import ./common.nix;
|
||||
|
||||
globalTheme = pkgs.myThemes.current;
|
||||
theme = "dangerous";
|
||||
themePackage = builtins.getAttr theme pkgs.myFishPlugins.themes; # Dynamically pick the theme path
|
||||
|
||||
defaultDangerousColors = "000000 333333 666666 ff4ff0 0088ff ff6600 ff0000 ff0033 3300ff 0000ff 00ffff 00ff00";
|
||||
dangerousColors = globalTheme.fish.dangerousColors or defaultDangerousColors;
|
||||
in
|
||||
{
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
home-manager.users.adrielus = {
|
||||
programs.command-not-found.enable = false;
|
||||
programs.nix-index.enable = true;
|
||||
|
||||
# Source every file in the theme
|
||||
xdg.configFile."fish/conf.d/plugin-${theme}.fish".text = lib.mkAfter ''
|
||||
for f in $plugin_dir/*.fish
|
||||
source $f
|
||||
end
|
||||
'';
|
||||
|
||||
programs.fish = {
|
||||
inherit shellAliases;
|
||||
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
myFishPlugins.z # jump around the file system with ease (might replace with autojump)
|
||||
themePackage # theme
|
||||
];
|
||||
|
||||
shellInit = ''
|
||||
source ${../../../dotfiles/fish/config.fish}
|
||||
|
||||
# Source the entire oh-my-fish lib
|
||||
for f in ${pkgs.myFishPlugins.oh-my-fish}/lib/git/**/*.fish
|
||||
source $f
|
||||
end
|
||||
|
||||
|
||||
${if theme == "dangerous"
|
||||
then "set dangerous_colors ${dangerousColors}"
|
||||
else ""}
|
||||
|
||||
${common.shellInit}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
theme = pkgs.myThemes.current;
|
||||
variables = {
|
||||
# Configure github cli
|
||||
GITHUB_USERNAME = "Mateiadrielrafael";
|
||||
|
||||
# Sets neovim as default editor
|
||||
EDITOR = "nvim";
|
||||
|
||||
PNPM_HOME = "~/.PNPM_HOME";
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [{
|
||||
home-manager.users.adrielus.home.sessionVariables = theme.env or { };
|
||||
}];
|
||||
|
||||
home-manager.users.adrielus.home.sessionVariables = variables;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
# 32 bit stuff
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
|
||||
hardware.pulseaudio.support32Bit = true;
|
||||
|
||||
home-manager.users.adrielus.home.packages = with pkgs; [ steam ];
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
theme = pkgs.myThemes.current;
|
||||
|
||||
fastcopy = pkgs.tmuxPlugins.mkTmuxPlugin
|
||||
{
|
||||
pluginName = "fastcopy";
|
||||
version = "unstable-2022-11-16";
|
||||
src = pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "abhinav";
|
||||
repo = "tmux-fastcopy";
|
||||
sha256 = "1ald4ycgwj1fhk82yvsy951kgnn5im53fhsscz20hvjsqql7j4j3";
|
||||
rev = "41f4c1c9fae7eb05c85ee2e248719f004dcfc90e";
|
||||
};
|
||||
};
|
||||
|
||||
cowboy = pkgs.tmuxPlugins.mkTmuxPlugin
|
||||
{
|
||||
pluginName = "cowboy";
|
||||
version = "unstable-2021-05-11";
|
||||
src = pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "tmux-plugins";
|
||||
repo = "tmux-cowboy";
|
||||
sha256 = "16wqwfaqy7nhiy1ijkng1x4baqq7s9if0m3ffcrnakza69s6r4r8";
|
||||
rev = "75702b6d0a866769dd14f3896e9d19f7e0acd4f2";
|
||||
};
|
||||
};
|
||||
|
||||
muxile = pkgs.callPackage ./tmux/muxile.nix { };
|
||||
in
|
||||
{
|
||||
home-manager.users.adrielus.programs = {
|
||||
tmux = {
|
||||
enable = true;
|
||||
|
||||
clock24 = true; # 24h clock format
|
||||
# terminal = "screen-256color"; # more colors
|
||||
historyLimit = 10000; # increase amount of saved lines
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
# cpu # Show CPU load with easy icons
|
||||
# vim-tmux-navigator # Switch between tmux and vim panes with ease
|
||||
sessionist # Nicer workflow for switching around between session
|
||||
# fastcopy # Easy copying of stuff
|
||||
resurrect # Save / restore tmux sessions
|
||||
# muxile # Track tmux sessions on my phone
|
||||
# cowboy # kill all hanging processes inside pane
|
||||
{
|
||||
plugin = continuum; # start tmux on boot & more
|
||||
extraConfig = ''
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @continuum-boot 'on'
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
# Load current theme
|
||||
source ${theme.tmux.path}
|
||||
|
||||
# load the rest of the config
|
||||
source ${../../dotfiles/tmux/tmux.conf}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let dependencies = [ pkgs.qrencode pkgs.jq pkgs.websocat ];
|
||||
in
|
||||
pkgs.tmuxPlugins.mkTmuxPlugin
|
||||
{
|
||||
pluginName = "muxile";
|
||||
version = "unstable-2021-08-08";
|
||||
src = pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "bjesus";
|
||||
repo = "muxile";
|
||||
sha256 = "12kmcyizzglr4r7nisjbjmwmw1g4hbwpkil53zzmq9wx60l8lwgb";
|
||||
rev = "7310995ed1827844a528a32bb2d3a3694f1c4a0d";
|
||||
};
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postInstall = ''
|
||||
for f in $target/scripts/*.sh; do
|
||||
wrapProgram $f \
|
||||
--prefix PATH : ${lib.makeBinPath dependencies}
|
||||
done
|
||||
'';
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ pkgs, paths, ... }:
|
||||
let vieb = "/home/adrielus/.config/Vieb"; in
|
||||
{
|
||||
home-manager.users.adrielus = {
|
||||
home.packages = [ pkgs.nixos-unstable.vieb ];
|
||||
systemd.user.tmpfiles.rules = [
|
||||
"L+ /home/adrielus/.viebrc - - - - ${paths.dotfiles}/vieb/.viebrc"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home = {
|
||||
file.".wakatime.cfg".source = ./wakatime.cfg;
|
||||
packages = with pkgs; [ wakatime ];
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs; [
|
||||
wineWowPackages.stable
|
||||
winetricks
|
||||
playonlinux
|
||||
];
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
! Remap caps lock to control
|
||||
clear Lock
|
||||
! clear control
|
||||
! add control = Caps_Lock Control_L Control_R
|
||||
! New way of hitting caps lock
|
||||
keycode 66 = Control_L Caps_Lock NoSymbol NoSymbol
|
||||
keycode 0x42 = backslash
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home = {
|
||||
packages = [ pkgs.xorg.xmodmap ];
|
||||
file.".Xmodmap".source = ./.Xmodmap;
|
||||
};
|
||||
services.xserver.displayManager.sessionCommands =
|
||||
"${pkgs.xorg.xmodmap}/bin/xmodmap .Xmodmap";
|
||||
}
|
1
modules/applications/xmonad/.gitignore
vendored
1
modules/applications/xmonad/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
dist-newstyle
|
|
@ -1,116 +0,0 @@
|
|||
{-# LANGUAGE BlockArguments #-}
|
||||
|
||||
import Control.Monad (forM_, join)
|
||||
import Data.Function ((&))
|
||||
import System.Environment
|
||||
import System.Process
|
||||
import XMonad
|
||||
import XMonad.Actions.SpawnOn
|
||||
import XMonad.Config
|
||||
import XMonad.Config.Kde
|
||||
import XMonad.Hooks.EwmhDesktops (ewmh, fullscreenEventHook)
|
||||
import XMonad.Hooks.ManageDocks
|
||||
import XMonad.Layout.NoBorders
|
||||
import XMonad.Layout.Spacing
|
||||
import XMonad.Layout.ThreeColumns
|
||||
import XMonad.Operations
|
||||
import XMonad.Util.EZConfig
|
||||
|
||||
kdeOn :: Bool
|
||||
kdeOn = False
|
||||
|
||||
-- startingConfig = if kdeOn then kdeConfig else defaultConfig
|
||||
|
||||
main =
|
||||
xmonad $
|
||||
ewmh $
|
||||
docks $
|
||||
def
|
||||
{ modMask = mod4Mask,
|
||||
layoutHook = myLayoutHook,
|
||||
startupHook = startup,
|
||||
manageHook = manageDocks <+> manageSpawn <+> myManagerHook <+> manageHook kdeConfig,
|
||||
handleEventHook = handleEventHook kdeConfig <+> fullscreenEventHook,
|
||||
terminal = myTerminal,
|
||||
workspaces = myWorkspaces,
|
||||
borderWidth = 5,
|
||||
focusedBorderColor = "#4c4f69",
|
||||
normalBorderColor = "#4c4f69"
|
||||
}
|
||||
`additionalKeysP` keymap
|
||||
where
|
||||
myWorkspaces =
|
||||
["1:dev", "2:browser", "3:chat", "4:reading", "5", "6"]
|
||||
|
||||
appWorkspaceConfig =
|
||||
[ (3, "Discord"),
|
||||
(4, "alacritty"),
|
||||
(2, "google-chrome-stable")
|
||||
]
|
||||
|
||||
manageWorkspaces =
|
||||
appWorkspaceConfig
|
||||
& fmap \(workspaceId, name) -> do
|
||||
let workspaceName = myWorkspaces !! (workspaceId - 1)
|
||||
className =? name --> doShift workspaceName
|
||||
|
||||
kdeFloats =
|
||||
[ "yakuake",
|
||||
"Yakuake",
|
||||
"Kmix",
|
||||
"kmix",
|
||||
"plasma",
|
||||
"Plasma",
|
||||
"plasma-desktop",
|
||||
"Plasma-desktop",
|
||||
"krunner",
|
||||
"ksplashsimple",
|
||||
"ksplashqml",
|
||||
"ksplashx"
|
||||
]
|
||||
|
||||
floatKdeStuff = [className =? name --> doFloat | name <- kdeFloats]
|
||||
|
||||
myManagerHook =
|
||||
composeAll $
|
||||
concat
|
||||
[ if kdeOn then floatKdeStuff else [],
|
||||
manageWorkspaces
|
||||
]
|
||||
|
||||
myTerminal = "alacritty"
|
||||
myBrowser = "google-chrome-stable"
|
||||
|
||||
-- TODO: find a way to bind all the program-opening-keybindings to a single sub-map
|
||||
keymap =
|
||||
[ ("M-p", spawn "rofi -show drun"),
|
||||
("M-w", spawn "rofi -show window"),
|
||||
("M-g", spawn myBrowser),
|
||||
("M-d", spawn "Discord"),
|
||||
("M-v", spawn "alacritty -e vimclip"),
|
||||
("M-s", spawn "spectacle -rcb"),
|
||||
("M-S-s", spawn "spectacle -mcb"),
|
||||
("M-C-s", spawn "spectacle -ucb"),
|
||||
("M-c", kill)
|
||||
]
|
||||
|
||||
uniformBorder = join $ join $ join Border
|
||||
border = uniformBorder 0
|
||||
spacingHook = spacingRaw False border False border True
|
||||
|
||||
tall = Tall 1 (3 / 100) (1 / 2)
|
||||
threeCols = ThreeCol 1 (3 / 100) (1 / 2)
|
||||
|
||||
layouts = tall ||| threeCols ||| Full
|
||||
myLayoutHook = desktopLayoutModifiers $ spacingHook layouts
|
||||
|
||||
startupApps =
|
||||
[ (0, "alacritty"),
|
||||
(1, "google-chrome-stable"),
|
||||
(2, "Discord")
|
||||
]
|
||||
|
||||
startup :: X ()
|
||||
startup = do
|
||||
forM_ startupApps \(index, app) -> do
|
||||
spawnOn (myWorkspaces !! index) app
|
|
@ -1,15 +0,0 @@
|
|||
cabal-version: 2.4
|
||||
name: xmonad-config
|
||||
version: 0.1.0.0
|
||||
author: Matei Adriel
|
||||
maintainer: rafaeladriel11@gmail.com
|
||||
-- The license under which the package is released.
|
||||
-- license:
|
||||
|
||||
executable xmonad-config
|
||||
main-is: Main.hs
|
||||
build-depends:
|
||||
, base
|
||||
, xmonad
|
||||
, X11
|
||||
default-language: Haskell2010
|
|
@ -1,19 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
theme = pkgs.myThemes.current;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
{
|
||||
home-manager.users.adrielus.programs.zathura.enable = true;
|
||||
}
|
||||
];
|
||||
home-manager.users.adrielus = lib.mkIf theme.zathura.enable {
|
||||
xdg.configFile."zathura/${theme.zathura.name}".source = theme.zathura.theme;
|
||||
programs.zathura = {
|
||||
extraConfig = ''
|
||||
include ${theme.zathura.name}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
# Taken from https://nixos.wiki/wiki/Bluetooth
|
||||
{ pkgs, ... }: {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
|
||||
# TODO: investigate why this does not work
|
||||
# systemd.user.services.mpris-proxy = {
|
||||
# Unit.Description = "Mpris proxy";
|
||||
# Unit.After = [ "network.target" "sound.target" ];
|
||||
# Service.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
||||
# Install.WantedBy = [ "default.target" ];
|
||||
# };
|
||||
|
||||
hardware = {
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
|
||||
# NixOS allows either a lightweight build (default) or full build of PulseAudio to be installed.
|
||||
# Only the full build has Bluetooth support, so it must be selected here.
|
||||
package = pkgs.pulseaudioFull;
|
||||
|
||||
# Extra codecs
|
||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
||||
|
||||
configFile = pkgs.writeText "default.pa" ''
|
||||
load-module module-bluetooth-policy
|
||||
load-module module-bluetooth-discover
|
||||
## module fails to load with
|
||||
## module-bluez5-device.c: Failed to get device path from module arguments
|
||||
## module.c: Failed to load module "module-bluez5-device" (argument: ""): initialization failed.
|
||||
load-module module-bluez5-device
|
||||
# load-module module-bluez5-discover
|
||||
'';
|
||||
|
||||
extraConfig = ''
|
||||
load-module module-switch-on-connect
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./dev
|
||||
./applications
|
||||
./themes
|
||||
./overlays
|
||||
./meta
|
||||
|
||||
./network.nix
|
||||
./xserver.nix
|
||||
./users.nix
|
||||
./nix.nix
|
||||
./printers.nix
|
||||
# ./bluetooth.nix
|
||||
];
|
||||
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = [ pkgs.agda ];
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs; [ gcc ];
|
||||
imports = [
|
||||
./nix.nix
|
||||
./purescript.nix
|
||||
./javascript.nix
|
||||
./rust.nix
|
||||
./dhall.nix
|
||||
./haskell
|
||||
./fsharp.nix
|
||||
./kotlin.nix
|
||||
# ./racket.nix
|
||||
# ./elm.nix
|
||||
|
||||
# Proof assistants
|
||||
# ./agda.nix
|
||||
# ./idris.nix
|
||||
./lean.nix
|
||||
];
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs.easy-dhall-nix; [
|
||||
dhall-simple
|
||||
dhall-json-simple
|
||||
dhall-bash-simple
|
||||
dhall-nix-simple
|
||||
dhall-yaml-simple
|
||||
dhall-lsp-simple
|
||||
];
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs;
|
||||
with elmPackages; [
|
||||
elm
|
||||
elm-format
|
||||
# elm-repl
|
||||
];
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs; [
|
||||
dotnet-sdk
|
||||
mono
|
||||
packet
|
||||
];
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# Use more recent ghc versions
|
||||
# nixpkgs.overlays = [
|
||||
# (self: super: {
|
||||
# haskell.compiler.ghc902 = self.unstable.haskell.compiler.ghc902;
|
||||
# })
|
||||
# ];
|
||||
|
||||
home-manager.users.adrielus.home = {
|
||||
file.".ghci".source = ./ghci;
|
||||
|
||||
packages = with pkgs;
|
||||
[ ghc ghcid hlint cabal-install stack ]
|
||||
|
||||
++ (with haskellPackages; [ hoogle hpack ]);
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
:def paste \_ -> do { paste <- System.Process.readProcess "pbpaste" [] ""; let cmd = if '\n' `elem` paste then ":{\ntype Ö = ()\n" ++ paste ++ "\n:}" else paste in putStrLn ("\SOH\ESC[33m\STX" ++ paste ++ "\SOH\ESC[0m\STX") >> return (":cmd return " ++ show cmd) }
|
||||
:def paste-quiet \_ -> do { paste <- System.Process.readProcess "pbpaste" [] ""; let cmd = if '\n' `elem` paste then ":{\ntype Ö = ()\n" ++ paste ++ "\n:}" else paste in return (":cmd return " ++ show cmd) }
|
||||
|
||||
:def hoogle \str -> return $ ":! hoogle search --color --count=10 " ++ show str
|
||||
:def hoogle-all \str -> return $ ":! hoogle search --color " ++ show str
|
||||
:def doc \str -> return $ ":! hoogle search --color --info " ++ show str
|
||||
|
||||
-- :def pointfree \str -> return $ ":! pointfree " ++ show str
|
||||
-- :def pf \str -> return $ ":! pointfree " ++ show str
|
||||
-- :def pointful \str -> return $ ":! pointful " ++ show str
|
|
@ -1,5 +0,0 @@
|
|||
templates:
|
||||
params:
|
||||
author-name: "Matei Adriel"
|
||||
author-email: "rafaeladriel11@gmail.com"
|
||||
github-username: "Mateiadrielrafael"
|
|
@ -1,9 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus = {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
idris2
|
||||
idris2-pkgs.lsp # idris2
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
node = pkgs.nodejs;
|
||||
yarn = pkgs.yarn.override { nodejs = node; };
|
||||
in
|
||||
{
|
||||
|
||||
home-manager.users.adrielus.home.packages = with pkgs;
|
||||
with nodePackages; [
|
||||
node
|
||||
deno
|
||||
node2nix
|
||||
|
||||
unstable.nodePackages.pnpm
|
||||
yarn
|
||||
|
||||
# TODO: find a good way to reinstall some of these
|
||||
/* tsdx
|
||||
mklicense
|
||||
preact-cli
|
||||
create-next-app
|
||||
create-snowpack-app
|
||||
bower
|
||||
*/
|
||||
];
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus = {
|
||||
home.packages = with pkgs; [
|
||||
kotlin
|
||||
gradle
|
||||
jdk
|
||||
android-studio
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs; [
|
||||
unstable.elan # lean version manager
|
||||
];
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs;
|
||||
[
|
||||
nixfmt
|
||||
];
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs.unstable; [
|
||||
purescript
|
||||
spago
|
||||
# haskellPackages.zephyr
|
||||
# purty # purescript formatter
|
||||
# purs-tidy # purescript formatter
|
||||
# pscid
|
||||
# pulp
|
||||
# psa
|
||||
];
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs; [ racket ];
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.users.adrielus.home.packages = with pkgs; [ rustup rust-analyzer ];
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
{ fetchFromGitHub, ... }: {
|
||||
vimPlugins = {
|
||||
kmonad = fetchFromGitHub {
|
||||
owner = "kmonad";
|
||||
repo = "kmonad-vim";
|
||||
rev = "37978445197ab00edeb5b731e9ca90c2b141723f";
|
||||
sha256 = "13p3i0b8azkmhafyv8hc4hav1pmgqg52xzvk2a3gp3ppqqx9bwpc";
|
||||
};
|
||||
|
||||
};
|
||||
fishPlugins = {
|
||||
z = fetchFromGitHub {
|
||||
owner = "jethrokuan";
|
||||
repo = "z";
|
||||
rev = "85f863f20f24faf675827fb00f3a4e15c7838d76";
|
||||
sha256 = "1kaa0k9d535jnvy8vnyxd869jgs0ky6yg55ac1mxcxm8n0rh2mgq";
|
||||
};
|
||||
|
||||
themes = {
|
||||
agnoster = fetchFromGitHub {
|
||||
owner = "oh-my-fish";
|
||||
repo = "theme-agnoster";
|
||||
rev = "c142e802983bd1b34b4d91efac2126fc5913126d";
|
||||
sha256 = "060yydkxmvmlzq2236pjqfmpgvm3g1085c5yzilq0nl1dvmz3wnh";
|
||||
};
|
||||
|
||||
harleen = fetchFromGitHub {
|
||||
owner = "aneveux";
|
||||
repo = "theme-harleen";
|
||||
rev = "caf53d792038e78faa7b6b6b98669abc171c5e64";
|
||||
sha256 = "1450qrkdmqxk686c7vpimcydwj9z9a7w7sripfpjzkq6np5s6w8c";
|
||||
};
|
||||
|
||||
dangerous = fetchFromGitHub {
|
||||
owner = "oh-my-fish";
|
||||
repo = "theme-dangerous";
|
||||
rev = "3cdfc82060ba280b44f1f0c6616675f36a275467";
|
||||
sha256 = "1xxy0b6rnvsfbaa6v7p0fsxi8l161sv4fq49ahra2hf5gzax4xis";
|
||||
};
|
||||
};
|
||||
|
||||
oh-my-fish = fetchFromGitHub {
|
||||
owner = "oh-my-fish";
|
||||
repo = "oh-my-fish";
|
||||
rev = "d428b723c8c18fef3b2a00b8b8b731177f483ad8";
|
||||
sha256 = "0n5a8v9kn4xmmi7app6c4wvpjfv6b3vhj7rhljaf9vny8cl2vhls";
|
||||
};
|
||||
};
|
||||
|
||||
sddm-theme-chili = fetchFromGitHub {
|
||||
owner = "MarianArlt";
|
||||
repo = "sddm-chili";
|
||||
rev = "6516d50176c3b34df29003726ef9708813d06271";
|
||||
sha256 = "036fxsa7m8ymmp3p40z671z163y6fcsa9a641lrxdrw225ssq5f3";
|
||||
};
|
||||
|
||||
easy-dhall-nix = fetchFromGitHub {
|
||||
owner = "justinwoo";
|
||||
repo = "easy-dhall-nix";
|
||||
rev = "dce9acbb99776a7f1344db4751d6080380f76f57";
|
||||
sha256 = "0ckp6515gfvbxm08yyll87d9vg8sq2l21gwav2npzvwc3xz2lccf";
|
||||
};
|
||||
|
||||
easy-purescript-nix = fetchFromGitHub {
|
||||
owner = "justinwoo";
|
||||
repo = "easy-purescript-nix";
|
||||
rev = "3d8b602e80c0fa7d97d7f03cb8e2f8b06967d509";
|
||||
sha256 = "0kvnsc4j0h8qvv69613781i2qy51rcbmv5ga8j21nsqzy3l8fd9w";
|
||||
};
|
||||
|
||||
githubNvimTheme = fetchFromGitHub {
|
||||
owner = "projekt0n";
|
||||
repo = "github-nvim-theme";
|
||||
rev = "b3f15193d1733cc4e9c9fe65fbfec329af4bdc2a";
|
||||
sha256 = "0vnizbmzf42h3idm35nrcv4g2aigvgmgb80qk5s4xq1513bzrdf0";
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ lib, ... }: {
|
||||
mergeLines = lib.lists.foldr
|
||||
(a: b: ''
|
||||
${a}
|
||||
${b}
|
||||
'') "";
|
||||
|
||||
unwords = lib.lists.foldr (a: b: ''${a} ${b}'') "";
|
||||
}
|
5
modules/home-manager/default.nix
Normal file
5
modules/home-manager/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
# (https://nixos.wiki/wiki/Module).
|
||||
|
||||
{
|
||||
# example = import ./example.nix;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
home-manager.sharedModules = [ ./simlink.nix ];
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
# This is a home-manager config!!!
|
||||
{ pkgs, lib, config, ... }: with lib; {
|
||||
options.home.sfile = mkOption {
|
||||
description = "Attribute set of files to link into the user home without placing them into the store first";
|
||||
default = { };
|
||||
type = types.attrsOf types.string;
|
||||
};
|
||||
config.systemd.user.tmpfiles.rules = mapAttrsToList
|
||||
(name: value:
|
||||
"L+ ${name} - - - - ${value}"
|
||||
)
|
||||
config.home.sfile;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ ... }: {
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
hostName = "nixos";
|
||||
|
||||
useDHCP = false;
|
||||
interfaces.enp1s0.useDHCP = true;
|
||||
interfaces.wlp0s20f3.useDHCP = true;
|
||||
};
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
{ pkgs, inputs, lib, config, ... }: {
|
||||
nix = {
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
|
||||
# Protect nix-shell from garbage collection
|
||||
# TODO: look into whether this is still needed when using nix flakes
|
||||
extraOptions = ''
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
# This will add each flake input as a registry
|
||||
# To make nix3 commands consistent with your flake
|
||||
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
|
||||
|
||||
# This will additionally add your inputs to the system's legacy channels
|
||||
# Making legacy nix commands consistent as well, awesome!
|
||||
# nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
settings = {
|
||||
trusted-users = [ "root" "adrielus" "@wheel" ];
|
||||
|
||||
auto-optimise-store = true;
|
||||
|
||||
# Caching and whatnot
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cm-idris2-pkgs.cachix.org"
|
||||
"https://danth.cachix.org"
|
||||
# "https://all-hies.cachix.org" # Do I even use all-hies anymore?
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cm-idris2-pkgs.cachix.org-1:YB2oJSEsD5oMJjAESxolC2GQtE6B5I6jkWhte2gtXjk="
|
||||
"danth.cachix.org-1:wpodfSL7suXRc/rJDZZUptMa1t4MJ795hemRN0q84vI="
|
||||
# "all-hies.cachix.org-1:JjrzAOEUsD9ZMt8fdFbzo3jNAyEWlPAwdVuHw4RD43k="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
5
modules/nixos/default.nix
Normal file
5
modules/nixos/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
# (https://nixos.wiki/wiki/Module).
|
||||
|
||||
{
|
||||
# example = import ./example.nix;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
nixpkgs.overlays = [
|
||||
(import ./tweakSources.nix)
|
||||
(import ./npm.nix)
|
||||
((import ./myPackages.nix) {
|
||||
inherit lib;
|
||||
}) # Requires lib access
|
||||
(import ./vimclip)
|
||||
|
||||
# I hope this works (spoiler: it did not)
|
||||
# (import ./edopro)
|
||||
];
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
self: super: { edopro = self.callPackage (import ./edopro.nix) { }; }
|
|
@ -1,23 +0,0 @@
|
|||
{ pkgs ? import <nixpkgs>, ... }:
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "edopro";
|
||||
version = "39.2.0";
|
||||
rev = "20210927";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url =
|
||||
"https://github.com/ProjectIgnis/edopro-assets/releases/download/${rev}/ProjectIgnis-EDOPro-${version}-linux.tar.gz";
|
||||
sha256 = "OQSWTuRaTyr2XIDjSbIvrV11LJCpOmw5aOjHU2ji+kI=";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgs.mono ];
|
||||
configurePhase = "";
|
||||
buildPhase = "";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
ls
|
||||
chmod +x ./EDOPro
|
||||
mv ./* $out/bin/
|
||||
'';
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
{ system }:
|
||||
{ home-manager
|
||||
# nixos stuff
|
||||
, nixpkgs
|
||||
, nixpkgs-unstable
|
||||
, nixos-unstable
|
||||
, ...
|
||||
}: self: super:
|
||||
let
|
||||
foreign = self.callPackage (import ../foreign.nix) { };
|
||||
in
|
||||
{
|
||||
unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
config.allowBroken = true;
|
||||
};
|
||||
|
||||
nixos-unstable = import nixos-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
config.allowBroken = true;
|
||||
};
|
||||
|
||||
easy-purescript-nix = self.callPackage foreign.easy-purescript-nix { };
|
||||
easy-dhall-nix = self.callPackage foreign.easy-dhall-nix { };
|
||||
|
||||
myFishPlugins = {
|
||||
oh-my-fish = foreign.fishPlugins.oh-my-fish;
|
||||
|
||||
z = {
|
||||
src = foreign.fishPlugins.z;
|
||||
name = "z";
|
||||
};
|
||||
|
||||
themes = {
|
||||
agnoster = {
|
||||
src = foreign.fishPlugins.themes.agnoster;
|
||||
name = "agnoster";
|
||||
};
|
||||
|
||||
dangerous = {
|
||||
src = foreign.fishPlugins.themes.dangerous;
|
||||
name = "dangerous";
|
||||
};
|
||||
|
||||
harleen = {
|
||||
src = foreign.fishPlugins.themes.harleen;
|
||||
name = "harleen";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
# Vim plugins
|
||||
myVimPlugins = {
|
||||
githubNvimTheme = foreign.githubNvimTheme;
|
||||
};
|
||||
|
||||
sddm-theme-chili = foreign.sddm-theme-chili;
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
{ ... }:
|
||||
let
|
||||
imports = import ../../nix/sources.nix;
|
||||
edoproPackage = import ./../applications/edopro.nix;
|
||||
unstable = import imports.nixpkgs-unstable {
|
||||
config.allowUnfree = true;
|
||||
config.allowBroken = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(self: super:
|
||||
with self; rec {
|
||||
inherit imports;
|
||||
inherit unstable;
|
||||
|
||||
inherit (import imports.niv { }) niv;
|
||||
|
||||
cached-nix-shell = callPackage imports.cached-nix-shell { };
|
||||
easy-purescript-nix = callPackage imports.easy-purescript-nix { };
|
||||
easy-dhall-nix = callPackage imports.easy-dhall-nix { };
|
||||
|
||||
# This is a derivation I made myself for edopro
|
||||
edopro = callPackage edoproPackage { };
|
||||
|
||||
all-hies = import imports.all-hies { };
|
||||
snack = (import imports.snack).snack-exe;
|
||||
|
||||
# unstable stuff
|
||||
brave = unstable.brave;
|
||||
idris2 = unstable.idris2;
|
||||
ngrok = unstable.ngrok;
|
||||
vscodium = unstable.vscodium;
|
||||
vscode = unstable.vscode;
|
||||
docker-compose = unstable.docker-compose;
|
||||
deno = unstable.deno;
|
||||
dotnet-sdk = unstable.dotnet-sdk_5;
|
||||
elm-repl = unstable.haskellPackages.elm-repl;
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{ lib, ... }:
|
||||
self: super:
|
||||
let
|
||||
allThemes = self.callPackage (import ../themes/themes.nix) { };
|
||||
# currentTheme = "github-light";
|
||||
currentTheme = "catppuccin-latte";
|
||||
in
|
||||
with self; {
|
||||
myHelpers = self.callPackage (import ../helpers.nix) { };
|
||||
myThemes = {
|
||||
all = allThemes;
|
||||
current = lib.lists.findFirst (theme: theme.name == currentTheme)
|
||||
(throw ''
|
||||
Theme "${currentTheme}" not found.
|
||||
Available themes are:
|
||||
${lib.lists.foldr (current: prev: if prev == ""
|
||||
then current.name
|
||||
else "${current.name}, ${prev}") "" allThemes}
|
||||
'')
|
||||
allThemes;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
self: super:
|
||||
|
||||
let
|
||||
node = self.nodejs-18_x;
|
||||
customPackages = (import ./npm) { nodejs = node; pkgs = self; };
|
||||
in
|
||||
with self; {
|
||||
nodejs = node;
|
||||
|
||||
# Faster prettier for editors
|
||||
prettierd = customPackages."@fsouza/prettierd";
|
||||
|
||||
# I need this for the css lang server thingy
|
||||
vscode-langservers-extracted = customPackages."vscode-langservers-extracted";
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
# This file has been generated by node2nix 1.11.1. Do not edit!
|
||||
|
||||
{pkgs ? import <nixpkgs> {
|
||||
inherit system;
|
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
|
||||
|
||||
let
|
||||
nodeEnv = import ./node-env.nix {
|
||||
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
|
||||
inherit pkgs nodejs;
|
||||
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
|
||||
};
|
||||
in
|
||||
import ./node-packages.nix {
|
||||
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
|
||||
inherit nodeEnv;
|
||||
}
|
|
@ -1,598 +0,0 @@
|
|||
# This file originates from node2nix
|
||||
|
||||
{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile, writeShellScript}:
|
||||
|
||||
let
|
||||
# Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master
|
||||
utillinux = if pkgs ? utillinux then pkgs.utillinux else pkgs.util-linux;
|
||||
|
||||
python = if nodejs ? python then nodejs.python else python2;
|
||||
|
||||
# Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
|
||||
tarWrapper = runCommand "tarWrapper" {} ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
cat > $out/bin/tar <<EOF
|
||||
#! ${stdenv.shell} -e
|
||||
$(type -p tar) "\$@" --warning=no-unknown-keyword --delay-directory-restore
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/tar
|
||||
'';
|
||||
|
||||
# Function that generates a TGZ file from a NPM project
|
||||
buildNodeSourceDist =
|
||||
{ name, version, src, ... }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "node-tarball-${name}-${version}";
|
||||
inherit src;
|
||||
buildInputs = [ nodejs ];
|
||||
buildPhase = ''
|
||||
export HOME=$TMPDIR
|
||||
tgzFile=$(npm pack | tail -n 1) # Hooks to the pack command will add output (https://docs.npmjs.com/misc/scripts)
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/tarballs
|
||||
mv $tgzFile $out/tarballs
|
||||
mkdir -p $out/nix-support
|
||||
echo "file source-dist $out/tarballs/$tgzFile" >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
};
|
||||
|
||||
# Common shell logic
|
||||
installPackage = writeShellScript "install-package" ''
|
||||
installPackage() {
|
||||
local packageName=$1 src=$2
|
||||
|
||||
local strippedName
|
||||
|
||||
local DIR=$PWD
|
||||
cd $TMPDIR
|
||||
|
||||
unpackFile $src
|
||||
|
||||
# Make the base dir in which the target dependency resides first
|
||||
mkdir -p "$(dirname "$DIR/$packageName")"
|
||||
|
||||
if [ -f "$src" ]
|
||||
then
|
||||
# Figure out what directory has been unpacked
|
||||
packageDir="$(find . -maxdepth 1 -type d | tail -1)"
|
||||
|
||||
# Restore write permissions to make building work
|
||||
find "$packageDir" -type d -exec chmod u+x {} \;
|
||||
chmod -R u+w "$packageDir"
|
||||
|
||||
# Move the extracted tarball into the output folder
|
||||
mv "$packageDir" "$DIR/$packageName"
|
||||
elif [ -d "$src" ]
|
||||
then
|
||||
# Get a stripped name (without hash) of the source directory.
|
||||
# On old nixpkgs it's already set internally.
|
||||
if [ -z "$strippedName" ]
|
||||
then
|
||||
strippedName="$(stripHash $src)"
|
||||
fi
|
||||
|
||||
# Restore write permissions to make building work
|
||||
chmod -R u+w "$strippedName"
|
||||
|
||||
# Move the extracted directory into the output folder
|
||||
mv "$strippedName" "$DIR/$packageName"
|
||||
fi
|
||||
|
||||
# Change to the package directory to install dependencies
|
||||
cd "$DIR/$packageName"
|
||||
}
|
||||
'';
|
||||
|
||||
# Bundle the dependencies of the package
|
||||
#
|
||||
# Only include dependencies if they don't exist. They may also be bundled in the package.
|
||||
includeDependencies = {dependencies}:
|
||||
lib.optionalString (dependencies != []) (
|
||||
''
|
||||
mkdir -p node_modules
|
||||
cd node_modules
|
||||
''
|
||||
+ (lib.concatMapStrings (dependency:
|
||||
''
|
||||
if [ ! -e "${dependency.packageName}" ]; then
|
||||
${composePackage dependency}
|
||||
fi
|
||||
''
|
||||
) dependencies)
|
||||
+ ''
|
||||
cd ..
|
||||
''
|
||||
);
|
||||
|
||||
# Recursively composes the dependencies of a package
|
||||
composePackage = { name, packageName, src, dependencies ? [], ... }@args:
|
||||
builtins.addErrorContext "while evaluating node package '${packageName}'" ''
|
||||
installPackage "${packageName}" "${src}"
|
||||
${includeDependencies { inherit dependencies; }}
|
||||
cd ..
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
'';
|
||||
|
||||
pinpointDependencies = {dependencies, production}:
|
||||
let
|
||||
pinpointDependenciesFromPackageJSON = writeTextFile {
|
||||
name = "pinpointDependencies.js";
|
||||
text = ''
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
function resolveDependencyVersion(location, name) {
|
||||
if(location == process.env['NIX_STORE']) {
|
||||
return null;
|
||||
} else {
|
||||
var dependencyPackageJSON = path.join(location, "node_modules", name, "package.json");
|
||||
|
||||
if(fs.existsSync(dependencyPackageJSON)) {
|
||||
var dependencyPackageObj = JSON.parse(fs.readFileSync(dependencyPackageJSON));
|
||||
|
||||
if(dependencyPackageObj.name == name) {
|
||||
return dependencyPackageObj.version;
|
||||
}
|
||||
} else {
|
||||
return resolveDependencyVersion(path.resolve(location, ".."), name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function replaceDependencies(dependencies) {
|
||||
if(typeof dependencies == "object" && dependencies !== null) {
|
||||
for(var dependency in dependencies) {
|
||||
var resolvedVersion = resolveDependencyVersion(process.cwd(), dependency);
|
||||
|
||||
if(resolvedVersion === null) {
|
||||
process.stderr.write("WARNING: cannot pinpoint dependency: "+dependency+", context: "+process.cwd()+"\n");
|
||||
} else {
|
||||
dependencies[dependency] = resolvedVersion;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Read the package.json configuration */
|
||||
var packageObj = JSON.parse(fs.readFileSync('./package.json'));
|
||||
|
||||
/* Pinpoint all dependencies */
|
||||
replaceDependencies(packageObj.dependencies);
|
||||
if(process.argv[2] == "development") {
|
||||
replaceDependencies(packageObj.devDependencies);
|
||||
}
|
||||
replaceDependencies(packageObj.optionalDependencies);
|
||||
|
||||
/* Write the fixed package.json file */
|
||||
fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2));
|
||||
'';
|
||||
};
|
||||
in
|
||||
''
|
||||
node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"}
|
||||
|
||||
${lib.optionalString (dependencies != [])
|
||||
''
|
||||
if [ -d node_modules ]
|
||||
then
|
||||
cd node_modules
|
||||
${lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies}
|
||||
cd ..
|
||||
fi
|
||||
''}
|
||||
'';
|
||||
|
||||
# Recursively traverses all dependencies of a package and pinpoints all
|
||||
# dependencies in the package.json file to the versions that are actually
|
||||
# being used.
|
||||
|
||||
pinpointDependenciesOfPackage = { packageName, dependencies ? [], production ? true, ... }@args:
|
||||
''
|
||||
if [ -d "${packageName}" ]
|
||||
then
|
||||
cd "${packageName}"
|
||||
${pinpointDependencies { inherit dependencies production; }}
|
||||
cd ..
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
fi
|
||||
'';
|
||||
|
||||
# Extract the Node.js source code which is used to compile packages with
|
||||
# native bindings
|
||||
nodeSources = runCommand "node-sources" {} ''
|
||||
tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
|
||||
mv node-* $out
|
||||
'';
|
||||
|
||||
# Script that adds _integrity fields to all package.json files to prevent NPM from consulting the cache (that is empty)
|
||||
addIntegrityFieldsScript = writeTextFile {
|
||||
name = "addintegrityfields.js";
|
||||
text = ''
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
function augmentDependencies(baseDir, dependencies) {
|
||||
for(var dependencyName in dependencies) {
|
||||
var dependency = dependencies[dependencyName];
|
||||
|
||||
// Open package.json and augment metadata fields
|
||||
var packageJSONDir = path.join(baseDir, "node_modules", dependencyName);
|
||||
var packageJSONPath = path.join(packageJSONDir, "package.json");
|
||||
|
||||
if(fs.existsSync(packageJSONPath)) { // Only augment packages that exist. Sometimes we may have production installs in which development dependencies can be ignored
|
||||
console.log("Adding metadata fields to: "+packageJSONPath);
|
||||
var packageObj = JSON.parse(fs.readFileSync(packageJSONPath));
|
||||
|
||||
if(dependency.integrity) {
|
||||
packageObj["_integrity"] = dependency.integrity;
|
||||
} else {
|
||||
packageObj["_integrity"] = "sha1-000000000000000000000000000="; // When no _integrity string has been provided (e.g. by Git dependencies), add a dummy one. It does not seem to harm and it bypasses downloads.
|
||||
}
|
||||
|
||||
if(dependency.resolved) {
|
||||
packageObj["_resolved"] = dependency.resolved; // Adopt the resolved property if one has been provided
|
||||
} else {
|
||||
packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories.
|
||||
}
|
||||
|
||||
if(dependency.from !== undefined) { // Adopt from property if one has been provided
|
||||
packageObj["_from"] = dependency.from;
|
||||
}
|
||||
|
||||
fs.writeFileSync(packageJSONPath, JSON.stringify(packageObj, null, 2));
|
||||
}
|
||||
|
||||
// Augment transitive dependencies
|
||||
if(dependency.dependencies !== undefined) {
|
||||
augmentDependencies(packageJSONDir, dependency.dependencies);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(fs.existsSync("./package-lock.json")) {
|
||||
var packageLock = JSON.parse(fs.readFileSync("./package-lock.json"));
|
||||
|
||||
if(![1, 2].includes(packageLock.lockfileVersion)) {
|
||||
process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if(packageLock.dependencies !== undefined) {
|
||||
augmentDependencies(".", packageLock.dependencies);
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# Reconstructs a package-lock file from the node_modules/ folder structure and package.json files with dummy sha1 hashes
|
||||
reconstructPackageLock = writeTextFile {
|
||||
name = "addintegrityfields.js";
|
||||
text = ''
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
var packageObj = JSON.parse(fs.readFileSync("package.json"));
|
||||
|
||||
var lockObj = {
|
||||
name: packageObj.name,
|
||||
version: packageObj.version,
|
||||
lockfileVersion: 1,
|
||||
requires: true,
|
||||
dependencies: {}
|
||||
};
|
||||
|
||||
function augmentPackageJSON(filePath, dependencies) {
|
||||
var packageJSON = path.join(filePath, "package.json");
|
||||
if(fs.existsSync(packageJSON)) {
|
||||
var packageObj = JSON.parse(fs.readFileSync(packageJSON));
|
||||
dependencies[packageObj.name] = {
|
||||
version: packageObj.version,
|
||||
integrity: "sha1-000000000000000000000000000=",
|
||||
dependencies: {}
|
||||
};
|
||||
processDependencies(path.join(filePath, "node_modules"), dependencies[packageObj.name].dependencies);
|
||||
}
|
||||
}
|
||||
|
||||
function processDependencies(dir, dependencies) {
|
||||
if(fs.existsSync(dir)) {
|
||||
var files = fs.readdirSync(dir);
|
||||
|
||||
files.forEach(function(entry) {
|
||||
var filePath = path.join(dir, entry);
|
||||
var stats = fs.statSync(filePath);
|
||||
|
||||
if(stats.isDirectory()) {
|
||||
if(entry.substr(0, 1) == "@") {
|
||||
// When we encounter a namespace folder, augment all packages belonging to the scope
|
||||
var pkgFiles = fs.readdirSync(filePath);
|
||||
|
||||
pkgFiles.forEach(function(entry) {
|
||||
if(stats.isDirectory()) {
|
||||
var pkgFilePath = path.join(filePath, entry);
|
||||
augmentPackageJSON(pkgFilePath, dependencies);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
augmentPackageJSON(filePath, dependencies);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
processDependencies("node_modules", lockObj.dependencies);
|
||||
|
||||
fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2));
|
||||
'';
|
||||
};
|
||||
|
||||
prepareAndInvokeNPM = {packageName, bypassCache, reconstructLock, npmFlags, production}:
|
||||
let
|
||||
forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com";
|
||||
in
|
||||
''
|
||||
# Pinpoint the versions of all dependencies to the ones that are actually being used
|
||||
echo "pinpointing versions of dependencies..."
|
||||
source $pinpointDependenciesScriptPath
|
||||
|
||||
# Patch the shebangs of the bundled modules to prevent them from
|
||||
# calling executables outside the Nix store as much as possible
|
||||
patchShebangs .
|
||||
|
||||
# Deploy the Node.js package by running npm install. Since the
|
||||
# dependencies have been provided already by ourselves, it should not
|
||||
# attempt to install them again, which is good, because we want to make
|
||||
# it Nix's responsibility. If it needs to install any dependencies
|
||||
# anyway (e.g. because the dependency parameters are
|
||||
# incomplete/incorrect), it fails.
|
||||
#
|
||||
# The other responsibilities of NPM are kept -- version checks, build
|
||||
# steps, postprocessing etc.
|
||||
|
||||
export HOME=$TMPDIR
|
||||
cd "${packageName}"
|
||||
runHook preRebuild
|
||||
|
||||
${lib.optionalString bypassCache ''
|
||||
${lib.optionalString reconstructLock ''
|
||||
if [ -f package-lock.json ]
|
||||
then
|
||||
echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!"
|
||||
echo "This will most likely result in version mismatches! We will remove the lock file and regenerate it!"
|
||||
rm package-lock.json
|
||||
else
|
||||
echo "No package-lock.json file found, reconstructing..."
|
||||
fi
|
||||
|
||||
node ${reconstructPackageLock}
|
||||
''}
|
||||
|
||||
node ${addIntegrityFieldsScript}
|
||||
''}
|
||||
|
||||
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} rebuild
|
||||
|
||||
if [ "''${dontNpmInstall-}" != "1" ]
|
||||
then
|
||||
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
|
||||
rm -f npm-shrinkwrap.json
|
||||
|
||||
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} install
|
||||
fi
|
||||
'';
|
||||
|
||||
# Builds and composes an NPM package including all its dependencies
|
||||
buildNodePackage =
|
||||
{ name
|
||||
, packageName
|
||||
, version ? null
|
||||
, dependencies ? []
|
||||
, buildInputs ? []
|
||||
, production ? true
|
||||
, npmFlags ? ""
|
||||
, dontNpmInstall ? false
|
||||
, bypassCache ? false
|
||||
, reconstructLock ? false
|
||||
, preRebuild ? ""
|
||||
, dontStrip ? true
|
||||
, unpackPhase ? "true"
|
||||
, buildPhase ? "true"
|
||||
, meta ? {}
|
||||
, ... }@args:
|
||||
|
||||
let
|
||||
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" "meta" ];
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
name = "${name}${if version == null then "" else "-${version}"}";
|
||||
buildInputs = [ tarWrapper python nodejs ]
|
||||
++ lib.optional (stdenv.isLinux) utillinux
|
||||
++ lib.optional (stdenv.isDarwin) libtool
|
||||
++ buildInputs;
|
||||
|
||||
inherit nodejs;
|
||||
|
||||
inherit dontStrip; # Stripping may fail a build for some package deployments
|
||||
inherit dontNpmInstall preRebuild unpackPhase buildPhase;
|
||||
|
||||
compositionScript = composePackage args;
|
||||
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
|
||||
|
||||
passAsFile = [ "compositionScript" "pinpointDependenciesScript" ];
|
||||
|
||||
installPhase = ''
|
||||
source ${installPackage}
|
||||
|
||||
# Create and enter a root node_modules/ folder
|
||||
mkdir -p $out/lib/node_modules
|
||||
cd $out/lib/node_modules
|
||||
|
||||
# Compose the package and all its dependencies
|
||||
source $compositionScriptPath
|
||||
|
||||
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
|
||||
|
||||
# Create symlink to the deployed executable folder, if applicable
|
||||
if [ -d "$out/lib/node_modules/.bin" ]
|
||||
then
|
||||
ln -s $out/lib/node_modules/.bin $out/bin
|
||||
|
||||
# Patch the shebang lines of all the executables
|
||||
ls $out/bin/* | while read i
|
||||
do
|
||||
file="$(readlink -f "$i")"
|
||||
chmod u+rwx "$file"
|
||||
patchShebangs "$file"
|
||||
done
|
||||
fi
|
||||
|
||||
# Create symlinks to the deployed manual page folders, if applicable
|
||||
if [ -d "$out/lib/node_modules/${packageName}/man" ]
|
||||
then
|
||||
mkdir -p $out/share
|
||||
for dir in "$out/lib/node_modules/${packageName}/man/"*
|
||||
do
|
||||
mkdir -p $out/share/man/$(basename "$dir")
|
||||
for page in "$dir"/*
|
||||
do
|
||||
ln -s $page $out/share/man/$(basename "$dir")
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
# Run post install hook, if provided
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
# default to Node.js' platforms
|
||||
platforms = nodejs.meta.platforms;
|
||||
} // meta;
|
||||
} // extraArgs);
|
||||
|
||||
# Builds a node environment (a node_modules folder and a set of binaries)
|
||||
buildNodeDependencies =
|
||||
{ name
|
||||
, packageName
|
||||
, version ? null
|
||||
, src
|
||||
, dependencies ? []
|
||||
, buildInputs ? []
|
||||
, production ? true
|
||||
, npmFlags ? ""
|
||||
, dontNpmInstall ? false
|
||||
, bypassCache ? false
|
||||
, reconstructLock ? false
|
||||
, dontStrip ? true
|
||||
, unpackPhase ? "true"
|
||||
, buildPhase ? "true"
|
||||
, ... }@args:
|
||||
|
||||
let
|
||||
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
name = "node-dependencies-${name}${if version == null then "" else "-${version}"}";
|
||||
|
||||
buildInputs = [ tarWrapper python nodejs ]
|
||||
++ lib.optional (stdenv.isLinux) utillinux
|
||||
++ lib.optional (stdenv.isDarwin) libtool
|
||||
++ buildInputs;
|
||||
|
||||
inherit dontStrip; # Stripping may fail a build for some package deployments
|
||||
inherit dontNpmInstall unpackPhase buildPhase;
|
||||
|
||||
includeScript = includeDependencies { inherit dependencies; };
|
||||
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
|
||||
|
||||
passAsFile = [ "includeScript" "pinpointDependenciesScript" ];
|
||||
|
||||
installPhase = ''
|
||||
source ${installPackage}
|
||||
|
||||
mkdir -p $out/${packageName}
|
||||
cd $out/${packageName}
|
||||
|
||||
source $includeScriptPath
|
||||
|
||||
# Create fake package.json to make the npm commands work properly
|
||||
cp ${src}/package.json .
|
||||
chmod 644 package.json
|
||||
${lib.optionalString bypassCache ''
|
||||
if [ -f ${src}/package-lock.json ]
|
||||
then
|
||||
cp ${src}/package-lock.json .
|
||||
chmod 644 package-lock.json
|
||||
fi
|
||||
''}
|
||||
|
||||
# Go to the parent folder to make sure that all packages are pinpointed
|
||||
cd ..
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
|
||||
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
|
||||
|
||||
# Expose the executables that were installed
|
||||
cd ..
|
||||
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
|
||||
|
||||
mv ${packageName} lib
|
||||
ln -s $out/lib/node_modules/.bin $out/bin
|
||||
'';
|
||||
} // extraArgs);
|
||||
|
||||
# Builds a development shell
|
||||
buildNodeShell =
|
||||
{ name
|
||||
, packageName
|
||||
, version ? null
|
||||
, src
|
||||
, dependencies ? []
|
||||
, buildInputs ? []
|
||||
, production ? true
|
||||
, npmFlags ? ""
|
||||
, dontNpmInstall ? false
|
||||
, bypassCache ? false
|
||||
, reconstructLock ? false
|
||||
, dontStrip ? true
|
||||
, unpackPhase ? "true"
|
||||
, buildPhase ? "true"
|
||||
, ... }@args:
|
||||
|
||||
let
|
||||
nodeDependencies = buildNodeDependencies args;
|
||||
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "unpackPhase" "buildPhase" ];
|
||||
in
|
||||
stdenv.mkDerivation ({
|
||||
name = "node-shell-${name}${if version == null then "" else "-${version}"}";
|
||||
|
||||
buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
|
||||
buildCommand = ''
|
||||
mkdir -p $out/bin
|
||||
cat > $out/bin/shell <<EOF
|
||||
#! ${stdenv.shell} -e
|
||||
$shellHook
|
||||
exec ${stdenv.shell}
|
||||
EOF
|
||||
chmod +x $out/bin/shell
|
||||
'';
|
||||
|
||||
# Provide the dependencies in a development shell through the NODE_PATH environment variable
|
||||
inherit nodeDependencies;
|
||||
shellHook = lib.optionalString (dependencies != []) ''
|
||||
export NODE_PATH=${nodeDependencies}/lib/node_modules
|
||||
export PATH="${nodeDependencies}/bin:$PATH"
|
||||
'';
|
||||
} // extraArgs);
|
||||
in
|
||||
{
|
||||
buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;
|
||||
buildNodePackage = lib.makeOverridable buildNodePackage;
|
||||
buildNodeDependencies = lib.makeOverridable buildNodeDependencies;
|
||||
buildNodeShell = lib.makeOverridable buildNodeShell;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
["@fsouza/prettierd", "vscode-langservers-extracted"]
|
|
@ -1,270 +0,0 @@
|
|||
# This file has been generated by node2nix 1.11.1. Do not edit!
|
||||
|
||||
{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}:
|
||||
|
||||
let
|
||||
sources = {
|
||||
"core-js-3.23.5" = {
|
||||
name = "core-js";
|
||||
packageName = "core-js";
|
||||
version = "3.23.5";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/core-js/-/core-js-3.23.5.tgz";
|
||||
sha512 = "7Vh11tujtAZy82da4duVreQysIoO2EvVrur7y6IzZkH1IHPSekuDi8Vuw1+YKjkbfWLRD7Nc9ICQ/sIUDutcyg==";
|
||||
};
|
||||
};
|
||||
"core_d-5.0.1" = {
|
||||
name = "core_d";
|
||||
packageName = "core_d";
|
||||
version = "5.0.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/core_d/-/core_d-5.0.1.tgz";
|
||||
sha512 = "37lZyhJY1hzgFbfU4LzY4zL09QPwPfV2W/3YBOtN7mkdvVaeP1OVnDZI6zxggtlPwG/BuE5wIr0xptlVJk5EPA==";
|
||||
};
|
||||
};
|
||||
"has-flag-4.0.0" = {
|
||||
name = "has-flag";
|
||||
packageName = "has-flag";
|
||||
version = "4.0.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz";
|
||||
sha512 = "EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==";
|
||||
};
|
||||
};
|
||||
"jsonc-parser-3.1.0" = {
|
||||
name = "jsonc-parser";
|
||||
packageName = "jsonc-parser";
|
||||
version = "3.1.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.1.0.tgz";
|
||||
sha512 = "DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==";
|
||||
};
|
||||
};
|
||||
"nanolru-1.0.0" = {
|
||||
name = "nanolru";
|
||||
packageName = "nanolru";
|
||||
version = "1.0.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/nanolru/-/nanolru-1.0.0.tgz";
|
||||
sha512 = "GyQkE8M32pULhQk7Sko5raoIbPalAk90ICG+An4fq6fCsFHsP6fB2K46WGXVdoJpy4SGMnZ/EKbo123fZJomWg==";
|
||||
};
|
||||
};
|
||||
"picomatch-2.3.1" = {
|
||||
name = "picomatch";
|
||||
packageName = "picomatch";
|
||||
version = "2.3.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz";
|
||||
sha512 = "JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==";
|
||||
};
|
||||
};
|
||||
"prettier-2.7.1" = {
|
||||
name = "prettier";
|
||||
packageName = "prettier";
|
||||
version = "2.7.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz";
|
||||
sha512 = "ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==";
|
||||
};
|
||||
};
|
||||
"regenerator-runtime-0.13.9" = {
|
||||
name = "regenerator-runtime";
|
||||
packageName = "regenerator-runtime";
|
||||
version = "0.13.9";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz";
|
||||
sha512 = "p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==";
|
||||
};
|
||||
};
|
||||
"request-light-0.5.8" = {
|
||||
name = "request-light";
|
||||
packageName = "request-light";
|
||||
version = "0.5.8";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/request-light/-/request-light-0.5.8.tgz";
|
||||
sha512 = "3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg==";
|
||||
};
|
||||
};
|
||||
"supports-color-8.1.1" = {
|
||||
name = "supports-color";
|
||||
packageName = "supports-color";
|
||||
version = "8.1.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz";
|
||||
sha512 = "MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==";
|
||||
};
|
||||
};
|
||||
"typescript-4.7.4" = {
|
||||
name = "typescript";
|
||||
packageName = "typescript";
|
||||
version = "4.7.4";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz";
|
||||
sha512 = "C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==";
|
||||
};
|
||||
};
|
||||
"vscode-css-languageservice-6.0.1" = {
|
||||
name = "vscode-css-languageservice";
|
||||
packageName = "vscode-css-languageservice";
|
||||
version = "6.0.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-6.0.1.tgz";
|
||||
sha512 = "81n/eeYuJwQdvpoy6IK1258PtPbO720fl13FcJ5YQECPyHMFkmld1qKHwPJkyLbLPfboqJPM53ys4xW8v+iBVw==";
|
||||
};
|
||||
};
|
||||
"vscode-html-languageservice-5.0.1" = {
|
||||
name = "vscode-html-languageservice";
|
||||
packageName = "vscode-html-languageservice";
|
||||
version = "5.0.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-5.0.1.tgz";
|
||||
sha512 = "OYsyn5HGAhxs0OIG+M0jc34WnftLtD67Wg7+TfrYwvf0waOkkr13zUqtdrVm2JPNQ6fJx+qnuM+vTbq7o1dCdQ==";
|
||||
};
|
||||
};
|
||||
"vscode-json-languageservice-5.1.0" = {
|
||||
name = "vscode-json-languageservice";
|
||||
packageName = "vscode-json-languageservice";
|
||||
version = "5.1.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-5.1.0.tgz";
|
||||
sha512 = "D5612D7h/Gh4A0JmdttPveWzT9dur21WXvBHWKPdOt0sLO6ILz8vN6+IzWnvwDOVAEFTpzIAMVMZwbKZkwGGiA==";
|
||||
};
|
||||
};
|
||||
"vscode-jsonrpc-8.0.2" = {
|
||||
name = "vscode-jsonrpc";
|
||||
packageName = "vscode-jsonrpc";
|
||||
version = "8.0.2";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz";
|
||||
sha512 = "RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ==";
|
||||
};
|
||||
};
|
||||
"vscode-languageserver-8.0.2" = {
|
||||
name = "vscode-languageserver";
|
||||
packageName = "vscode-languageserver";
|
||||
version = "8.0.2";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-8.0.2.tgz";
|
||||
sha512 = "bpEt2ggPxKzsAOZlXmCJ50bV7VrxwCS5BI4+egUmure/oI/t4OlFzi/YNtVvY24A2UDOZAgwFGgnZPwqSJubkA==";
|
||||
};
|
||||
};
|
||||
"vscode-languageserver-protocol-3.17.2" = {
|
||||
name = "vscode-languageserver-protocol";
|
||||
packageName = "vscode-languageserver-protocol";
|
||||
version = "3.17.2";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz";
|
||||
sha512 = "8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg==";
|
||||
};
|
||||
};
|
||||
"vscode-languageserver-textdocument-1.0.5" = {
|
||||
name = "vscode-languageserver-textdocument";
|
||||
packageName = "vscode-languageserver-textdocument";
|
||||
version = "1.0.5";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.5.tgz";
|
||||
sha512 = "1ah7zyQjKBudnMiHbZmxz5bYNM9KKZYz+5VQLj+yr8l+9w3g+WAhCkUkWbhMEdC5u0ub4Ndiye/fDyS8ghIKQg==";
|
||||
};
|
||||
};
|
||||
"vscode-languageserver-types-3.17.2" = {
|
||||
name = "vscode-languageserver-types";
|
||||
packageName = "vscode-languageserver-types";
|
||||
version = "3.17.2";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz";
|
||||
sha512 = "zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==";
|
||||
};
|
||||
};
|
||||
"vscode-markdown-languageservice-0.0.0-alpha.11" = {
|
||||
name = "vscode-markdown-languageservice";
|
||||
packageName = "vscode-markdown-languageservice";
|
||||
version = "0.0.0-alpha.11";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-markdown-languageservice/-/vscode-markdown-languageservice-0.0.0-alpha.11.tgz";
|
||||
sha512 = "syFamf99xx+Q9DkA66+8fbSz2A2LJkyOV+nSziGgAzdDPv4jkb7eWF6l+nUteHTGbRLQ+q0tfkj0A7OovueCSQ==";
|
||||
};
|
||||
};
|
||||
"vscode-nls-5.0.1" = {
|
||||
name = "vscode-nls";
|
||||
packageName = "vscode-nls";
|
||||
version = "5.0.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.0.1.tgz";
|
||||
sha512 = "hHQV6iig+M21lTdItKPkJAaWrxALQb/nqpVffakO4knJOh3DrU2SXOMzUzNgo1eADPzu3qSsJY1weCzvR52q9A==";
|
||||
};
|
||||
};
|
||||
"vscode-uri-3.0.3" = {
|
||||
name = "vscode-uri";
|
||||
packageName = "vscode-uri";
|
||||
version = "3.0.3";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.3.tgz";
|
||||
sha512 = "EcswR2S8bpR7fD0YPeS7r2xXExrScVMxg4MedACaWHEtx9ftCF/qHG1xGkolzTPcEmjTavCQgbVzHUIdTMzFGA==";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
"@fsouza/prettierd" = nodeEnv.buildNodePackage {
|
||||
name = "_at_fsouza_slash_prettierd";
|
||||
packageName = "@fsouza/prettierd";
|
||||
version = "0.21.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/@fsouza/prettierd/-/prettierd-0.21.1.tgz";
|
||||
sha512 = "xLGvk2csfCqTT3MZfXC7uGxdAy0HkMiYoVz2vCQbxNHCLSLBEoejNcbNh+MPWulRPSVBYN8jJJge6yychCU5KA==";
|
||||
};
|
||||
dependencies = [
|
||||
sources."core_d-5.0.1"
|
||||
sources."has-flag-4.0.0"
|
||||
sources."nanolru-1.0.0"
|
||||
sources."prettier-2.7.1"
|
||||
sources."supports-color-8.1.1"
|
||||
];
|
||||
buildInputs = globalBuildInputs;
|
||||
meta = {
|
||||
description = "prettier, as a daemon";
|
||||
homepage = "https://github.com/fsouza/prettierd";
|
||||
license = "ISC";
|
||||
};
|
||||
production = true;
|
||||
bypassCache = true;
|
||||
reconstructLock = true;
|
||||
};
|
||||
vscode-langservers-extracted = nodeEnv.buildNodePackage {
|
||||
name = "vscode-langservers-extracted";
|
||||
packageName = "vscode-langservers-extracted";
|
||||
version = "4.4.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/vscode-langservers-extracted/-/vscode-langservers-extracted-4.4.0.tgz";
|
||||
sha512 = "sWXDFmAvXMUhF5E+6v4e77SwhVPSvdLxGGfkOz15LmAsfKoamKMnW7aARnu6mRWOzqz3hKJqVZN4hnCpdvtLKg==";
|
||||
};
|
||||
dependencies = [
|
||||
sources."core-js-3.23.5"
|
||||
sources."jsonc-parser-3.1.0"
|
||||
sources."picomatch-2.3.1"
|
||||
sources."regenerator-runtime-0.13.9"
|
||||
sources."request-light-0.5.8"
|
||||
sources."typescript-4.7.4"
|
||||
sources."vscode-css-languageservice-6.0.1"
|
||||
sources."vscode-html-languageservice-5.0.1"
|
||||
sources."vscode-json-languageservice-5.1.0"
|
||||
sources."vscode-jsonrpc-8.0.2"
|
||||
sources."vscode-languageserver-8.0.2"
|
||||
sources."vscode-languageserver-protocol-3.17.2"
|
||||
sources."vscode-languageserver-textdocument-1.0.5"
|
||||
sources."vscode-languageserver-types-3.17.2"
|
||||
sources."vscode-markdown-languageservice-0.0.0-alpha.11"
|
||||
sources."vscode-nls-5.0.1"
|
||||
sources."vscode-uri-3.0.3"
|
||||
];
|
||||
buildInputs = globalBuildInputs;
|
||||
meta = {
|
||||
description = "HTML/CSS/JSON/ESLint language servers extracted from [vscode](https://github.com/Microsoft/vscode).";
|
||||
homepage = "https://github.com/hrsh7th/vscode-langservers-extracted#readme";
|
||||
license = "MIT";
|
||||
};
|
||||
production = true;
|
||||
bypassCache = true;
|
||||
reconstructLock = true;
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
self: super:
|
||||
with self; {
|
||||
discord = unstable.discord;
|
||||
vscode = unstable.vscode;
|
||||
tetrio-desktop = unstable.tetrio-desktop;
|
||||
sumneko-lua-language-server = super.sumneko-lua-language-server.overrideAttrs (old: rec {
|
||||
version = "unstable-2022-12-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sumneko";
|
||||
repo = "lua-language-server";
|
||||
rev = "6d740a76ce170c396108e8bfc26b1286ac32c62f";
|
||||
sha256 = "0p9nyhzciw1i6r5crmrwx80ma21dxd3hl9sgvq6qc6qnmn67w8km";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
});
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
self: super: { vimclip = self.callPackage (import ./vimclip.nix) { }; }
|
|
@ -1,27 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
name = "vimclip";
|
||||
rev = "7f53433";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
inherit rev;
|
||||
owner = "hrantzsch";
|
||||
repo = "vimclip";
|
||||
sha256 = "cl5y7Lli5frwx823hoN17B2aQLNY7+njmKEDdIbhc4Y=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
pkgs.makeWrapper
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ./vimclip $out/bin/vimclip
|
||||
chmod +x $out/bin/vimclip
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/vimclip \
|
||||
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.xsel ]} \
|
||||
--set EDITOR nvim
|
||||
'';
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
services.printing.enable = true;
|
||||
services.printing.drivers = with pkgs; [
|
||||
hplip
|
||||
];
|
||||
}
|
|
@ -1,91 +0,0 @@
|
|||
{ transparency ? 1, wallpaper, variant }: { pkgs, lib, ... }:
|
||||
let
|
||||
githubTheme = pkgs.myVimPlugins.githubNvimTheme; # github theme for neovim
|
||||
foreign = pkgs.callPackage (import ./foreign.nix) { };
|
||||
|
||||
v = (a: b: if variant == "latte" then a else b);
|
||||
|
||||
rofi-variant = "basic";
|
||||
in
|
||||
{
|
||||
name = "catppuccin-${variant}";
|
||||
wallpaper = wallpaper.foreign or "${foreign.wallpapers}/${wallpaper}";
|
||||
|
||||
env = {
|
||||
CATPPUCCIN_FLAVOUR = variant;
|
||||
};
|
||||
|
||||
neovim = {
|
||||
theme = ./nvim.lua;
|
||||
lualineTheme = "catppuccin";
|
||||
};
|
||||
|
||||
tmux.path = "${foreign.tmux}/catppuccin-${variant}.conf";
|
||||
sddm.path = "${foreign.sddm}";
|
||||
|
||||
xresources.config = builtins.readFile "${foreign.xresources}/${variant}.Xresources";
|
||||
|
||||
rofi = {
|
||||
themes = "${foreign.rofi}/${rofi-variant}/.local/share/rofi/themes/";
|
||||
config = ''
|
||||
@import "${foreign.rofi}/${rofi-variant}/.config/rofi/config.rasi"
|
||||
@theme "catppuccin-${variant}"
|
||||
@import "${./rofi.rasi}"
|
||||
'';
|
||||
};
|
||||
|
||||
fish.dangerousColors = lib.strings.concatStringsSep " "
|
||||
(v
|
||||
[
|
||||
"dc8a78"
|
||||
"dd7878"
|
||||
"ea76cb"
|
||||
"8839ef"
|
||||
"d20f39"
|
||||
"e64553"
|
||||
"fe640b"
|
||||
"df8e1d"
|
||||
"40a02b"
|
||||
"179299"
|
||||
"04a5e5"
|
||||
]
|
||||
[
|
||||
"F2CDCD"
|
||||
"DDB6F2"
|
||||
"F5C2E7"
|
||||
"E8A2AF"
|
||||
"F28FAD"
|
||||
"F8BD96"
|
||||
"FAE3B0"
|
||||
"ABE9B3"
|
||||
"B5E8E0"
|
||||
"96CDFB"
|
||||
"89DCEB"
|
||||
]);
|
||||
|
||||
zathura = {
|
||||
enable = true;
|
||||
theme = "${foreign.zathura}/src/catppuccin-${variant}";
|
||||
name = "catppuccin-${variant}";
|
||||
};
|
||||
|
||||
polybar.config = builtins.readFile "${foreign.polybar}/${variant}.ini";
|
||||
|
||||
alacritty = {
|
||||
extraConfig = ''
|
||||
${builtins.readFile "${foreign.alacritty}/catppuccin.yml"}
|
||||
colors: *${variant}
|
||||
'';
|
||||
|
||||
settings = {
|
||||
window = {
|
||||
padding = {
|
||||
x = 4;
|
||||
y = 4;
|
||||
};
|
||||
|
||||
opacity = transparency;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
{ fetchFromGitHub, ... }: {
|
||||
tmux = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "tmux";
|
||||
sha256 = "1x95db3wjjbaljk30db3iqjddxfp1gg2m9f0318vnincsdfllmz1";
|
||||
rev = "317159f824eeb4d170ecad34e0457281b13244d2";
|
||||
};
|
||||
sddm = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "sddm";
|
||||
sha256 = "1rkmrr2fvczjz5wgcdfi7hyhp0s2lnn1jhan0qq896kvc1pmwqid";
|
||||
rev = "e2a0dc15f63ba7429cef79cf08db8d3f2a3018c1";
|
||||
};
|
||||
grub = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "grub";
|
||||
sha256 = "0d9vbq63bilikgnyzk9gfrzddvbvxi55k22cw8k0mdavfy24m1q4";
|
||||
rev = "fc5fba2896db095aee7b0d6442307c3035a24fa7";
|
||||
};
|
||||
gtk = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "gtk";
|
||||
sha256 = "1fzc7yzj9b9pc48qqaygbyskqjanb771x0i4ssn40hpbhj17n2ny";
|
||||
rev = "fc336313a84e0d7ec1a3499047fb1e73eef8a005";
|
||||
};
|
||||
rofi = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "rofi";
|
||||
sha256 = "00p1pnnas281hdszzs8jki4l48vs76r0b5b5j5yas3vh3h352m99";
|
||||
rev = "5de33131d5904d4d96f4f218b1a54b9c79634965";
|
||||
};
|
||||
alacritty = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "alacritty";
|
||||
sha256 = "1l7fa4gncx08j48mjd1zwz7j1j4vm08rbs1vx53cdj3yp3s4j50m";
|
||||
rev = "0f0247693730de64d50a9d915c3306b234c6f11b";
|
||||
};
|
||||
wallpapers = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "wallpapers";
|
||||
sha256 = "0d68di2nn9as7y2rxq1v4b5d0s89y53m8v2ls8nfm1rrggny1iqx";
|
||||
rev = "72b8b3e1749300fbaf6f8e736a65a4f41ac7d48d";
|
||||
};
|
||||
xresources = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "xresources";
|
||||
sha256 = "08dh1av7kb921fdzkqhcp2yd2q848ay0kqgyf3zbnnvs0j92ap0q";
|
||||
rev = "046c2f9c3027af1b7aaca14377dda5ea19b61593";
|
||||
};
|
||||
zathura = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "zathura";
|
||||
sha256 = "17q2jn8bx712c0789vc00y9jb2vng7g7mnmqm8ypivrl616igzli";
|
||||
rev = "b9553c7e398c1a157e5543ea52d20e570f730dd6";
|
||||
};
|
||||
polybar = fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "polybar";
|
||||
sha256 = "0842kqxgq1sm17rm29qglj2wwb3zvy0apfx39y7cvl4248jxhzgj";
|
||||
rev = "94ffe6ed93ff5c54fe938c60dc2babde89046083";
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
M.deps = { { "catppuccin/nvim", as = "catppuccin" } }
|
||||
|
||||
function M.setup()
|
||||
local catppuccin = require("catppuccin")
|
||||
vim.g.catppuccin_flavour = os.getenv("CATPPUCCIN_FLAVOUR")
|
||||
vim.g.lualineTheme = "catppuccin";
|
||||
|
||||
catppuccin.setup({ transparent_background = false, integrations = { nvimtree = true } })
|
||||
|
||||
vim.cmd [[colorscheme catppuccin]]
|
||||
vim.cmd [[highlight NotifyINFOIcon guifg=#d6b20f]]
|
||||
vim.cmd [[highlight NotifyINFOTitle guifg=#d6b20f]]
|
||||
end
|
||||
|
||||
return M
|
|
@ -1,12 +0,0 @@
|
|||
window {
|
||||
height: 50%;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
listview {
|
||||
columns: 1;
|
||||
}
|
||||
|
||||
element selected {
|
||||
/* background-color: #373759; */
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
base16-schemes =
|
||||
pkgs.fetchFromGitHub {
|
||||
owner = "base16-project";
|
||||
repo = "base16-schemes";
|
||||
rev = "99529527e7cb3d777fb6e041c2aabbe6cdec4c4c";
|
||||
sha256 = "08avs0fykyjl1k3476vhm9rm0hvrpl2hfmc78r3h6yfnjnnl6q66";
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
# ./gtk.nix # Sets up gtk theming
|
||||
./xresources.nix # Sets up xresources
|
||||
./fonts.nix # Installs fonts and stuff (TODO: consider moving this into the individual themes which require these fonts?)
|
||||
./wallpaper.nix # Sets the wallpaper required by the current theme
|
||||
];
|
||||
|
||||
stylix = {
|
||||
image = ./wallpapers/synthwave.jpg;
|
||||
polarity = "dark";
|
||||
|
||||
autoEnable = false;
|
||||
targets.grub.enable = true;
|
||||
|
||||
base16Scheme = "${base16-schemes}/catppuccin.yaml";
|
||||
};
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
nerdfonts =
|
||||
(pkgs.nerdfonts.override {
|
||||
fonts = [ "FiraCode" "SourceCodePro" ];
|
||||
});
|
||||
in
|
||||
{
|
||||
home-manager.users.adrielus = {
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
source-code-pro
|
||||
corefonts
|
||||
nerdfonts
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
{ variant, transparency ? 1, wallpaper }: { pkgs, ... }:
|
||||
let
|
||||
githubTheme = pkgs.myVimPlugins.githubNvimTheme; # github theme for neovim
|
||||
in
|
||||
{
|
||||
inherit wallpaper;
|
||||
|
||||
name = "github-${variant}";
|
||||
neovim = {
|
||||
plugins = [ pkgs.vimExtraPlugins.github-nvim-theme ];
|
||||
|
||||
theme = ''
|
||||
require('github-theme').setup({theme_style = "${variant}", dark_float = true, transparent = true})
|
||||
'';
|
||||
|
||||
lualineTheme = "github";
|
||||
};
|
||||
tmux.path = "${githubTheme}/terminal/tmux/github_${variant}.conf";
|
||||
sddm.path = "${pkgs.sddm-theme-chili}"; # TODO: don't expose this globally
|
||||
grub.path = pkgs.nixos-grub2-theme;
|
||||
rofi.config = ''@theme "purple"'';
|
||||
alacritty.settings = {
|
||||
import = [ "${githubTheme}/terminal/alacritty/github_${variant}.yml" ];
|
||||
window = {
|
||||
padding = {
|
||||
x = 8;
|
||||
y = 8;
|
||||
};
|
||||
|
||||
gtk_theme_variant = if variant == "light" then "light" else "dark";
|
||||
};
|
||||
|
||||
# transparent bg:)
|
||||
background_opacity = transparency;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
theme = pkgs.myThemes.current;
|
||||
in
|
||||
{
|
||||
home-manager.users.adrielus.gtk = {
|
||||
enable = true;
|
||||
theme = theme.gtk.path or null;
|
||||
};
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
githubVariant = import ./githubVariant.nix;
|
||||
catppuccin = import ./catppuccin/default.nix;
|
||||
in
|
||||
lib.lists.map (theme: pkgs.callPackage theme { }) [
|
||||
(catppuccin {
|
||||
# wallpaper = "os/nix-magenta-pink-1920x1080.png";
|
||||
# wallpaper = "minimalistic/tetris.png";
|
||||
wallpaper = "os/nix-black-4k.png";
|
||||
# wallpaper = "misc/comfy-home.png";
|
||||
# wallpaper = "landscapes/forrest.png";
|
||||
# wallpaper = "landscapes/salty_mountains.png";
|
||||
# wallpaper = "misc/rainbow.png";
|
||||
# wallpaper.foreign = ./wallpapers/eye.png;
|
||||
# wallpaper.foreign = ./wallpapers/mountain.png;
|
||||
transparency = 0.93;
|
||||
variant = "macchiato";
|
||||
})
|
||||
(catppuccin {
|
||||
# wallpaper = "os/nix-magenta-pink-1920x1080.png";
|
||||
# wallpaper = "minimalistic/tetris.png";
|
||||
# wallpaper = "misc/comfy-home.png";
|
||||
# wallpaper = "landscapes/forrest.png";
|
||||
# wallpaper = "landscapes/salty_mountains.png";
|
||||
# wallpaper = "misc/rainbow.png";
|
||||
# wallpaper.foreign = ./wallpapers/eye.png;
|
||||
# wallpaper.foreign = ./wallpapers/mountain.png;
|
||||
wallpaper.foreign = ./wallpapers/rw_tower.png;
|
||||
transparency = 1;
|
||||
variant = "latte";
|
||||
})
|
||||
(githubVariant {
|
||||
variant = "light";
|
||||
# wallpaper = ./wallpapers/wall.png;
|
||||
wallpaper = ./wallpapers/synthwave.jpg;
|
||||
# wallpaper = ./wallpapers/eye.png;
|
||||
transparency = 0.8;
|
||||
})
|
||||
(githubVariant {
|
||||
variant = "dark";
|
||||
# wallpaper = ./wallpapers/synthwave.jpg;
|
||||
wallpaper = ./wallpapers/spaceship.jpg;
|
||||
transparency = 0.8;
|
||||
})
|
||||
]
|
|
@ -1,15 +0,0 @@
|
|||
# Tutorial regarding this:
|
||||
# https://www.codyhiar.com/blog/how-to-set-desktop-wallpaper-on-nixos/
|
||||
{ pkgs, config, ... }: {
|
||||
home-manager.users.adrielus = {
|
||||
home.packages = with pkgs; [ xwallpaper ];
|
||||
xdg.configFile."wallpaper".source = pkgs.myThemes.current.wallpaper;
|
||||
xsession = {
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
xwallpaper --zoom ~/.config/wallpaper
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Binary file not shown.
Before ![]() (image error) Size: 3.1 MiB |
Binary file not shown.
Before ![]() (image error) Size: 1.1 MiB |
Binary file not shown.
Before ![]() (image error) Size: 662 KiB |
Binary file not shown.
Before ![]() (image error) Size: 763 KiB |
Binary file not shown.
Before ![]() (image error) Size: 3.1 MiB |
Binary file not shown.
Before ![]() (image error) Size: 206 KiB |
Binary file not shown.
Before ![]() (image error) Size: 288 KiB |
|
@ -1,9 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
theme = pkgs.myThemes.current;
|
||||
in
|
||||
{
|
||||
home-manager.users.adrielus.xresources = {
|
||||
extraConfig = theme.xresources.config or "";
|
||||
};
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# Disable asking for password for sudo
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "adrielus" ];
|
||||
commands = [{
|
||||
command = "ALL";
|
||||
options = [ "SETENV" "NOPASSWD" ];
|
||||
}];
|
||||
}
|
||||
];
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users.adrielus = {
|
||||
passwordFile = "~/water/pass";
|
||||
extraGroups = [ "wheel" "networkmanager" "lp" "docker" "audio" "sound" "video" "input" "tty" ];
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
};
|
||||
# };
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
theme = pkgs.myThemes.current;
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Required for the sddm theme
|
||||
libsForQt5.qt5.qtquickcontrols
|
||||
libsForQt5.qt5.qtgraphicaleffects
|
||||
libsForQt5.qt5.qtbase
|
||||
];
|
||||
|
||||
services.xserver = {
|
||||
# Enable the X11 windowing system.
|
||||
enable = true;
|
||||
xkbOptions = "eurosign:e";
|
||||
|
||||
# Make the xmonad session the default
|
||||
# displayManager.defaultSession = "none+xmonad";
|
||||
displayManager = {
|
||||
defaultSession = "none+xmonad";
|
||||
sddm = {
|
||||
enable = true;
|
||||
theme = theme.sddm.path;
|
||||
};
|
||||
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "adrielus";
|
||||
};
|
||||
};
|
||||
|
||||
# displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = false;
|
||||
|
||||
|
||||
# Enable xmonad
|
||||
windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
config = ./applications/xmonad/Main.hs;
|
||||
};
|
||||
|
||||
libinput = {
|
||||
# Enable touchpad support.
|
||||
enable = true;
|
||||
|
||||
touchpad = {
|
||||
naturalScrolling = true;
|
||||
accelSpeed = "3.5";
|
||||
|
||||
tappingDragLock = false;
|
||||
disableWhileTyping = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# I think this has to do with multiple monitors and stuff?
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
${lib.getBin pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 2 0
|
||||
'';
|
||||
|
||||
services.fractalart.enable = true;
|
||||
hardware.opengl.enable = true;
|
||||
|
||||
environment.gnome.excludePackages = (with pkgs; [
|
||||
# gnome-photos
|
||||
# gnome-tour
|
||||
]) ++ (with pkgs.gnome; [
|
||||
cheese # webcam tool
|
||||
gnome-music
|
||||
gnome-terminal
|
||||
gedit # text editor
|
||||
epiphany # web browser
|
||||
geary # email reader
|
||||
evince # document viewer
|
||||
gnome-characters
|
||||
totem # video player
|
||||
tali # poker game
|
||||
iagno # go game
|
||||
hitori # sudoku game
|
||||
atomix # puzzle game
|
||||
]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue