Many things

This commit is contained in:
Andrea Ciceri 2022-11-02 22:51:05 +01:00
parent 3b11f01f84
commit 6b3c9e83f7
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
17 changed files with 139 additions and 28 deletions

View file

@ -100,8 +100,8 @@
(define-innermode poly-sh-innermode
:mode 'sh-mode
:head-matcher "^.*=.*''.*$"
:tail-matcher "^.*''.*;.*$"
:head-matcher "^.*[+=].*''"
:tail-matcher "''.*[+;].*$"
:head-mode 'host
:tail-mode 'host)
@ -109,3 +109,11 @@
:hostmode 'poly-nix-hostmode
:innermodes '(poly-sh-innermode))
))
(after! org
(setq-default prettify-symbols-alist
'(("[ ]" "")
("[X]" "")
("[-]" "")
("#+begin_src" "λ")
("#+end_src" "λ"))))

View file

@ -105,7 +105,7 @@
;;taskrunner ; taskrunner for all your projects
terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
;; tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
@ -152,7 +152,7 @@
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
(nix +tree-sitter) ; I hereby declare "nix geht mehr!"
(nix) ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org +roam2) ; organize your plain life in plain text
;;php ; perl's insecure younger brother

11
flake.lock generated
View file

@ -727,15 +727,16 @@
"nixpkgsUnstable": "nixpkgsUnstable_2"
},
"locked": {
"lastModified": 1665032132,
"narHash": "sha256-3TtIR7JXGewZmvN4TknmVPzZkPptxJUxDvlfxks46tA=",
"owner": "danielfullmer",
"lastModified": 1665920835,
"narHash": "sha256-FBe55Yz8q8lcgq5H/yClqeen7bTZtNGom6UAdAP+Pvg=",
"owner": "atemu",
"repo": "robotnix",
"rev": "2bcd6a106fd73e5f6454a4e3afc2d29cb78a2793",
"rev": "dd7e83fb19c7ef7eb87d21ceb07fb44d84ddbd57",
"type": "github"
},
"original": {
"owner": "danielfullmer",
"owner": "atemu",
"ref": "update/lineageos",
"repo": "robotnix",
"type": "github"
}

View file

@ -13,13 +13,14 @@
agenix.url = github:ryantm/agenix;
doomEmacs.url = github:nix-community/nix-doom-emacs;
comma.url = github:nix-community/comma;
robotnix.url = github:danielfullmer/robotnix;
robotnix.url = github:atemu/robotnix/update/lineageos;
};
outputs = {self, ...} @ inputs: let
utils = import ./utils inputs;
inherit
(utils)
androidGenerateKeysScripts
androidImages
checkFormatting
formatApp
@ -34,7 +35,11 @@
packages = androidImages;
apps = lib.recursiveUpdate (mkVmApps self.nixosConfigurations) formatApp;
apps = lib.foldr lib.recursiveUpdate {} [
(mkVmApps self.nixosConfigurations)
formatApp
androidGenerateKeysScripts
];
checks = checkFormatting ./.;

View file

@ -1,3 +1,18 @@
{pkgs, ...}: {
home.packages = [pkgs.element-desktop];
systemd.user.services.element-desktop = {
Install.WantedBy = ["graphical-session.target"];
Unit = {
Description = "Element";
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = "${pkgs.element-desktop}/bin/element-desktop";
Restart = "on-failure";
RestartSec = 3;
};
};
}

View file

@ -0,0 +1,18 @@
{pkgs, ...}: {
home.packages = [pkgs.franz];
systemd.user.services.franz = {
Install.WantedBy = ["graphical-session.target"];
Unit = {
Description = "Franz";
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = "${pkgs.franz}/bin/franz";
Restart = "on-failure";
RestartSec = 3;
};
};
}

View file

@ -34,6 +34,7 @@
"-c"
];
content.pdfjs = true;
scrolling.smooth = true;
fonts = {
default_size = "11pt";
tabs = {

View file

@ -59,6 +59,13 @@
command = "${pkgs.waybar}/bin/waybar";
}
];
assigns = {
"1" = [{title = ".*Mozilla Firefox$";} {title = ".*qutebrowser$";}];
"2" = [{title = ".*Emacs$";}];
"3" = [{title = "Slack.*";}];
"8" = [{title = "^Franz$";}];
"9" = [{title = "^Element.*";}];
};
floating.criteria = [
{title = "MetaMask Notification.*";}
{title = "Volume Control";} # pavucontrol

View file

@ -1,7 +1,7 @@
* {
border: none;
font-family: "Fira Code, Symbols Nerd Font";
font-weight: bold;
font-weight: normal;
font-size: 9pt;
min-height: 0;
}
@ -14,7 +14,7 @@ window#waybar {
transition-duration: .5s;
}
window .modules-right * {
window .modules-right :not(image) { /* :not(image) excluded tray icon */
margin: 0 1rem;
}
@ -28,6 +28,10 @@ window#waybar.hidden {
color: #ffffff;
}
#workspaces button label {
font-size: 25px;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);

View file

@ -27,13 +27,26 @@
"sway/workspaces" = {
all-outputs = true;
disable-scroll-wraparound = true;
active-only = true;
format = "{icon}";
on-click = "activate";
format-icons = {
"1" = "";
"2" = "";
"3" = "";
"8" = "";
"9" = "";
urgent = "";
default = "";
};
sort-by-number = true;
};
"sway/mode" = {tooltip = false;};
"sway/window" = {max_length = 50;};
tray = {
spacing = "1px";
spacing = 10;
};
battery = {
format = "{capacity}% {icon}";

View file

@ -0,0 +1,3 @@
{
programs.zathura.enable = true;
}

View file

@ -0,0 +1,15 @@
{
config,
lib,
pkgs,
...
}: {
signing.enable = true;
# apps.prebuilt = {
# whatsapp.apk = (pkgs.fetchurl {
# url = "https://d.apkpure.com/b/APK/com.whatsapp?versionCode=222403004";
# sha256 = "0000000000000000000000000000000000000000000000000000000000000000";
# });
# };
}

View file

@ -52,7 +52,9 @@
"sway"
"udiskie"
"vscode"
"franz"
"xdg"
"zathura"
];
packages = with pkgs; [
comma
@ -75,7 +77,6 @@
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
boot.binfmt.emulatedSystems = ["aarch64-linux"];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction

View file

@ -58,7 +58,9 @@
options = ["bind"];
};
swapDevices = [];
swapDevices = [
{device = "/dev/disk/by-label/swap";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -4,8 +4,8 @@
pkgs,
...
}: {
boot.binfmt.emulatedSystems = ["aarch64-linux"];
boot.binfmt.emulatedSystems = ["aarch64-linux" "i686-linux"];
nix.extraOptions = ''
extra-platforms = aarch64-linux arm-linux
extra-platforms = aarch64-linux arm-linux i686-linux
'';
}

View file

@ -17,12 +17,14 @@
"mlabs.cachix.org-1:gStKdEqNKcrlSQw5iMW6wFCj3+b+1ASpBVY2SYuNV2M="
"aciceri-fleet.cachix.org-1:e1AodrwmzRWy0eQi3lUY71M41fp9Sq+UpuKKv705xsI="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"robotnix.cachix.org-1:+y88eX6KTvkJyernp1knbpttlaLTboVp4vq/b24BIv0="
];
substituters = [
"https://cache.iog.io"
"https://mlabs.cachix.org"
"https://aciceri-fleet.cachix.org"
"https://nix-community.cachix.org"
"https://robotnix.cachix.org"
];
};

View file

@ -77,9 +77,13 @@
name,
device,
flavor,
androidVersion,
}:
lib.robotnixSystem {
inherit device flavor;
imports = [
(../hosts + "/${name}")
];
};
androidConfigurations = {
@ -87,10 +91,21 @@
name = "oneplus5t";
device = "dumpling";
flavor = "lineageos";
androidVersion = 12;
};
};
androidImages = lib.perSystem (system: builtins.mapAttrs (name: conf: conf.img) androidConfigurations);
androidImages = lib.perSystem (system: builtins.mapAttrs (confName: conf: conf.img) androidConfigurations);
androidGenerateKeysScripts = lib.perSystem (system:
lib.mapAttrs' (confName: conf: {
name = "${confName}-generateKeys";
value = {
type = "app";
program = "${conf.generateKeysScript}";
};
})
androidConfigurations);
mkVmApp = system: configuration: let
shellScript = pkgsFor.${system}.writeShellScript "run-vm" ''
@ -154,6 +169,7 @@
});
in {
inherit
androidGenerateKeysScripts
androidImages
checkFormatting
formatApp