Compare commits

...

2 Commits

Author SHA1 Message Date
29939b2b63 Build agda from source, install emacs lmao 2024-09-15 23:21:13 +02:00
7a4d0f7340 Small changes on nixos 2024-09-15 23:20:47 +02:00
8 changed files with 120 additions and 10 deletions

View File

@ -1,5 +1,27 @@
{ {
"nodes": { "nodes": {
"agda": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1723809509,
"narHash": "sha256-aC0Vc/YV+rodv1qG839rqNFBqoqy/AkgvLdHxymCIu4=",
"owner": "agda",
"repo": "agda",
"rev": "df1a26d96683ebb06aa8476e4af6bbeddf23efbe",
"type": "github"
},
"original": {
"owner": "agda",
"ref": "v2.7.0",
"repo": "agda",
"type": "github"
}
},
"ansi-utils": { "ansi-utils": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
@ -36,6 +58,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1701473968,
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -194,11 +234,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1719956923, "lastModified": 1726062281,
"narHash": "sha256-nNJHJ9kfPdzYsCOlHOnbiiyKjZUW5sWbwx3cakg3/C4=", "narHash": "sha256-PyFVySdGj3enKqm8RQuo4v1KLJLmNLOq2yYOHsI6e2Q=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "706eef542dec88cc0ed25b9075d3037564b2d164", "rev": "e65aa8301ba4f0ab8cb98f944c14aa9da07394f8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -208,8 +248,27 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1701253981,
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agda": "agda",
"ansi-utils": "ansi-utils", "ansi-utils": "ansi-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"kak": "kak", "kak": "kak",

View File

@ -29,13 +29,17 @@
url = "git+https://git@githug.xyz/xenia/unambig-path"; url = "git+https://git@githug.xyz/xenia/unambig-path";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
agda = {
url = "github:agda/agda?ref=v2.7.0";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-apple-silicon = { nixos-apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon"; url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = { self, nixpkgs, home-manager, nix-darwin, kak, unispect, ansi-utils, unambig-path, nixos-apple-silicon }: outputs = { self, nixpkgs, home-manager, nix-darwin, kak, unispect, ansi-utils, unambig-path, agda, nixos-apple-silicon }:
let let
mkPkgs = system: import nixpkgs { system = system; config.allowUnfree = true; }; mkPkgs = system: import nixpkgs { system = system; config.allowUnfree = true; };
mkPkgsUnsupported = system: import nixpkgs { system = system; config.allowUnfree = true; config.allowUnsupportedSystem = true; }; mkPkgsUnsupported = system: import nixpkgs { system = system; config.allowUnfree = true; config.allowUnsupportedSystem = true; };
@ -46,9 +50,11 @@
unispect = unispect.packages.${system}.unispect; unispect = unispect.packages.${system}.unispect;
ansi-utils = ansi-utils.packages.${system}; ansi-utils = ansi-utils.packages.${system};
unambig-path = unambig-path.packages.${system}.unambig-path; unambig-path = unambig-path.packages.${system}.unambig-path;
agda = agda.packages.${system}.default;
}; };
mkPC = {system, pkgs} : import ./home/graphical.nix { mkPC = {system, pkgs} : import ./home/graphical.nix {
inherit pkgs; inherit pkgs;
agda = agda.packages.${system}.default;
}; };
mkLaptop = {system, pkgs} : import ./home/apps.nix { mkLaptop = {system, pkgs} : import ./home/apps.nix {
inherit pkgs; inherit pkgs;

View File

@ -54,7 +54,7 @@ esac";
}; };
mouse.hide_when_typing = stdenv.isDarwin; mouse.hide_when_typing = stdenv.isDarwin;
font = { font = {
normal.family = "uzura_font"; normal.family = "SAX2";
size = font-size; size = font-size;
}; };
colors.primary = { colors.primary = {

View File

@ -1,4 +1,4 @@
{ pkgs, username, home-dir, prompt-color, kak-pkg, unispect, ansi-utils, unambig-path }: { pkgs, username, home-dir, prompt-color, kak-pkg, unispect, ansi-utils, unambig-path, agda }:
let let
kak = import ./kak.nix { kak = kak-pkg; inherit pkgs; }; kak = import ./kak.nix { kak = kak-pkg; inherit pkgs; };
@ -11,7 +11,9 @@ in rec {
home.stateVersion = "23.05"; home.stateVersion = "23.05";
home.packages = with pkgs; extras.all ++ [ home.packages =
[ agda ] ++ (with pkgs.agdaPackages; [ standard-library cubical ])
++ extras.all ++ (with pkgs; [
# Terminal utilities # Terminal utilities
unispect unispect
ansi-utils.ansicols ansi-utils.ansicols
@ -39,15 +41,17 @@ in rec {
pyusb usbtmc pyusb usbtmc
ipython mypy (pylsp-mypy.overrideAttrs (old: { doCheck = false; })) ipython mypy (pylsp-mypy.overrideAttrs (old: { doCheck = false; }))
])) ]))
( agda.withPackages (ps: with ps; [ standard-library cubical ]) ) sqlite-interactive
typst typst
# nodePackages.typescript # nodePackages.typescript
# nodePackages.typescript-language-server # nodePackages.typescript-language-server
zulip-term zulip-term
ngspice
# (extras.challtools python311Packages) # (extras.challtools python311Packages)
]; ]);
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;

View File

@ -1,4 +1,4 @@
{ pkgs }: { pkgs, agda }:
let let
alacritty = import ./alacritty/alacritty.nix pkgs; alacritty = import ./alacritty/alacritty.nix pkgs;
@ -16,6 +16,28 @@ let
cp -r Alloy.app $out/Applications cp -r Alloy.app $out/Applications
''; '';
}; };
agda2-mode = pkgs.emacsPackages.trivialBuild {
pname = "agda-mode";
version = agda.version;
dontUnpack = true;
# already byte-compiled by Agda builder
buildPhase = ''
agda=`${agda}/bin/agda-mode locate`
cp `dirname $agda`/*.el* .
'';
meta = {
inherit (agda.meta) homepage license;
description = "Agda2-mode for Emacs extracted from Agda package";
longDescription = ''
Wrapper packages that liberates init.el from `agda-mode locate` magic.
Simply add this to user profile or systemPackages and do `(require
'agda2)` in init.el.
'';
};
};
in rec { in rec {
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -26,4 +48,13 @@ in rec {
; ;
programs.alacritty = alacritty; programs.alacritty = alacritty;
programs.emacs = {
package = pkgs.emacs;
enable = true;
extraPackages = epkgs: [agda2-mode] ++ (with epkgs; [
vterm bind-key rust-mode lsp-mode company meow haskell-mode
terraform-mode nix-mode insert-kaomoji
]);
extraConfig = builtins.readFile ../dotfiles/init.el;
};
} }

View File

@ -29,6 +29,8 @@ in
services.desktopManager.plasma6.enable = true; services.desktopManager.plasma6.enable = true;
services.displayManager.defaultSession = "plasma"; services.displayManager.defaultSession = "plasma";
services.mullvad-vpn.enable = true;
hardware.opengl.enable = true; hardware.opengl.enable = true;
console.useXkbConfig = true; console.useXkbConfig = true;
@ -55,6 +57,7 @@ in
stilo-themes stilo-themes
firefox firefox
thunderbird
glxinfo glxinfo
start-plasma-shortcut start-plasma-shortcut
]; ];

View File

@ -56,4 +56,7 @@ xkb_symbols "fox" {
include "level3(lalt_switch)" include "level3(lalt_switch)"
key <RTSH> { [ Alt_R ] }; key <RTSH> { [ Alt_R ] };
# key <RALT> { [ Super_L ] };
key <LWIN> { [ Super_L ] };
key <RWIN> { [ Shift_L ] };
}; };

View File

@ -23,5 +23,9 @@
mountPoint = "/home/xenia/foxshare"; mountPoint = "/home/xenia/foxshare";
options = ["uid=${builtins.toString config.users.users.xenia.uid}" "nofail"]; options = ["uid=${builtins.toString config.users.users.xenia.uid}" "nofail"];
}; };
swapDevices = [{
device = "/swap";
size = 16 * 1024; # 16GB
}];
} }