Everything works decently (now using EXWM)

This commit is contained in:
Andrea Ciceri 2022-09-28 17:41:17 +02:00
parent 270252e5f8
commit dd4cbbb517
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
19 changed files with 291 additions and 108 deletions

4
.envrc
View file

@ -1,2 +1,2 @@
watch_file shell/* flake.nix
use flake || use nix
nix_direnv_watch_file utils/default.nix
use flake

View file

@ -90,7 +90,7 @@
;;debugger ; FIXME stepping through code, to help you add bugs
direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
@ -103,7 +103,7 @@
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
@ -117,7 +117,7 @@
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
;;(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c

View file

@ -16,7 +16,7 @@
;; Confgure `exwm' the X window manager for emacs.
(use-package! exwm
:config
(setq exwm-workspace-number 10)
;(mapcar (lambda (i) (exwm-workspace-switch-create i) (number-sequence 0 9)))
;(exwm-workspace-switch-create 1)
@ -27,6 +27,7 @@
([?\s-q] . kill-this-buffer)
([?\s-f] . exwm-layout-toggle-fullscreen)
([?\s-c] . exwm-input-toggle-keyboard)
([?\s-s] . (lambda () (interactive) (start-process-shell-command "screenshot" nil "maim -s -u | xclip -selection clipboard -t image/png -i")))
([?\s-d] . (lambda (command)
(interactive (list (read-shell-command "$ ")))
(start-process-shell-command command nil command)))

195
flake.lock generated
View file

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1652712410,
"narHash": "sha256-hMJ2TqLt0DleEnQFGUHK9sV2aAzJPU8pZeiZoqRozbE=",
"lastModified": 1662241716,
"narHash": "sha256-urqPvSvvGUhkwzTDxUI8N1nsdMysbAfjmBNZaTYBZRU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "7e5e58b98c3dcbf497543ff6f22591552ebfe65b",
"rev": "c96da5835b76d3d8e8d99a0fec6fe32f8539ee2e",
"type": "github"
},
"original": {
@ -18,14 +18,35 @@
"type": "github"
}
},
"comma": {
"inputs": {
"flake-compat": "flake-compat",
"naersk": "naersk",
"nixpkgs": "nixpkgs_2",
"utils": "utils"
},
"locked": {
"lastModified": 1663284638,
"narHash": "sha256-rXAX14yB8v9BOG4ZsdGEedpZAnNqhQ4DtjQwzFX/TLY=",
"owner": "nix-community",
"repo": "comma",
"rev": "c83ff3839983b3cb8deb407ff618ca12179de588",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "comma",
"type": "github"
}
},
"doom-emacs": {
"flake": false,
"locked": {
"lastModified": 1659994866,
"narHash": "sha256-6lxvYfoPtzvinBHKvuUDpCz44IJpmZMLfLMy5q9UcFk=",
"lastModified": 1660901074,
"narHash": "sha256-3apl0eQlfBj3y0gDdoPp2M6PXYnhxs0QWOHp8B8A9sc=",
"owner": "doomemacs",
"repo": "doomemacs",
"rev": "b06fd63dcb686045d0c105f93e07f80cb8de6800",
"rev": "c44bc81a05f3758ceaa28921dd9c830b9c571e61",
"type": "github"
},
"original": {
@ -38,11 +59,11 @@
"doom-snippets": {
"flake": false,
"locked": {
"lastModified": 1655900328,
"narHash": "sha256-fEYwFxW2sdzNK14DrS92OCGy8KDPZKewrHljnE/RlzQ=",
"lastModified": 1659894476,
"narHash": "sha256-1arRqlTos5uj6N47N4hyzHMMoUBxsxaZ/NK7iN5A+ZY=",
"owner": "doomemacs",
"repo": "snippets",
"rev": "6b2bd5a77c536ed414794ecf71d37a60ebd4663e",
"rev": "f957f8d195872f19c7ab0a777d592c611e10e9bb",
"type": "github"
},
"original": {
@ -62,11 +83,11 @@
"evil-org-mode": "evil-org-mode",
"evil-quick-diff": "evil-quick-diff",
"explain-pause-mode": "explain-pause-mode",
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"format-all": "format-all",
"nix-straight": "nix-straight",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"nose": "nose",
"ob-racket": "ob-racket",
"org": "org",
@ -80,11 +101,11 @@
"ws-butler": "ws-butler"
},
"locked": {
"lastModified": 1660129951,
"narHash": "sha256-uY0fxCwUQ5LmfX2CoklqOebKl6GM96qir2Zv1cbHdQI=",
"lastModified": 1662665437,
"narHash": "sha256-Aksr5xArGPbyrqEa/jxXn0/d9hc639SvpgUqfkdPLCY=",
"owner": "nix-community",
"repo": "nix-doom-emacs",
"rev": "20ca56a17dc33d67ed7d61b0e84205c617394b5b",
"rev": "a62512125de85c81fa8d1bb77ba8c8fe96d5b390",
"type": "github"
},
"original": {
@ -96,11 +117,11 @@
"emacs-overlay": {
"flake": false,
"locked": {
"lastModified": 1659638214,
"narHash": "sha256-lXa01G06Ey9qgj+rYN7Nzc53FP3p2UMMnAuxpWXu9Ko=",
"lastModified": 1662056744,
"narHash": "sha256-DSVel5s2LajK2F+bxKwenfbDis63GprQLJjAfpfWgfU=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "a151f9ff5b9fa813ac8918f3a3a67c643e7e2edc",
"rev": "6b4445aa659fa26b4f36d9975b34632312699a85",
"type": "github"
},
"original": {
@ -221,13 +242,29 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1656928814,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
@ -273,14 +310,14 @@
"nixpkgs": [
"nixpkgsUnstable"
],
"utils": "utils"
"utils": "utils_2"
},
"locked": {
"lastModified": 1660505226,
"narHash": "sha256-Jl1w6X3qNfp0Y5PwRlz/tlhVa6Wzzceq1iScni3gb9s=",
"lastModified": 1662759269,
"narHash": "sha256-lt8bAfEZudCQb+MxoNKmenhMTXhu3RCCyLYxU9t5FFk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ff5133843c26979f8abb5dd801b32f40287692fa",
"rev": "9f7fe353b613d0e45d7a5cdbd1f13c96c15803dd",
"type": "github"
},
"original": {
@ -289,6 +326,28 @@
"type": "github"
}
},
"naersk": {
"inputs": {
"nixpkgs": [
"comma",
"nixpkgs"
]
},
"locked": {
"lastModified": 1662220400,
"narHash": "sha256-9o2OGQqu4xyLZP9K6kNe1pTHnyPz0Wr3raGYnr9AIgY=",
"owner": "nix-community",
"repo": "naersk",
"rev": "6944160c19cb591eb85bbf9b2f2768a935623ed3",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "naersk",
"type": "github"
}
},
"nix-straight": {
"flake": false,
"locked": {
@ -307,11 +366,11 @@
},
"nixosHardware": {
"locked": {
"lastModified": 1660740642,
"lastModified": 1660747200,
"narHash": "sha256-tTc3scY+8jG4eWOhrE1aWk2sJ2pu+KBE5axjP3h5zIA=",
"owner": "aciceri",
"repo": "nixos-hardware",
"rev": "21ad034e26eb6451d346b4a3de688042ccbff823",
"rev": "747638748e51e0b9ae3e0d4372433bd5f35c3dd5",
"type": "github"
},
"original": {
@ -338,11 +397,11 @@
},
"nixpkgsStable": {
"locked": {
"lastModified": 1660496378,
"narHash": "sha256-sgAhmrC1iSnl5T2VPPiMpciH1aRw5c7PYEdXX6jd6Gk=",
"lastModified": 1662576620,
"narHash": "sha256-yw0dBGrnbMQ73U+AIm8vA2vvoWWqMr0D6LegWuq4J6k=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "879121648fe522b38cc1cf75aef160a14a1f2e7b",
"rev": "c7bad05cd7be62d8e59131b351e1e99e6215e886",
"type": "github"
},
"original": {
@ -354,11 +413,11 @@
},
"nixpkgsUnstable": {
"locked": {
"lastModified": 1660396586,
"narHash": "sha256-ePuWn7z/J5p2lO7YokOG1o01M0pDDVL3VrStaPpS5Ig=",
"lastModified": 1662019588,
"narHash": "sha256-oPEjHKGGVbBXqwwL+UjsveJzghWiWV0n9ogo1X6l4cw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e105167e98817ba9fe079c6c3c544c6ef188e276",
"rev": "2da64a81275b68fdad38af669afeda43d401e94b",
"type": "github"
},
"original": {
@ -370,11 +429,27 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1659606041,
"narHash": "sha256-W4/u2ssr3fS4XOtltrsDD9w2kF4jYYZr6JyPGUW2jdI=",
"lastModified": 1663235518,
"narHash": "sha256-q8zLK6rK/CLXEguaPgm9yQJcY0VQtOBhAT9EV2UFK/A=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5f9b871b72b24f066b1a1e189efd0669f2888c49",
"rev": "2277e4c9010b0f27585eb0bed0a86d7cbc079354",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1661353537,
"narHash": "sha256-1E2IGPajOsrkR49mM5h55OtYnU0dGyre6gl60NXKITE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0e304ff0d9db453a4b230e9386418fd974d5804a",
"type": "github"
},
"original": {
@ -383,7 +458,7 @@
"type": "indirect"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1645655918,
"narHash": "sha256-ZfbEFRW7o237+A1P7eTKhXje435FCAoe0blj2n20Was=",
@ -432,11 +507,11 @@
"org": {
"flake": false,
"locked": {
"lastModified": 1659533964,
"narHash": "sha256-ipwJjcRzY9iqEjkG4m8EXZ6+8OMdANuXRnSwct2LByQ=",
"lastModified": 1662044935,
"narHash": "sha256-ZpxKw8L/IpxolkGyQMDut6V4i8I1T5za0QBBrztfcts=",
"owner": "emacs-straight",
"repo": "org-mode",
"rev": "4702a73031c77ba03b480b0848c137d5d8773e07",
"rev": "e36c3cc21b8b1471e1f7928a118de693819c3f12",
"type": "github"
},
"original": {
@ -448,11 +523,11 @@
"org-contrib": {
"flake": false,
"locked": {
"lastModified": 1659039737,
"narHash": "sha256-ig8pVl790DopN6ZrCTIrvojt5/0Y+aOsjE87pqIVz8M=",
"lastModified": 1661026052,
"narHash": "sha256-rE7aioQxeVjo+TVI4DIppKkmf/c7tRNzK6hQJAmUnVE=",
"owner": "emacsmirror",
"repo": "org-contrib",
"rev": "39e2abc5629c1be6186bb6489ec4f76524edf82a",
"rev": "0740bd3fe69c4b327420185d931dcf0a9900a80e",
"type": "github"
},
"original": {
@ -496,14 +571,14 @@
"preCommitHooks": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1659629599,
"narHash": "sha256-c9rvaqaH3HZo/C70E7rB18YSywa4ryTtN7CZ3cuCmoA=",
"lastModified": 1660830093,
"narHash": "sha256-HUhx3a82C7bgp2REdGFeHJdhEAzMGCk3V8xIvfBqg1I=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "6a9402e8f233de16536349d1dd3f4595c23386a4",
"rev": "8cb8ea5f1c7bc2984f460587fddd5f2e558f6eb8",
"type": "github"
},
"original": {
@ -515,11 +590,11 @@
"revealjs": {
"flake": false,
"locked": {
"lastModified": 1653993278,
"narHash": "sha256-X43lsjoLBWmttIKj9Jzut0UP0dZlsue3fYbJ3++ojbU=",
"lastModified": 1660499724,
"narHash": "sha256-BhnEmX+8h0MVol7T4Zr2w53A+AmgzcVirpwHCR/G73U=",
"owner": "hakimel",
"repo": "reveal.js",
"rev": "039972c730690af7a83a5cb832056a7cc8b565d7",
"rev": "b23d15c4304a9a1b72f484171fc97682e5ed85a3",
"type": "github"
},
"original": {
@ -531,6 +606,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"comma": "comma",
"doomEmacs": "doomEmacs",
"homeManager": "homeManager",
"nixosHardware": "nixosHardware",
@ -574,11 +650,11 @@
"ts-fold": {
"flake": false,
"locked": {
"lastModified": 1659171920,
"narHash": "sha256-/yY3Ph/BE3PFZhnBIQIHkwOW/43phSI7WeoMvU83TG4=",
"lastModified": 1662006199,
"narHash": "sha256-gDelW/h2LyknTQNkHODvzCJCKelLdLIQoDh/L1lk3KA=",
"owner": "jcs-elpa",
"repo": "ts-fold",
"rev": "17d131f69a717d7e8cc6d3af9dfa7d2b5e2b78ef",
"rev": "28409a0ceede0751ed9d520c6a19d1f5f1211502",
"type": "github"
},
"original": {
@ -588,6 +664,21 @@
}
},
"utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_2": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",

View file

@ -12,18 +12,10 @@
preCommitHooks.url = github:cachix/pre-commit-hooks.nix;
agenix.url = github:ryantm/agenix;
doomEmacs.url = github:nix-community/nix-doom-emacs;
comma.url = github:nix-community/comma;
};
outputs = {
self,
nixpkgsUnstable,
nixpkgsStable,
nixosHardware,
homeManager,
preCommitHooks,
agenix,
doomEmacs,
} @ inputs: let
outputs = {self, ...} @ inputs: let
utils = (import ./utils) inputs;
inherit (utils) lib mkConfigurations mkVmApps checkFormatting formatter formatApp mkDevShell;
in {

View file

@ -0,0 +1,3 @@
{pkgs, ...}: {
home.packages = [pkgs.cura];
}

View file

@ -23,5 +23,7 @@
fd
imagemagick
sqlite
maim
xclip
];
}

View file

@ -2,6 +2,5 @@
services.udiskie = {
enable = true;
automount = true;
tray = "never";
};
}

View file

@ -20,6 +20,8 @@
"adb"
"qmk-udev"
"bluetooth"
"docker"
"transmission"
];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];

View file

@ -5,4 +5,6 @@
enable = true;
package = pkgs.pulseaudioFull;
};
users.extraUsers.ccr.extraGroups = ["audio"];
}

View file

@ -46,9 +46,19 @@
"element"
"udiskie"
"discord"
"cura"
];
home.packages = with pkgs; [
comma
];
home.stateVersion = config.system.stateVersion;
# TODO move away from here
xdg.enable = true;
home.pointerCursor = {
x11.enable = true;
size = 32;
package = pkgs.vanilla-dmz;
name = "Vanilla-DMZ";
};
};
}

View file

@ -0,0 +1,9 @@
{
config,
lib,
pkgs,
...
}: {
virtualisation.docker.enable = true;
users.users.ccr.extraGroups = ["docker"];
}

BIN
modules/exwm/black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

View file

@ -1,38 +1,54 @@
{pkgs, ...}: {
services.xserver = {
enable = true;
autorun = false;
autorun = true;
exportConfiguration = true;
layout = "us";
xkbModel = "thinkpad";
xkbVariant = "altgr-intl";
libinput.enable = true;
displayManager.startx.enable = true;
displayManager = {
defaultSession = "none+exwm";
autoLogin.enable = true;
autoLogin.user = "ccr";
sddm = {
enable = true;
autoLogin.relogin = true;
#background = "#000000";
};
};
desktopManager = {
xterm.enable = false;
};
windowManager = {
session = pkgs.lib.singleton {
name = "exwm";
# TODO query emacs daemon to discover if it's ready to start EXWM)` before starting the session
start = ''
exec dbus-launch --exit-with-session emacsclient --create-frame -F "((fullscreen . fullboth))" --eval "(exwm-init)"
'';
};
};
};
hardware.opengl.enable = true;
home-manager.users.ccr.home.file.".xinitrc".text = ''
# Disable access control for the current user.
xhost +SI:localuser:$USER
# Make Java applications aware this is a non-reparenting window manager.
export _JAVA_AWT_WM_NONREPARENTING=1
# Set default cursor.
xsetroot -cursor_name left_ptr
# Set keyboard repeat rate.
xset r rate 200 60
# Uncomment the following block to use the exwm-xim module.
export XMODIFIERS=@im=exwm-xim
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim
export CLUTTER_IM_MODULE=xim
dbus-update-activation-environment DISPLAY
# Lockscreen
exec ${pkgs.xss-lock}/bin/xss-lock -- ${pkgs.i3lock-blur}/bin/i3lock-color &
# Finally start Emacs
exec dbus-launch emacsclient --create-frame -F "((fullscreen . fullboth))"
services.xserver.displayManager.sessionCommands = ''
${pkgs.xorg.xrdb}/bin/xrdb -merge <${
pkgs.writeText "Xresources" ''
Xcursor.theme: Adwaita
Xcursor.size: 16
Emacs.Background: black
''
}
'';
home-manager.users.ccr = {
services.network-manager-applet.enable = true;
services.blueman-applet.enable = true;
services.pasystray.enable = true;
xsession.enable = true;
};
services.udisks2.enable = true;
hardware.opengl.enable = true;
}

View file

@ -7,6 +7,19 @@
nix = {
settings = {
auto-optimise-store = true;
trusted-users = [
"root"
"ccr"
"@wheel"
];
trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"mlabs.cachix.org-1:gStKdEqNKcrlSQw5iMW6wFCj3+b+1ASpBVY2SYuNV2M="
];
substituters = [
"https://cache.iog.io"
"https://mlabs.cachix.org/"
];
};
extraOptions = ''
@ -21,4 +34,13 @@
optimise.automatic = true;
};
age.secrets.mlabs-cachix.file = ../../secrets/mlabs-cachix.age;
system.activationScripts = {
populate-netrc.text = ''
cat <<EOF> /etc/nix/netrc
machine mlabs.cachix.org login "" password "$(cat ${config.age.secrets.mlabs-cachix.path})"
EOF
'';
};
}

View file

@ -0,0 +1,17 @@
{
config,
lib,
pkgs,
...
}: {
services.transmission = {
enable = true;
settings = {
rpc-port = 9091;
rpc-whitelist-enabled = false;
rpc-host-whitelist-enabled = false;
};
};
users.users.ccr.extraGroups = ["transmission"];
}

7
secrets/default.nix Normal file
View file

@ -0,0 +1,7 @@
let
keys = {
agenix = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC5cEUx25pnZiH3eBrE2xNbJ92gJiKSznDUNRzcEL4ti6FlJm+75p4q0hgdqHwStR8+uCWBL6viVFCGutOVMFE5MX1Oc3A8fJdR6H9Rrwvk/1UQzqzc9tWxw1qPLKz+fnPDomjOvNofghCWQRwX3Xf1HnIqvRwELpNbR9i+/cHkDGzLJxkstbt4gol8ywMPkw02QdKk8s5MEd1vawxc+7Chs0JPW57RDqDYFErYys52JLeAViCBB9bofF+KT42LuRXKSjWlvCV9kR5TL49vUeBgzMQWMh++WQdN4m9lpqFqYyc75I49/E0HGf8LChDSS+hvRnb5MbtnVGjEA4WDHyldmJCvUNob5CUo4FjoSPRi+S/J3Ads8D4JVwaJOJEVqmMKEhiQ0Hzk4hwe3eV/VumlZj4U/QjaCrqqi4TW/iP0gNRfzcfiM+G/z5R7w1NMUpTX7oilyKjMQmGnXB857D3SSptS7dwh5OiKhVmrQMRCduooUsj236abqLU28K//RnxhOgh8kDGgoUHApnTiMZNKhgLiR42lKrubNcW1tAAqoNyFLMwwXeMLjh0iP1b5y8ntfNPNIcGb7vcwpS24z/aIjW7rQ4J7x5EBphHGhys6ne+irdhOM8c7kFr+c8+Q2oU0YAtFuMYztAFOHm1e20X00Zvys2nuee+hT9F1NungAQ==";
};
in {
"secrets/mlabs-cachix.age".publicKeys = [keys.agenix];
}

BIN
secrets/mlabs-cachix.age Normal file

Binary file not shown.

View file

@ -5,6 +5,7 @@
homeManager,
doomEmacs,
agenix,
comma,
...
}: let
supportedSystems = {x86_64-linux = "x86_64-linux";};
@ -26,15 +27,15 @@
[
{
networking.hostName = lib.mkForce name;
home-manager.users.ccr.imports = [
doomEmacs.hmModule
];
age.identityPaths = ["/home/ccr/.ssh/id_rsa"];
nixpkgs.overlays = [agenix.overlay comma.overlays.default];
}
(../hosts + "/${name}")
homeManager.nixosModule
agenix.nixosModule
{
home-manager.users.ccr.imports = [
doomEmacs.hmModule
];
}
]
++ modules;
specialArgs = {
@ -55,7 +56,6 @@
mkVmApp = system: configuration: let
shellScript = pkgsFor.${system}.writeShellScript "run-vm" ''
#rm ${configuration.config.networking.hostName}.qcow2
${configuration.config.system.build.vm}/bin/run-${configuration.config.networking.hostName}-vm
'';
in {
@ -99,9 +99,19 @@
}
);
mkDevShell = lib.perSystem (system: {
default = pkgsFor.${system}.mkShell {
inherit (checkFormattingHook.${system}.nix) shellHook;
mkDevShell = lib.perSystem (system: let
pkgs = pkgsFor.${system};
in {
default = pkgs.mkShell {
shellHook =
checkFormattingHook.${system}.nix.shellHook
+ ''
export RULES="$(git rev-parse --show-toplevel)/secrets/default.nix";
'';
packages = with pkgs; [
git
agenix.packages.${system}.agenix
];
};
});
in {