Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jens/dotfiles
1 result
Show changes
Commits on Source (19)
Showing
with 373 additions and 87 deletions
...@@ -68,6 +68,8 @@ readonly uboot=$($nix build --json --no-link $uboot_installable | jq --raw-outpu ...@@ -68,6 +68,8 @@ readonly uboot=$($nix build --json --no-link $uboot_installable | jq --raw-outpu
sudo dd if=$uboot/u-boot-sunxi-with-spl.bin of=$target_disk bs=1024 seek=8 conv=fsync status=progress sudo dd if=$uboot/u-boot-sunxi-with-spl.bin of=$target_disk bs=1024 seek=8 conv=fsync status=progress
sleep 2s
sudo wipefs -a $root_partition sudo wipefs -a $root_partition
# partprobe doesn't seem to be enough for symlinks to appear? # partprobe doesn't seem to be enough for symlinks to appear?
...@@ -97,4 +99,8 @@ sudo touch "$mount_point/etc/NIXOS" ...@@ -97,4 +99,8 @@ sudo touch "$mount_point/etc/NIXOS"
# - look for "Install or update the bootloader." # - look for "Install or update the bootloader."
# - run extlinux-conf-builder.sh: # - run extlinux-conf-builder.sh:
# /nix/store/[...]-extlinux-conf-builder.sh -d /mnt/mnt/boot -c $nixos_config_path -t 5 # /nix/store/[...]-extlinux-conf-builder.sh -d /mnt/mnt/boot -c $nixos_config_path -t 5
print "Manual bootloader installation required"
print "- Find bootloader installation in: $nixos_config_path/bin/switch-to-configuration"
print "- Then run extlinux-builder: sudo /nix/store/[...]-extlinux-conf-builder.sh -d $mount_point/boot -c $nixos_config_path -t 5"
sync sync
...@@ -65,12 +65,13 @@ in ...@@ -65,12 +65,13 @@ in
nixpkgs.overlays = [ nixpkgs.overlays = [
(import ./pkgs) (import ./pkgs)
#flakeInputs.q.overlay #flakeInputs.q.overlay
(self: super: { (final: prev: {
q = flakeInputs.q.packages.${system}.q; q = flakeInputs.q.packages.${system}.q;
#q = if system == "aarch64-multiplatform" #q = if system == "aarch64-multiplatform"
# then flakeInputs.q.packages.x86_64-linux.aarch64-multiplatform.q; # then flakeInputs.q.packages.x86_64-linux.aarch64-multiplatform.q;
# else flakeInputs.q.packages.${system}.q; # else flakeInputs.q.packages.${system}.q;
}) })
flakeInputs.emacs-overlay.overlay
] ++ extraOverlays; ] ++ extraOverlays;
# Pin nixpkgs in nix path # Pin nixpkgs in nix path
......
...@@ -84,11 +84,11 @@ ...@@ -84,11 +84,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1640408860, "lastModified": 1646497237,
"narHash": "sha256-h2uF3+a8bVfM8SjcS4hLbsOzOuG3qsxuImC0BucWs1Q=", "narHash": "sha256-Ccpot1h/rV8MgcngDp5OrdmLTMaUTbStZTR5/sI7zW0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cb372c3b8880e504b06946e8fb2ca9777c685505", "rev": "062a0c5437b68f950b081bbfc8a699d57a4ee026",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -98,12 +98,67 @@ ...@@ -98,12 +98,67 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-master": {
"locked": {
"lastModified": 1643565674,
"narHash": "sha256-VP+0nFRcmQY7DbZgbudgrCJfnbPxcnkI8QiDnMsWWpE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "24bc16243e07744359ccdde9e086fde0eb61db8a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1640408860, "lastModified": 1645334861,
"narHash": "sha256-h2uF3+a8bVfM8SjcS4hLbsOzOuG3qsxuImC0BucWs1Q=", "narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
"path": "/nix/store/m6p4m1rs0xi67kaa25bm1rqkm4633qjr-source", "owner": "NixOS",
"rev": "cb372c3b8880e504b06946e8fb2ca9777c685505", "repo": "nixpkgs",
"rev": "d5f237872975e6fb6f76eef1368b5634ffcd266f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1645334861,
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d5f237872975e6fb6f76eef1368b5634ffcd266f",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_4": {
"locked": {
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
"path": "/nix/store/65cmw2ws80b61dyysmnqn8py9vgqdydn-source",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_5": {
"locked": {
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
"path": "/nix/store/65cmw2ws80b61dyysmnqn8py9vgqdydn-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
...@@ -113,18 +168,16 @@ ...@@ -113,18 +168,16 @@
}, },
"q": { "q": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": "nixpkgs_2",
"nixpkgs"
],
"quasar-network": "quasar-network" "quasar-network": "quasar-network"
}, },
"locked": { "locked": {
"host": "git.c3pb.de", "host": "git.c3pb.de",
"lastModified": 1641951740, "lastModified": 1646763772,
"narHash": "sha256-zXakWDKFROSNg6J5opIYCmp3bo6Xo8sawcl1vkFP97s=", "narHash": "sha256-Y115+GJAtBRuv0m/+a7d8UVsMBXZZaDp/dkOMp5hehA=",
"owner": "jens", "owner": "jens",
"repo": "q", "repo": "q",
"rev": "9ecc87bb6bec339bb63f3a61e43b46d8953cb7e2", "rev": "604e12fa027c6c17b3c73b679ca97614fd908b66",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
...@@ -136,9 +189,7 @@ ...@@ -136,9 +189,7 @@
}, },
"qauth": { "qauth": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": "nixpkgs_5"
"nixpkgs"
]
}, },
"locked": { "locked": {
"host": "git.c3pb.de", "host": "git.c3pb.de",
...@@ -158,15 +209,15 @@ ...@@ -158,15 +209,15 @@
}, },
"quasar": { "quasar": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"host": "git.c3pb.de", "host": "git.c3pb.de",
"lastModified": 1638315058, "lastModified": 1641081421,
"narHash": "sha256-SA99IShGlTc3IkcqG5YP/lnSyTWWHFIdvci5pWR8BrI=", "narHash": "sha256-LQiTNImd3/9Vbwidn7wmuwR1YI5K4ptX6GNVapPXSQg=",
"owner": "jens", "owner": "jens",
"repo": "quasar", "repo": "quasar",
"rev": "7f163062fd2dc98041b5149c5ab23fd8cedde7e6", "rev": "3094546aa29618a5d278b10eea354b9d6f383122",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
...@@ -178,19 +229,16 @@ ...@@ -178,19 +229,16 @@
}, },
"quasar-network": { "quasar-network": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": "nixpkgs_3",
"q",
"nixpkgs"
],
"quasar": "quasar" "quasar": "quasar"
}, },
"locked": { "locked": {
"host": "git.c3pb.de", "host": "git.c3pb.de",
"lastModified": 1638330205, "lastModified": 1646681322,
"narHash": "sha256-vVdNLDtS7mmj5FLJ7/lL0mJ9r05ZLhJQoRAlmDa7OC4=", "narHash": "sha256-Gra2t0qo3nxgiqWY6duMKCC/hU533WVqXP71uA4SnHU=",
"owner": "jens", "owner": "jens",
"repo": "quasar-network", "repo": "quasar-network",
"rev": "12c98e410f4a6d96b9ea2390da1edc6d026ad7ae", "rev": "8c6291ef3b4d37f61cbaeceae89ceacb0249b5d6",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
...@@ -208,6 +256,7 @@ ...@@ -208,6 +256,7 @@
"matrix-homeserver": "matrix-homeserver", "matrix-homeserver": "matrix-homeserver",
"mobile-nixos": "mobile-nixos", "mobile-nixos": "mobile-nixos",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-pinephone": [ "nixpkgs-pinephone": [
"nixpkgs" "nixpkgs"
], ],
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
inputs = { inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable; nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
nixpkgs-master.url = github:nixos/nixpkgs/master;
nixpkgs-pinephone.url = github:nixos/nixpkgs/nixos-unstable; nixpkgs-pinephone.url = github:nixos/nixpkgs/nixos-unstable;
nixpkgs-pinephone.follows = "nixpkgs"; nixpkgs-pinephone.follows = "nixpkgs";
...@@ -11,11 +13,9 @@ ...@@ -11,11 +13,9 @@
}; };
qauth = { qauth = {
url = gitlab:jens/qauth?host=git.c3pb.de; url = gitlab:jens/qauth?host=git.c3pb.de;
inputs.nixpkgs.follows = "nixpkgs";
}; };
q = { q = {
url = gitlab:jens/q?host=git.c3pb.de; url = gitlab:jens/q?host=git.c3pb.de;
inputs.nixpkgs.follows = "nixpkgs";
}; };
mobile-nixos = { mobile-nixos = {
...@@ -23,6 +23,12 @@ ...@@ -23,6 +23,12 @@
flake = false; flake = false;
}; };
emacs-overlay.url = github:nix-community/emacs-overlay;
emacs-term-cursor = {
url = github:denrat/term-cursor.el;
flake = false;
};
matrix-homeserver.url = github:queezle42/matrix-homeserver; matrix-homeserver.url = github:queezle42/matrix-homeserver;
}; };
......
[user] [user]
email = git@queezle.net email = git@queezle.net
name = Jens Nolte name = Jens Nolte
[init]
defaultBranch = main
[commit]
verbose = true
[alias] [alias]
graph = log --graph --decorate --all --format=format:'%C(yellow)%h%C(reset) %C(red)%aN%C(reset) %C(dim cyan)(%ar)%C(reset)%C(dim magenta)%d%C(reset)%n%C(white)%s%C(reset)' graph = log --graph --decorate --all --format=format:'%C(yellow)%h%C(reset) %C(red)%aN%C(reset) %C(dim cyan)(%ar)%C(reset)%C(dim magenta)%d%C(reset)%n%C(white)%s%C(reset)'
g = !git graph g = !git graph
changes = "!f() { \ changes = "!f() { \
{ git --no-pager log --max-count=1 --shortstat --color=always ${1:-HEAD};\ { git --no-pager log --max-count=1 --shortstat --color=always ${1:-HEAD};\
echo; git --no-pager diff --color=always "${1:-HEAD}^" "${1:-HEAD}"; } \ echo; git --no-pager diff --color=always "${1:-HEAD}^" "${1:-HEAD}"; } \
| $PAGER -r; }; f" | $PAGER -r; }; f"
# Basic configuration for appliances
{ pkgs, lib, isMobileNixos, ... }:
with lib;
let
root = pkgs.writeShellScriptBin "root" ''
if [ -n "$1" ] ; then
TUSER="$1"
else
TUSER="root"
fi
shell="$(getent passwd "$TUSER" 2>/dev/null | { IFS=: read _ _ _ _ _ _ x; echo "$x"; })"
exec machinectl shell --setenv=SHELL="$shell" "$TUSER@" "$shell" --login -i
'';
in
{
imports = [
./ioschedulers.nix
];
nix.package = pkgs.nixFlakes; # noop in current nixpkgs
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
#nix.daemonNiceLevel = 13;
nix.daemonCPUSchedPolicy = "batch";
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = mkDefault "20.09"; # Did you read the comment?
# Is it worth to specify this where it is needed instead of configuring it globally? Not sure yet.
nixpkgs.config.allowUnfree = true;
# Always run the latest kernel
boot.kernelPackages = mkIf (!isMobileNixos) (mkDefault pkgs.linuxPackages_latest);
boot.tmpOnTmpfs = mkDefault true;
# schedutil is a modern replacement for ondemand and conservative that is tied to the scheduler
# priority 100 is default; mkDefault is priority 1000; the goal here is to prefer schedutil over the auto-generated cpuFreqGovernor
powerManagement.cpuFreqGovernor = mkOverride 900 "schedutil";
# Restore systemd default
services.logind.killUserProcesses = true;
time.timeZone = "Europe/Berlin";
# German locale with english messages
i18n = {
defaultLocale = "de_DE.UTF-8";
extraLocaleSettings = { LC_MESSAGES = "en_US.UTF-8"; };
supportedLocales = [ "en_US.UTF-8/UTF-8" "de_DE.UTF-8/UTF-8" ];
};
console = {
font = "Lat2-Terminus16";
#keyMap = "de-latin1-nodeadkeys";
useXkbConfig = true;
# Gruvbox tty colors
colors = [ "000000" "cc241d" "98971a" "d79921" "458588" "b16286" "689d6a" "a89984" "928374" "fb4934" "b8bb26" "fabd2f" "83a598" "d3869b" "8ec07c" "ebdbb2" ];
};
services.xserver = {
layout = "de";
xkbModel = "pc105";
xkbVariant = "nodeadkeys";
xkbOptions = "caps:escape,shift:both_capslock";
};
# I like to be able to carry my laptops with the lid closed while they are still running
services.logind.lidSwitch = "ignore";
services.openssh.enable = true;
services.openssh.passwordAuthentication = false;
programs.ssh.startAgent = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
root
foot.terminfo
tree
htop
ripgrep
fd
];
users = {
mutableUsers = false;
defaultUserShell = pkgs.zsh;
users.root = {
passwordFile = "/etc/secrets/passwords/root";
};
users.jens = {
uid = 1000;
isNormalUser = true;
passwordFile = "/etc/secrets/passwords/jens";
extraGroups = [ "wheel" "audio" "dialout" "networkmanager" ];
dotfiles.profiles = [ "base" ];
};
};
}
...@@ -70,7 +70,7 @@ in ...@@ -70,7 +70,7 @@ in
layout = "de"; layout = "de";
xkbModel = "pc105"; xkbModel = "pc105";
xkbVariant = "nodeadkeys"; xkbVariant = "nodeadkeys";
xkbOptions = "caps:escape_shifted_capslock"; xkbOptions = "caps:escape";
}; };
# I like to be able to carry my laptops with the lid closed while they are still running # I like to be able to carry my laptops with the lid closed while they are still running
...@@ -127,7 +127,7 @@ in ...@@ -127,7 +127,7 @@ in
picocom picocom
pv pv
socat socat
reptyr #reptyr
ldns ldns
libfaketime libfaketime
moreutils moreutils
......
{ pkgs, lib, ... }:
let
script = pkgs.writeScriptBin "depthai-vm-hotplug" ''
#!${pkgs.bash}/bin/bash
set -e
DOMAIN=depthai-gui
if [ "''${ACTION}" == 'bind' ]; then
COMMAND='attach-device'
elif [ "''${ACTION}" == 'remove' ]; then
COMMAND='detach-device'
if [ "''${PRODUCT}" == '3e7/2485/1' ]; then
ID_VENDOR_ID=03e7
ID_MODEL_ID=2485
fi
if [ "''${PRODUCT}" == '3e7/f63b/100' ]; then
ID_VENDOR_ID=03e7
ID_MODEL_ID=f63b
fi
else
echo "Invalid udev ACTION: ''${ACTION}" >&2
exit 1
fi
echo "Running virsh ''${COMMAND} ''${DOMAIN} for ''${ID_VENDOR}." >&2
${pkgs.libvirt}/bin/virsh --connect 'qemu:///system' "''${COMMAND}" "''${DOMAIN}" /dev/stdin <<END
<hostdev mode='subsystem' type='usb'>
<source>
<vendor id='0x''${ID_VENDOR_ID}'/>
<product id='0x''${ID_MODEL_ID}'/>
</source>
</hostdev>
END
exit 0
'';
scriptBin = "${pkgs.systemd}/bin/systemd-cat ${script}/bin/depthai-vm-hotplug";
in {
services.udev.packages = lib.singleton (pkgs.writeTextFile {
name = "depthai-udev-rules";
destination = "/etc/udev/rules.d/90-depthai.rules";
text = ''
SUBSYSTEM=="usb", ACTION=="bind", ENV{ID_VENDOR_ID}=="03e7", MODE="0666", RUN+="${scriptBin}"
SUBSYSTEM=="usb", ACTION=="remove", ENV{PRODUCT}=="3e7/2485/1", ENV{DEVTYPE}=="usb_device", MODE="0666", RUN+="${scriptBin}"
SUBSYSTEM=="usb", ACTION=="remove", ENV{PRODUCT}=="3e7/f63b/100", ENV{DEVTYPE}=="usb_device", MODE="0666", RUN+="${scriptBin}"
'';
#text = ''
# SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"
#'';
});
#systemd.services.depthai = {
# script = "echo Camera connected";
# unitConfig = {
# Description = "depthai camera service";
# };
#};
}
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cabal-install
#haskell-language-server
haskellPackages.hoogle haskellPackages.hoogle
ghcid
#haskellPackages.threadscope #haskellPackages.threadscope
]; ];
......
...@@ -4,5 +4,7 @@ ...@@ -4,5 +4,7 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
rustc rustc
cargo cargo
# repl
evcxr
]; ];
} }
{ pkgs, lib, ... }:
{
services.udev.packages = lib.singleton (pkgs.writeTextFile {
name = "g213-udev-rules";
destination = "/etc/udev/rules.d/91-g213.rules";
text = ''
SUBSYSTEMS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c336", TAG+="systemd", ENV{SYSTEMD_WANTS}="g213.service"
'';
});
systemd.services.g213= {
script = "sleep 1s; ${pkgs.g810-led}/bin/g213-led -dp c336 -a ff0000";
unitConfig = {
Description = "g213 led preset";
};
};
}
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ {
systemd.sockets.g810-led = { systemd.sockets.g815-led = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
partOf = [ "g810-led.service" ]; partOf = [ "g815-led.service" ];
unitConfig = { unitConfig = {
Description = "Logitech keyboard led socket"; Description = "Logitech keyboard led socket";
}; };
socketConfig = { socketConfig = {
ListenStream = "/run/g810-led.socket"; ListenStream = "/run/g815-led.socket";
SocketUser = "jens"; SocketUser = "jens";
Accept = "yes"; Accept = "yes";
MaxConnections = 1; MaxConnections = 1;
}; };
}; };
systemd.services."g810-led@" = { systemd.services."g815-led@" = {
after = [ "g810-led.socket" ]; after = [ "g815-led.socket" ];
requires = [ "g810-led.socket" ]; requires = [ "g815-led.socket" ];
bindsTo = [ "g810-led.socket" ]; bindsTo = [ "g815-led.socket" ];
unitConfig = { unitConfig = {
Description = "Logitech keyboard led backend"; Description = "Logitech keyboard led backend";
}; };
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.g810-led}/bin/g810-led -pp"; ExecStart = "${pkgs.g810-led}/bin/g815-led -dp c33f -pp";
StandardInput = "socket"; StandardInput = "socket";
}; };
}; };
...@@ -36,9 +36,9 @@ ...@@ -36,9 +36,9 @@
}); });
systemd.services.q-g815= { systemd.services.q-g815= {
after = [ "g810-led.socket" ]; after = [ "g815-led.socket" ];
requires = [ "g810-led.socket" "q-system.socket" ]; requires = [ "g815-led.socket" "q-system.socket" ];
script = "${pkgs.q}/bin/q g815 daemon | ${pkgs.socat}/bin/socat stdin unix-connect:/run/g810-led.socket"; script = "${pkgs.q}/bin/q g815 daemon | ${pkgs.socat}/bin/socat stdin unix-connect:/run/g815-led.socket";
unitConfig = { unitConfig = {
Description = "g815 led control"; Description = "g815 led control";
}; };
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
}; };
}; };
systemd.sockets.q-system = { systemd.sockets.q-system = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
partOf = [ "q-system.service" ]; partOf = [ "q-system.service" ];
......
...@@ -15,7 +15,7 @@ in ...@@ -15,7 +15,7 @@ in
tcp = mkIf config.queezle.qnet.enable { tcp = mkIf config.queezle.qnet.enable {
enable = true; enable = true;
# TODO get ip range from config # TODO get ip range from config
anonymousClients.allowedIpRanges = ["10.0.0.0/24"]; anonymousClients.allowedIpRanges = ["10.0.0.0/24" "fd42:2a03:0099:ec13::/64"];
}; };
}; };
users.users.pulse = { users.users.pulse = {
......
...@@ -26,11 +26,7 @@ ...@@ -26,11 +26,7 @@
wineBuild = "wineWow"; wineBuild = "wineWow";
wineRelease = "stable"; wineRelease = "stable";
pulseaudioSupport = true; pulseaudioSupport = true;
pngSupport = true;
jpegSupport = true;
colorManagementSupport = true;
openalSupport = true; openalSupport = true;
tiffSupport = true;
vaSupport = true; vaSupport = true;
fontconfigSupport = true; fontconfigSupport = true;
alsaSupport = true; alsaSupport = true;
......
...@@ -7,10 +7,15 @@ ...@@ -7,10 +7,15 @@
#./vscode.nix #./vscode.nix
]; ];
queezle.emacs.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# password manager # password manager
keepassxc keepassxc
# calculator
qalculate-gtk
# spaced repetition software # spaced repetition software
anki-bin anki-bin
...@@ -32,8 +37,11 @@ ...@@ -32,8 +37,11 @@
# admin stuff # admin stuff
virtmanager virtmanager
];
### CLI
# Search unicode glyphs
unipicker
];
users.users.adobe = { users.users.adobe = {
isNormalUser = true; isNormalUser = true;
......
...@@ -120,11 +120,20 @@ in ...@@ -120,11 +120,20 @@ in
autoload -Uz compinit autoload -Uz compinit
compinit compinit
# Restore truecolor support over ssh
if [[ $TERM==foot && -z $COLORTERM ]] {
export COLORTERM=truecolor
}
if (( $+commands[direnv] )) if (( $+commands[direnv] ))
then then
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"
fi fi
woman() {
emacsclient -c -t -a "" -e "(woman \"''${(j:-:)@:q:q}\")"
}
nman() { nman() {
if [[ -n "$1" ]] if [[ -n "$1" ]]
then then
...@@ -339,5 +348,25 @@ in ...@@ -339,5 +348,25 @@ in
cd $tmpdir cd $tmpdir
zsh -is zsh -is
) )
tmpenv () {
sudo systemd-run \
--system \
--uid=$UID \
--property=ProtectSystem=strict \
--property=ProtectHome=tmpfs \
--property=TemporaryFileSystem=$HOME:nodev,noatime,nosuid,mode=0755,uid=$UID \
--property=TemporaryFileSystem=/tmp:nodev,noatime,nosuid,mode=0755,uid=$UID \
--property=BindReadOnlyPaths=-$HOME/.nix-defexpr/channels \
--property=BindPaths=$PWD \
--property=ReadWritePaths=-/nix/var/nix/daemon-socket/socket \
--pty \
--same-dir \
--wait \
--collect \
--service-type=exec \
$@ \
zsh
}
''; '';
} }
...@@ -22,17 +22,17 @@ let ...@@ -22,17 +22,17 @@ let
rustPlatform.buildRustPackage { rustPlatform.buildRustPackage {
version = efinal.tsc.version; version = efinal.tsc.version;
src = efinal.tsc.src; src = efinal.tsc.src;
pname = "tsc-dyn"; pname = "tsc-dyn";
commit = efinal.tsc.version; commit = efinal.tsc.version;
nativeBuildInputs = [ llvmPackages.clang ]; nativeBuildInputs = [ llvmPackages.clang ];
sourceRoot = "source/core"; sourceRoot = "source/core";
configurePhase = '' configurePhase = ''
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib" export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
''; '';
postInstall = '' postInstall = ''
LIB=($out/lib/libtsc_dyn.*) LIB=($out/lib/libtsc_dyn.*)
TSC_PATH=$out/share/emacs/site-lisp/elpa/tsc-${version} TSC_PATH=$out/share/emacs/site-lisp/elpa/tsc-${version}
...@@ -41,8 +41,8 @@ let ...@@ -41,8 +41,8 @@ let
echo -n $version > $TSC_PATH/DYN-VERSION echo -n $version > $TSC_PATH/DYN-VERSION
rm -r $out/lib rm -r $out/lib
''; '';
cargoSha256 = "sha256-JHBIOVNRjOpFcUSzLlMrO4dmOdAY9RecglXrF9c3tRg="; cargoSha256 = "sha256-JHBIOVNRjOpFcUSzLlMrO4dmOdAY9RecglXrF9c3tRg=";
}) {}; }) {};
} }
); );
...@@ -170,6 +170,7 @@ let ...@@ -170,6 +170,7 @@ let
(column-number-mode) (column-number-mode)
(setq-default show-trailing-whitespace t) (setq-default show-trailing-whitespace t)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(global-hl-line-mode) (global-hl-line-mode)
...@@ -294,6 +295,7 @@ let ...@@ -294,6 +295,7 @@ let
(set-face-attribute 'treemacs-root-face nil :height 1.0) (set-face-attribute 'treemacs-root-face nil :height 1.0)
;; I'm unhappy with this keybinding
(keymap-global-set "<leader> t" #'treemacs) (keymap-global-set "<leader> t" #'treemacs)
......
...@@ -44,9 +44,6 @@ set $active #51c9ff ...@@ -44,9 +44,6 @@ set $active #51c9ff
set $wallpaper ${config.queezle.sway.wallpaper} set $wallpaper ${config.queezle.sway.wallpaper}
set $lockscreen ${config.queezle.sway.lockscreen} set $lockscreen ${config.queezle.sway.lockscreen}
set $terminal terminal
set $terminal2 terminal2
set $workspace_q 0:q set $workspace_q 0:q
set $workspace_messaging 11:msg set $workspace_messaging 11:msg
set $workspace_telegram 12:t set $workspace_telegram 12:t
...@@ -56,7 +53,7 @@ input * { ...@@ -56,7 +53,7 @@ input * {
xkb_layout de xkb_layout de
xkb_variant nodeadkeys xkb_variant nodeadkeys
xkb_numlock enable xkb_numlock enable
xkb_options caps:escape_shifted_capslock xkb_options caps:escape
} }
input 7805:12850:ROCCAT_ROCCAT_Ryos_MK_Pro { input 7805:12850:ROCCAT_ROCCAT_Ryos_MK_Pro {
...@@ -113,6 +110,8 @@ for_window [class=qutebrowser] border pixel ...@@ -113,6 +110,8 @@ for_window [class=qutebrowser] border pixel
for_window [class="Vncviewer"] fullscreen enable for_window [class="Vncviewer"] fullscreen enable
for_window [app_id=.*-floating] floating enable
# sway # sway
bindsym $mod+n bar mode toggle bindsym $mod+n bar mode toggle
...@@ -229,9 +228,10 @@ bindsym $mod+asciicircum workspace $workspace_q ...@@ -229,9 +228,10 @@ bindsym $mod+asciicircum workspace $workspace_q
bindsym $mod+Shift+asciicircum move container to workspace $workspace_q bindsym $mod+Shift+asciicircum move container to workspace $workspace_q
# start a terminal # start a terminal
bindsym $mod+Return exec $terminal bindsym $mod+Return exec terminal
bindsym $mod+numbersign exec terminal-floating
bindsym $mod+Shift+Return exec cool-retro-term --fullscreen --profile "Monochrome Green" bindsym $mod+Shift+Return exec cool-retro-term --fullscreen --profile "Monochrome Green"
bindsym $mod+Alt+Return exec $terminal2 bindsym $mod+Alt+Return exec terminal2
# start program launcher # start program launcher
bindsym $mod+Tab exec launcher bindsym $mod+Tab exec launcher
...@@ -244,10 +244,10 @@ bindsym $mod+p exec project-launcher ...@@ -244,10 +244,10 @@ bindsym $mod+p exec project-launcher
#bindsym $mod+o exec cool-retro-term --fullscreen --profile "Default Amber" -e ssh edi #bindsym $mod+o exec cool-retro-term --fullscreen --profile "Default Amber" -e ssh edi
# start a python terminal # start a python terminal
#bindsym $mod+p exec $terminal python #bindsym $mod+p exec terminal python
# start an haskel ghci terminal (TODO) # start an haskel ghci terminal (TODO)
#bindsym $mod+Shift+p exec $terminal stack ghci --verbosity warning #bindsym $mod+Shift+p exec terminal stack ghci --verbosity warning
# start a browser # start a browser
bindsym $mod+b exec "chromium --enable-features=WebRTCPipeWireCapturer --force-dark-mode" bindsym $mod+b exec "chromium --enable-features=WebRTCPipeWireCapturer --force-dark-mode"
...@@ -256,7 +256,7 @@ bindsym $mod+b exec "chromium --enable-features=WebRTCPipeWireCapturer --force-d ...@@ -256,7 +256,7 @@ bindsym $mod+b exec "chromium --enable-features=WebRTCPipeWireCapturer --force-d
#bindsym $mod+Shift+b exec qutebrowser #bindsym $mod+Shift+b exec qutebrowser
# start htop # start htop
bindsym $mod+Escape exec $terminal htop bindsym $mod+Escape exec terminal htop
# Messaging workspace / open matrix client # Messaging workspace / open matrix client
bindsym $mod+i workspace $workspace_messaging bindsym $mod+i workspace $workspace_messaging
...@@ -273,7 +273,7 @@ bindsym $mod+Shift+m move container to workspace $workspace_music ...@@ -273,7 +273,7 @@ bindsym $mod+Shift+m move container to workspace $workspace_music
# start spotify instead of mopidy web interface while mopidy is broken # start spotify instead of mopidy web interface while mopidy is broken
#bindsym $mod+Ctrl+m workspace $workspace_music; exec chromium --app=http://stargate:6680/iris/#/ #bindsym $mod+Ctrl+m workspace $workspace_music; exec chromium --app=http://stargate:6680/iris/#/
bindsym $mod+Ctrl+m workspace $workspace_music; exec spotify bindsym $mod+Ctrl+m workspace $workspace_music; exec spotify
bindsym $mod+Alt+m exec $terminal pulsemixer bindsym $mod+Alt+m exec terminal pulsemixer
#bindsym $mod+Ctrl+m workspace $workspace_music; exec ~/run/spotify-singleton #bindsym $mod+Ctrl+m workspace $workspace_music; exec ~/run/spotify-singleton
# scratchpad # scratchpad
...@@ -449,7 +449,7 @@ mode $super_mode { ...@@ -449,7 +449,7 @@ mode $super_mode {
bindsym grave mode $goto_mark bindsym grave mode $goto_mark
bindsym acute mode $goto_mark bindsym acute mode $goto_mark
#bindsym Return exec $terminal; mode "default" #bindsym Return exec terminal; mode "default"
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
...@@ -460,6 +460,9 @@ mode $super_mode { ...@@ -460,6 +460,9 @@ mode $super_mode {
#bindsym --release Super_L mode $super_mode #bindsym --release Super_L mode $super_mode
for_window [app_id=qalculate-gtk] floating enable
# Basic color configuration using the Base16 variables for windows and borders. # Basic color configuration using the Base16 variables for windows and borders.
# Property Name Border BG Text Indicator Child Border # Property Name Border BG Text Indicator Child Border
client.focused $base01 $base01 $active $active $base01 client.focused $base01 $base01 $active $active $base01
......
...@@ -8,6 +8,9 @@ let ...@@ -8,6 +8,9 @@ let
terminal2 = pkgs.writeScriptBin "terminal2" '' terminal2 = pkgs.writeScriptBin "terminal2" ''
PROMPT_NO_INITIAL_NEWLINE=1 ${config.queezle.terminal.alt.executable} "$@" PROMPT_NO_INITIAL_NEWLINE=1 ${config.queezle.terminal.alt.executable} "$@"
''; '';
terminal-floating = pkgs.writeScriptBin "terminal-floating" ''
PROMPT_NO_INITIAL_NEWLINE=1 ${config.queezle.terminal.executable} --app-id terminal-floating "$@"
'';
in in
{ {
options = { options = {
...@@ -36,6 +39,7 @@ in ...@@ -36,6 +39,7 @@ in
environment.systemPackages = [ environment.systemPackages = [
terminal terminal
terminal2 terminal2
terminal-floating
pkgs.foot pkgs.foot
] ++ optional (!config.queezle.terminal.forceSoftwareRenderer) pkgs.kitty; ] ++ optional (!config.queezle.terminal.forceSoftwareRenderer) pkgs.kitty;
}; };
......
...@@ -2,6 +2,7 @@ self: super: ...@@ -2,6 +2,7 @@ self: super:
rec { rec {
neovim-queezle = import ./neovim { pkgs = self; }; neovim-queezle = import ./neovim { pkgs = self; };
simpleandsoft = import ./simpleandsoft { pkgs = self; }; simpleandsoft = import ./simpleandsoft { pkgs = self; };
netevent = self.callPackage ./netevent {}; netevent = self.callPackage ./netevent {};
g810-led = self.callPackage ./g810-led {}; g810-led = self.callPackage ./g810-led {};
...@@ -15,16 +16,6 @@ rec { ...@@ -15,16 +16,6 @@ rec {
scripts = [ self.mpvScripts.mpris ]; scripts = [ self.mpvScripts.mpris ];
}; };
fuzzel = super.fuzzel.overrideAttrs (old: old // {
src = self.fetchFromGitea {
domain = "codeberg.org";
owner = "dnkl";
repo = "fuzzel";
rev = "0014c0b2e33d4c967c26f2ccc34013a2a3cbb7bc";
sha256 = "sha256-fYPXKnJFZVh4vPq7g0qLBEPl/LPUC3By7bVmN9mwsJg=";
};
});
haskell = super.haskell // { haskell = super.haskell // {
packageOverrides = hself: hsuper: super.haskell.packageOverrides hself hsuper // { packageOverrides = hself: hsuper: super.haskell.packageOverrides hself hsuper // {
#net-mqtt = self.haskell.lib.doJailbreak hsuper.net-mqtt; #net-mqtt = self.haskell.lib.doJailbreak hsuper.net-mqtt;
......