Compare commits

..

11 commits

Author SHA1 Message Date
cy
ff3df36198 nvim undotree and direnv 2025-01-16 11:01:55 -05:00
github-actions[bot]
09b6e25b2b
flake.lock: Update (#23)
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/65a441502c9382d41ada1adbc9bd31d6c9b00fe2?narHash=sha256-snPBgTqwn3FPZVdFC5yt7Bnk3squim1vZOZ8CObWykk%3D' (2024-12-13)
  → 'github:nix-community/disko/0141aabed359f063de7413f80d906e1d98c0c123?narHash=sha256-ItkIZyebGvNH2dK9jVGzJHGPtb6BSWLN8Gmef16NeY0%3D' (2025-01-14)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/ba9f7942037ac78a690eb7e2c15f4869c9515eb4?narHash=sha256-YKr7RhOtFFl7metHJ2oWmPF5//mlvasFr1jJ0gLdNyQ%3D' (2025-01-13)
  → 'github:nixos/nixpkgs/69b5cebd7cc197ee5885fa694465039c42a5c8dc?narHash=sha256-j9ysmoP7UJUEZdA1/Gjqa8zsx5gaq35PxRsaTBwgoWk%3D' (2025-01-15)
• Updated input 'nixpkgs-garage':
    'github:cything/nixpkgs/616be0a7b830a10d0874d569aabd40034c9151aa?narHash=sha256-KpbFF8d5cqcBF7%2Bm5fXDcPn%2BADg3kURbX49JGx18NXU%3D' (2025-01-12)
  → 'github:cything/nixpkgs/97f27249297bf5fbc563014ae9d4884dee27f1e0?narHash=sha256-A7knAvBOwoM5X7oNdIOKvuXYtXJpuR4O8iKHIk8EwOI%3D' (2025-01-15)
• Updated input 'nixvim':
    'github:nix-community/nixvim/a54b752259ff16d340d270928ee603b4b9599192?narHash=sha256-dXvzw4LmupgZb2VfwclzygiIyfqjnmKhTdjHDun2rDg%3D' (2025-01-13)
  → 'github:nix-community/nixvim/5b068e7f8f2b6beaa1fafe0c8b3604b63bcccc2d?narHash=sha256-gb3ujURRlI/D5Jc8PUDOpJr8RyrTwnDDIDtnQK4upso%3D' (2025-01-15)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-15 22:47:18 -05:00
cy
f327c0628a add codespace home 2025-01-14 10:50:19 -05:00
cy
d35639285f change forgejo landing page to explore
update git email
don't include vscode in common
2025-01-14 10:28:29 -05:00
cy
22f42ec745 make vim nicer 2025-01-14 00:01:37 -05:00
cy
66101edde5 swap scroll doc keys 2025-01-13 20:09:51 -05:00
cy
a8ce6936a7 use unstable-small 2025-01-13 20:09:39 -05:00
cy
5b27c6e0dc flake update 2025-01-13 19:17:14 -05:00
cy
8c8d0fbb56 some nvim and vscode changes 2025-01-13 15:13:10 -05:00
cy
88e38e36ec Merge branch 'vscode' 2025-01-13 15:03:29 -05:00
cy
d5b6ec3daf init 2025-01-11 18:53:55 -05:00
9 changed files with 161 additions and 111 deletions

65
flake.lock generated
View file

@ -49,11 +49,11 @@
]
},
"locked": {
"lastModified": 1734088167,
"narHash": "sha256-snPBgTqwn3FPZVdFC5yt7Bnk3squim1vZOZ8CObWykk=",
"lastModified": 1736864502,
"narHash": "sha256-ItkIZyebGvNH2dK9jVGzJHGPtb6BSWLN8Gmef16NeY0=",
"owner": "nix-community",
"repo": "disko",
"rev": "65a441502c9382d41ada1adbc9bd31d6c9b00fe2",
"rev": "0141aabed359f063de7413f80d906e1d98c0c123",
"type": "github"
},
"original": {
@ -94,26 +94,6 @@
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736143030,
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"lanzaboote",
@ -134,7 +114,7 @@
"type": "github"
}
},
"flake-parts_3": {
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
@ -268,11 +248,11 @@
]
},
"locked": {
"lastModified": 1736508663,
"narHash": "sha256-ZOaGwa+WnB7Zn3YXimqjmIugAnHePdXCmNu+AHkq808=",
"lastModified": 1736785676,
"narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2532b500c3ed2b8940e831039dcec5a5ea093afc",
"rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d",
"type": "github"
},
"original": {
@ -334,7 +314,7 @@
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
@ -380,16 +360,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1736523798,
"narHash": "sha256-Xb8mke6UCYjge9kPR9o4P1nVrhk7QBbKv3xQ9cj7h2s=",
"lastModified": 1736966948,
"narHash": "sha256-j9ysmoP7UJUEZdA1/Gjqa8zsx5gaq35PxRsaTBwgoWk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "130595eba61081acde9001f43de3248d8888ac4a",
"rev": "69b5cebd7cc197ee5885fa694465039c42a5c8dc",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
@ -412,11 +392,11 @@
},
"nixpkgs-garage": {
"locked": {
"lastModified": 1736657901,
"narHash": "sha256-KpbFF8d5cqcBF7+m5fXDcPn+ADg3kURbX49JGx18NXU=",
"lastModified": 1736921030,
"narHash": "sha256-A7knAvBOwoM5X7oNdIOKvuXYtXJpuR4O8iKHIk8EwOI=",
"owner": "cything",
"repo": "nixpkgs",
"rev": "616be0a7b830a10d0874d569aabd40034c9151aa",
"rev": "97f27249297bf5fbc563014ae9d4884dee27f1e0",
"type": "github"
},
"original": {
@ -446,7 +426,7 @@
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
@ -457,11 +437,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1736715511,
"narHash": "sha256-5YAiZ3wrEJ/fzFoCwNf14xqfRTvgdcnl/+y0vye3Y6A=",
"lastModified": 1736964246,
"narHash": "sha256-gb3ujURRlI/D5Jc8PUDOpJr8RyrTwnDDIDtnQK4upso=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "35d6c12626f9895cd5d8ccf5d19c3d00de394334",
"rev": "5b068e7f8f2b6beaa1fafe0c8b3604b63bcccc2d",
"type": "github"
},
"original": {
@ -523,7 +503,6 @@
"root": {
"inputs": {
"disko": "disko",
"flake-parts": "flake-parts",
"home-manager": "home-manager",
"lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs",
@ -566,11 +545,11 @@
]
},
"locked": {
"lastModified": 1736515725,
"narHash": "sha256-4P99yL8vGehwzytkpP87eklBePt6aqeEC5JFsIzhfUs=",
"lastModified": 1736808430,
"narHash": "sha256-wlgdf/n7bJMLBheqt1jmPoxJFrUP6FByKQFXuM9YvIk=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "f214c1b76c347a4e9c8fb68c73d4293a6820d125",
"rev": "553c7cb22fed19fd60eb310423fdc93045c51ba8",
"type": "github"
},
"original": {

138
flake.nix
View file

@ -2,7 +2,7 @@
description = "cy's flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
@ -27,8 +27,6 @@
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
nixpkgs-btrbk.url = "github:cything/nixpkgs/btrbk"; # unmerged PR
nixpkgs-garage.url = "github:cything/nixpkgs/garage-module"; # unmerged PR
@ -49,22 +47,38 @@
};
outputs =
inputs@{ flake-parts, nixpkgs, home-manager, disko, ...}:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
];
imports = [
inputs.treefmt.flakeModule
];
perSystem =
{
self',
system,
...
}:
{
treefmt = {
{
self,
nixpkgs,
home-manager,
treefmt,
disko,
...
}@inputs:
let
lib = nixpkgs.lib;
inherit (self) outputs;
systems = [ "x86_64-linux" ];
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
overlays = [
# (overlayPkgsFromFlake inputs.eza [
# ])
] ++ import ./overlay;
pkgsFor = lib.genAttrs systems (
system:
import nixpkgs {
inherit system overlays;
config = {
allowUnfree = true;
};
}
);
treefmtEval = forEachSystem (
pkgs:
treefmt.lib.evalModule pkgs {
projectRootFile = "flake.nix";
programs.nixfmt.enable = true;
programs.stylua.enable = true;
@ -74,29 +88,24 @@
programs.deadnix.enable = true;
settings.global.excludes = [ "secrets/*" ];
};
};
}
);
in
{
formatter = forEachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
checks = forEachSystem (pkgs: {
formatting = treefmtEval.${pkgs.system}.config.build.check self;
});
# lets us build overlaid packages with `nix build .#<package>`
packages = pkgsFor;
flake.nixosConfigurations =
let
lib = nixpkgs.lib;
overlays = [
# (overlayPkgsFromFlake inputs.eza [
# ])
] ++ import ./overlay;
pkgs =
import nixpkgs {
inherit overlays;
config = {
allowUnfree = true;
};
};
in
nixosConfigurations =
let
pkgs = pkgsFor.x86_64-linux;
in
{
ytnix = lib.nixosSystem {
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs outputs; };
modules = [
{
nixpkgs = { inherit pkgs; };
@ -109,7 +118,7 @@
};
chunk = lib.nixosSystem {
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs outputs; };
modules = [
{
nixpkgs = { inherit pkgs; };
@ -125,7 +134,7 @@
};
titan = lib.nixosSystem {
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs outputs; };
modules = [
{
nixpkgs = { inherit pkgs; };
@ -138,24 +147,33 @@
};
};
# homeConfigurations = {
# "yt@ytnix" = home-manager.lib.homeManagerConfiguration {
# inherit pkgs;
# extraSpecialArgs = { inherit inputs; };
# modules = [
# ./home/yt/ytnix.nix
# inputs.nixvim.homeManagerModules.nixvim
# ];
# };
#
# "yt@chunk" = home-manager.lib.homeManagerConfiguration {
# inherit pkgs;
# extraSpecialArgs = { inherit inputs; };
# modules = [
# ./home/yt/chunk.nix
# inputs.nixvim.homeManagerModules.nixvim
# ];
# };
# };
homeConfigurations = {
"yt@ytnix" = home-manager.lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
./home/yt/ytnix.nix
inputs.nixvim.homeManagerModules.nixvim
];
};
"yt@chunk" = home-manager.lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
./home/yt/chunk.nix
inputs.nixvim.homeManagerModules.nixvim
];
};
"codespace@codespace" = home-manager.lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
./home/yt/codespace.nix
inputs.nixvim.homeManagerModules.nixvim
];
};
};
};
}

View file

@ -95,8 +95,8 @@
"<C-h>" = "cmp.mapping.abort()";
"<C-n>" = "cmp.mapping.select_next_item()";
"<C-p>" = "cmp.mapping.select_prev_item()";
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
"<C-u>" = "cmp.mapping.scroll_docs(4)";
"<C-u>" = "cmp.mapping.scroll_docs(-4)";
"<C-d>" = "cmp.mapping.scroll_docs(4)";
"<C-k>" = ''
cmp.mapping(function(fallback)
if cmp.visible() then
@ -147,7 +147,7 @@
servers = {
bashls.enable = true;
lua_ls.enable = true;
nil_ls.enable = true;
nixd.enable = true;
rust_analyzer = {
enable = true;
installRustc = true;
@ -163,14 +163,20 @@
plugins.fzf-lua = {
enable = true;
keymaps = {
"<leader>ff" = "git_files";
"<leader>ff" = "files";
"<leader>fg" = "live_grep";
};
};
plugins.neo-tree = {
enable = true;
closeIfLastWindow = true;
buffers.followCurrentFile.enabled = true;
window.width = 30;
};
plugins.gitsigns = {
enable = true;
settings.current_line_blame = true;
};
plugins.cmp-buffer.enable = true;
@ -182,6 +188,8 @@
plugins.nvim-autopairs.enable = true;
plugins.rainbow-delimiters.enable = true;
plugins.web-devicons.enable = true;
plugins.gitsigns.enable = true;
plugins.auto-save.enable = true;
plugins.indent-blankline.enable = true;
plugins.undotree.enable = true;
};
}

17
home/vscode.nix Normal file
View file

@ -0,0 +1,17 @@
{pkgs, ...}: {
programs.vscode = {
enable = true;
package = pkgs.vscodium;
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
mutableExtensionsDir = false;
extensions = with pkgs.vscode-extensions; [
vscodevim.vim
jnoortheen.nix-ide # nix language support
editorconfig.editorconfig # editorconfig
dracula-theme.theme-dracula # color scheme
tomoki1207.pdf # pdf viewer
yzhang.markdown-all-in-one # markdown tools
];
};
}

22
home/yt/codespace.nix Normal file
View file

@ -0,0 +1,22 @@
{
pkgs,
...
}:
{
imports = [
./common.nix
];
home = {
username = "codespace";
homeDirectory = "/home/codespace";
stateVersion = "24.05";
};
programs.home-manager.enable = true;
systemd.user.startServices = "sd-switch";
home.packages = with pkgs; [
foot.terminfo
attic-client
];
}

View file

@ -30,7 +30,7 @@
programs.git = {
enable = true;
userName = "cy";
userEmail = "hi@cything.io";
userEmail = "cy@cy7.sh";
delta = {
enable = true;
options = {

View file

@ -138,4 +138,9 @@
};
services.gnome-keyring.enable = true;
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -116,4 +116,5 @@
programs.zoxide.enableZshIntegration = true;
programs.eza.enableZshIntegration = true;
programs.nix-index.enableZshIntegration = false;
programs.direnv.enableZshIntegration = false;
}

View file

@ -10,7 +10,7 @@
HTTP_PORT = 3000;
HTTP_ADDR = "127.0.0.1";
DOMAIN = "git.cy7.sh";
LANDING_PAGE = "/cy";
LANDING_PAGE = "explore";
};
session.COOKIE_SECURE = true;
service.DISABLE_REGISTRATION = true;