Emacs and inputs updated

- Added org-roam in Emacs
- Flake inputs updated
- Other little modifications
This commit is contained in:
Andrea Ciceri 2021-10-14 01:26:52 +02:00
parent 3f39ace857
commit 317e50ef9f
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
13 changed files with 167 additions and 119 deletions

70
flake.lock generated
View file

@ -10,11 +10,11 @@
"poetry2nix": "poetry2nix" "poetry2nix": "poetry2nix"
}, },
"locked": { "locked": {
"lastModified": 1627571355, "lastModified": 1630693543,
"narHash": "sha256-iB+s0R/d/bBISo9+JtyytNtS2YMP5oLFqcyfqhXO1qU=", "narHash": "sha256-7Sly3ReaJZw60Qo0rpfN4jF6zy94nwQz6ENgUUFzJfg=",
"owner": "lovesegfault", "owner": "lovesegfault",
"repo": "beautysh", "repo": "beautysh",
"rev": "1ad178d756f1f7e77d5215b768bc5c9d4ff8e4fa", "rev": "5609593961b70428f58d5c1b4b25cdda43b0d0bd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -50,11 +50,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1630939671, "lastModified": 1633877936,
"narHash": "sha256-ugNOm7DUHk9kxtD+FNZcRdzyiZKm/wpA0SYeBTg+DO4=", "narHash": "sha256-+o3n6s7fR8dBGRldTGelyp2j3jSyTlrniOXwNfmMG20=",
"owner": "divnix", "owner": "divnix",
"repo": "bud", "repo": "bud",
"rev": "26ba27616647dcd08dac2ee818721bc748c4ac61", "rev": "15df091133ff95216c321b09be04905c0a0944c4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -63,22 +63,6 @@
"type": "github" "type": "github"
} }
}, },
"cachix": {
"locked": {
"lastModified": 1632291606,
"narHash": "sha256-oEN24XJYAFK9tsD13TzLEizpgQigEfgC6i9x1b/1pVU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "83413f47809790e4ca012e314e7782adeae36cf2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-21.05",
"repo": "nixpkgs",
"type": "github"
}
},
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -392,33 +376,21 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs": {
"locked": {
"lastModified": 1631962327,
"narHash": "sha256-h2fgtNHozEcB42BQ1QVWAJUpQ1FA3gpgq/RrOKAxbfE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bc9b956714ed6eac5f8888322aac5bc41389defa",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-wayland": { "nixpkgs-wayland": {
"inputs": { "inputs": {
"cachix": "cachix", "cachix": [
"nixpkgs": "nixpkgs" "unstable"
],
"nixpkgs": [
"unstable"
]
}, },
"locked": { "locked": {
"lastModified": 1632342403, "lastModified": 1634158823,
"narHash": "sha256-LGHyTaXX7kO9V0zLLecBQLlZz8wPE4/DcpHGuRgs5aM=", "narHash": "sha256-l+LXVfmCH+Xk7nzghlEIAkrSta93ANax2MgRgbh6aZg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs-wayland", "repo": "nixpkgs-wayland",
"rev": "e30e03810b615aaf3beeb590fdad6009c16ccf2a", "rev": "80a3b4fb3c2ffd318c653ebaff2253dded674965",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -556,11 +528,11 @@
}, },
"stable": { "stable": {
"locked": { "locked": {
"lastModified": 1632342741, "lastModified": 1634115022,
"narHash": "sha256-8q12+qSkpVy+up1oGF2PeafBRLSslrUESRTdjn5y8u0=", "narHash": "sha256-K9DZMQ47VRrg9gtTPwex5p0E8LnwM/dDkNe7AQW0qj0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5c8efd0034e2f7565ff81a8897ca9dd761889265", "rev": "564cb4d81d4f734dd068684adec5a60077397fe9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -572,11 +544,11 @@
}, },
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1631962327, "lastModified": 1633971123,
"narHash": "sha256-h2fgtNHozEcB42BQ1QVWAJUpQ1FA3gpgq/RrOKAxbfE=", "narHash": "sha256-WmI4NbH1IPGFWVkuBkKoYgOnxgwSfWDgdZplJlQ93vA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "bc9b956714ed6eac5f8888322aac5bc41389defa", "rev": "e4ef597edfd8a0ba5f12362932fc9b1dd01a0aef",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -41,8 +41,8 @@
pinebook-pro-kernel-latest.url = github:nixos/nixpkgs/755db9a1e9a35c185f7d6c0463025e94ef44622e; pinebook-pro-kernel-latest.url = github:nixos/nixpkgs/755db9a1e9a35c185f7d6c0463025e94ef44622e;
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
# nixpkgs-wayland.inputs.nixpkgs.follows = "unstable"; nixpkgs-wayland.inputs.nixpkgs.follows = "unstable";
# nixpkgs-wayland.inputs.cachix.follows = "stable"; nixpkgs-wayland.inputs.cachix.follows = "unstable";
}; };
outputs = outputs =

View file

@ -5,7 +5,7 @@ let
in in
emacsWithPackages ( emacsWithPackages (
epkgs: ( epkgs: (
with epkgs.melpaStablePackages; [] with epkgs.melpaStablePackages; [ ]
) ++ ( ) ++ (
with epkgs.melpaPackages; [ with epkgs.melpaPackages; [
all-the-icons all-the-icons
@ -18,8 +18,10 @@ emacsWithPackages (
magit magit
company company
helm-company helm-company
helm-ag
fira-code-mode fira-code-mode
org-superstar org-superstar
org-roam
nix-mode nix-mode
lsp-python-ms lsp-python-ms
lispy lispy
@ -39,5 +41,9 @@ emacsWithPackages (
with epkgs.elpaPackages; [ with epkgs.elpaPackages; [
modus-themes modus-themes
] ]
) ++ [] ) ++ (
with pkgs; [
pkgs.graphviz-nox
]
)
) )

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
services.dbus.packages = with pkgs; [ gnome3.dconf ]; services.dbus.packages = with pkgs; [ gnome3.dconf ];
programs.dconf.enable = true;
} }

View file

@ -8,5 +8,6 @@
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
XDG_CURRENT_DESKTOP = "sway"; # https://github.com/emersion/xdg-desktop-portal-wlr/issues/20 XDG_CURRENT_DESKTOP = "sway"; # https://github.com/emersion/xdg-desktop-portal-wlr/issues/20
XDG_SESSION_TYPE = "wayland"; # https://github.com/emersion/xdg-desktop-portal-wlr/pull/11 XDG_SESSION_TYPE = "wayland"; # https://github.com/emersion/xdg-desktop-portal-wlr/pull/11
}; };
} }

View file

@ -3,12 +3,15 @@
home-manager.users.ccr = { suites, ... }: { home-manager.users.ccr = { suites, ... }: {
imports = with suites; shell ++ gui ++ browser ++ multimedia ++ dev ++ base; imports = with suites; shell ++ gui ++ browser ++ multimedia ++ dev ++ base;
home.packages = with pkgs; [ home.packages = with pkgs; [
nixpkgs-fmt
rnix-lsp
ack ack
ranger ranger
calibre calibre
element-desktop element-desktop
gtk-engine-murrine
gtk_engines
gsettings-desktop-schemas
lxappearance
yarn
]; ];
}; };

View file

@ -12,9 +12,29 @@
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
<<<<<<< HEAD
=======
python-language-server
python
>>>>>>> 651ab71 (Emacs and inputs updated)
fd fd
ag ag
nixpkgs-fmt nixpkgs-fmt
rnix-lsp rnix-lsp
<<<<<<< HEAD
] ++ (if config.network.hostname != "mbp" then python-language-server else [ ]); ] ++ (if config.network.hostname != "mbp" then python-language-server else [ ]);
=======
(
makeDesktopItem {
name = "org-protocol";
exec = "emacs %u";
#exec = "emacsclient %u";
comment = "Org protocol";
desktopName = "org-protocol";
type = "Application";
mimeType = "x-scheme-handler/org-protocol";
}
)
];
>>>>>>> 651ab71 (Emacs and inputs updated)
} }

View file

@ -9,8 +9,10 @@
) )
(use-package fira-code-mode (use-package fira-code-mode
:custom (fira-code-mode-disabled-ligatures '(":")) ;; List of ligatures to turn off :custom (fira-code-mode-disabled-ligatures '()) ;; List of ligatures to turn off
:config (global-fira-code-mode)) :config
(fira-code-mode-set-font)
(global-fira-code-mode))
(defalias 'yes-or-no-p 'y-or-n-p) (defalias 'yes-or-no-p 'y-or-n-p)

View file

@ -1,10 +1,28 @@
(use-package org (use-package org
:init :init
(setq fill-column 80) (setq fill-column 80)
(require 'org-protocol)
:hook :hook
((org-mode . refill-mode) ((org-mode . refill-mode)
(org-mode . (lambda () (org-superstar-mode 1))) (org-mode . (lambda () (org-superstar-mode 1)))
(org-mode . prettify-symbols-mode))) (org-mode . prettify-symbols-mode)))
(use-package org-roam
:init
(setq org-roam-v2-ack t)
:custom
(org-roam-directory (file-truename "~/roam/"))
(org-roam-graph-executable "dot")
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n g" . org-roam-graph)
("C-c n i" . org-roam-node-insert)
("C-c n c" . org-roam-capture)
;; Dailies
("C-c n j" . org-roam-dailies-capture-today))
:config
(org-roam-db-autosync-mode)
;; If using org-roam-protocol
(require 'org-roam-protocol))
(provide 'config-org) (provide 'config-org)

View file

@ -1,6 +1,6 @@
(use-package lsp-python-ms (use-package lsp-python-ms
:ensure t
:hook (python-mode . (lambda () :hook (python-mode . (lambda ()
(setq indent-tabs-mode nil) ; disable tabs
(require 'lsp-python-ms) (require 'lsp-python-ms)
(lsp))) (lsp)))
:init :init

View file

@ -9,6 +9,9 @@
(defun nixos-rebuild-test () (defun nixos-rebuild-test ()
(interactive) (interactive)
;; async-shell command should be sufficient, to check why it isn't
(sudo-utils-shell-command "nixos-rebuild test")) (sudo-utils-shell-command "nixos-rebuild test"))
(global-set-key [f6] 'nixos-rebuild-test)
(provide 'nix) (provide 'nix)

View file

@ -8,27 +8,25 @@
package = pkgs.whitesur-gtk-theme; package = pkgs.whitesur-gtk-theme;
}; };
iconTheme = { iconTheme = {
#name = "Adwaita"; name = "Adwaita";
#package = pkgs.gnome.adwaita-icon-theme; package = pkgs.gnome.adwaita-icon-theme;
name = "WhiteSur";
package = pkgs.whitesur-icon-theme;
}; };
}; };
home.file.".icons/default" = { # home.file.".icons/default" = {
recursive = true; # recursive = true;
source = let # source = let
drv = pkgs.stdenv.mkDerivation { # drv = pkgs.stdenv.mkDerivation {
name = "apple-cursor"; # name = "apple-cursor";
src = pkgs.fetchurl { # src = pkgs.fetchurl {
url = "https://github.com/ful1e5/apple_cursor/releases/download/v1.2.0/macOSBigSur.tar.gz"; # url = "https://github.com/ful1e5/apple_cursor/releases/download/v1.2.0/macOSBigSur.tar.gz";
sha256 = "sha256-8QNd8EEf11MIBVUbgZy6U1ZnDIWj92EGQmKLR8Edqfw="; # sha256 = "sha256-8QNd8EEf11MIBVUbgZy6U1ZnDIWj92EGQmKLR8Edqfw=";
}; # };
installPhase = '' # installPhase = ''
mkdir -p $out # mkdir -p $out
mv * $out/ # mv * $out/
''; # '';
}; # };
in # in
"${drv}/"; # "${drv}/";
}; # };
} }

View file

@ -6,47 +6,71 @@
let let
modifier = "Mod4"; modifier = "Mod4";
in in
{ {
enable = true; enable = true;
config = { wrapperFeatures.gtk = true;
modifier = modifier; config = {
menu = "${pkgs.bemenu}/bin/bemenu-run -b -m 1 -p 'λ'"; modifier = modifier;
output = { menu = "${pkgs.bemenu}/bin/bemenu-run -b -m 1 -p 'λ'";
HDMI-A-2 = { output = {
#bg = "~/dotfiles/dotfiles/xorg/wallpaper.jpg fill"; HDMI-A-2 = {
}; #bg = "~/dotfiles/dotfiles/xorg/wallpaper.jpg fill";
}; };
#fonts = [ "Font Awesome" "Fira Code" ]; };
terminal = "${pkgs.foot}/bin/footclient"; #fonts = [ "Font Awesome" "Fira Code" ];
bars = [ terminal = "${pkgs.foot}/bin/footclient";
{ bars = [
command = "${pkgs.waybar}/bin/waybar"; {
} command = "${pkgs.waybar}/bin/waybar";
]; }
startup = [ ];
{
command = "foot --server"; startup = let
always = true; gsettings = "${pkgs.glib}/bin/gsettings";
} gsettingsscript = pkgs.writeShellScript "gsettings-auto.sh" ''
]; expression=""
window.commands = [ for pair in "$@"; do
{ criteria = { app_id = "mpv"; }; command = "sticky enable"; } IFS=:; set -- $pair
{ criteria = { app_id = "mpv"; }; command = "floating enable"; } expressions="$expressions -e 's:^$2=(.*)$:${gsettings} set org.gnome.desktop.interface $1 \1:e'"
{ criteria = { title = "MetaMask Notification.*"; }; command = "floating enable"; } done
]; IFS=
input = { echo "" >/tmp/gsettings.log
"*" = { echo exec sed -E $expressions "''${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini &>>/tmp/gsettings.log
xkb_layout = "us"; eval exec sed -E $expressions "''${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini &>>/tmp/gsettings.log
xkb_variant = "intl"; '';
gsettingscmd = ''${gsettingsscript} \
gtk-theme:gtk-theme-name \
icon-theme:gtk-icon-theme-name \
font-name:gtk-font-name \
cursor-theme:gtk-cursor-theme-name'';
in
[
{
command = "foot --server";
always = true;
}
#{ always = true; command = "${gsettingscmd}"; }
];
window.commands = [
{ criteria = { app_id = "mpv"; }; command = "sticky enable"; }
{ criteria = { app_id = "mpv"; }; command = "floating enable"; }
{ criteria = { title = "MetaMask Notification.*"; }; command = "floating enable"; }
];
input = {
"*" = {
xkb_layout = "us";
xkb_variant = "intl";
};
}; };
}; };
extraConfig = ''
bindsym ${modifier}+p move workspace to output right
#seat seat0 xcursor_theme "Adwaita"
'';
xwayland = true;
systemdIntegration = true;
}; };
extraConfig = ''
bindsym ${modifier}+p move workspace to output right
'';
xwayland = true;
systemdIntegration = true;
};
}; };
programs.waybar = { programs.waybar = {
@ -62,7 +86,7 @@
"sway/mode" "sway/mode"
"sway/workspaces" "sway/workspaces"
]; ];
modules-center = [ ]; modules-center = [];
modules-right = [ modules-right = [
"idle_inhibitor" "idle_inhibitor"
"tray" "tray"