Compare commits

...

3 commits

8 changed files with 123 additions and 42 deletions

65
flake.lock generated
View file

@ -115,11 +115,11 @@
},
"crane": {
"locked": {
"lastModified": 1731098351,
"narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=",
"lastModified": 1754269165,
"narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=",
"owner": "ipetkov",
"repo": "crane",
"rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28",
"rev": "444e81206df3f7d92780680e45858e31d2f07a08",
"type": "github"
},
"original": {
@ -265,11 +265,11 @@
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
@ -325,11 +325,11 @@
]
},
"locked": {
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"lastModified": 1754091436,
"narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd",
"type": "github"
},
"original": {
@ -695,16 +695,16 @@
"rust-overlay": "rust-overlay_3"
},
"locked": {
"lastModified": 1737639419,
"narHash": "sha256-AEEDktApTEZ5PZXNDkry2YV2k6t0dTgLPEmAZbnigXU=",
"lastModified": 1762205063,
"narHash": "sha256-If6vQ+KvtKs3ARBO9G3l+4wFSCYtRBrwX1z+I+B61wQ=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "a65905a09e2c43ff63be8c0e86a93712361f871e",
"rev": "88b8a563ff5704f4e8d8e5118fb911fa2110ca05",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "v0.4.2",
"ref": "v0.4.3",
"repo": "lanzaboote",
"type": "github"
}
@ -791,7 +791,7 @@
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_3",
"nixpkgs-stable": "nixpkgs-stable_2",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
@ -1026,22 +1026,6 @@
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1730741070,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_3": {
"locked": {
"lastModified": 1761468971,
"narHash": "sha256-vY2OLVg5ZTobdroQKQQSipSIkHlxOTrIF1fsMzPh8w8=",
@ -1075,11 +1059,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1731919951,
"narHash": "sha256-vOM6ETpl1yu9KLi/icTmLJIPbbdJCdAVYUXZceO/Ce4=",
"lastModified": 1754243818,
"narHash": "sha256-sEPw2W01UPf0xNGnMGNZIaE1XHkk7O+lLLetYEXVZHk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "04386ac325a813047fc314d4b4d838a5b1e3c7fe",
"rev": "c460617dfb709a67d18bb31e15e455390ee4ee1c",
"type": "github"
},
"original": {
@ -1296,15 +1280,14 @@
"nixpkgs": [
"lanzaboote",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_2"
]
},
"locked": {
"lastModified": 1731363552,
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
"lastModified": 1750779888,
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
"type": "github"
},
"original": {
@ -1393,11 +1376,11 @@
]
},
"locked": {
"lastModified": 1731897198,
"narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=",
"lastModified": 1761791894,
"narHash": "sha256-myRIDh+PxaREz+z9LzbqBJF+SnTFJwkthKDX9zMyddY=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "0be641045af6d8666c11c2c40e45ffc9667839b5",
"rev": "59c45eb69d9222a4362673141e00ff77842cd219",
"type": "github"
},
"original": {

View file

@ -203,7 +203,7 @@
type = "github";
owner = "nix-community";
repo = "lanzaboote";
ref = "v0.4.2";
ref = "v0.4.3";
};
nix-doom = {

View file

@ -43,6 +43,9 @@ in
};
shellInitLast = # fish
''
if test -e ~/.config/guix/current/bin/guix
fish_add_path -pPm ~/.config/guix/current/bin
end
if test -d ~/.guix-profile
set -gx GUIX_PROFILE ~/.guix-profile
if test -f $GUIX_PROFILE/etc/profile

View file

@ -1,6 +1,7 @@
{
lib,
config,
options,
...
}:
let
@ -19,6 +20,10 @@ in
enable = true;
dates = "weekly";
};
substituters.urls = [
"https://mirror.sjtu.edu.cn/guix/"
]
++ options.services.guix.substituters.urls.default;
};
};
}

View file

@ -15,6 +15,7 @@ in
./spotifyd.nix
./nautilus.nix
./neovim-nightly.nix
./vim.nix
# Nur
./nur.nix

View file

@ -0,0 +1,8 @@
{ outputs, ... }:
_final: prev:
let
inherit (prev.stdenv.hostPlatform) system;
in
{
vim = outputs.packages.${system}.vim';
}

15
pkgs/vim'/package.nix Normal file
View file

@ -0,0 +1,15 @@
{ vim-full, vimPlugins }:
vim-full.customize {
name = "vim";
vimrcConfig = {
customRC = builtins.readFile ./vimrc.vim;
packages.myVimPackage = {
start = with vimPlugins; [
vim-one
vim-airline
];
opt = [ ];
};
};
}

66
pkgs/vim'/vimrc.vim Normal file
View file

@ -0,0 +1,66 @@
source $VIMRUNTIME/defaults.vim
colorscheme one
set background=light
" Set airline
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = "unique_tail_improved"
let g:airline_powerline_fonts = 1
" Set option
set autoindent
set autoread
set backspace=indent,eol,start
set nobackup
set breakindent
set breakindentopt=sbr
set showbreak=
set cdhome
set cmdheight=1
set completeopt=fuzzy,menuone,noselect,popup
set concealcursor=v
set confirm
set cursorline
set cursorlineopt=number,screenline
set diffopt=algorithm:minimal,closeoff,context:20,followwrap,internal,linematch:40
set errorbells
set expandtab
set exrc
set foldcolumn=0
set fsync
set nogdefault
set helplang=zh,en
set history=10000
set hlsearch
set ignorecase
set smartcase
set list
set listchars=tab:--,trail,multispace:\ ,nbsp:⍽,space
set magic
set more
set mouse=a
set number
set numberwidth=4
set relativenumber
set scrolloff=5
set shiftround
set shiftwidth=2
set noshowmode
set signcolumn=yes
set smoothscroll
set splitbelow
set splitright
set startofline
set noswapfile
set tabclose=uselast
set tabstop=2
set termguicolors
set undofile
set undolevels=100000
set virtualedit=block,onemore
set whichwrap=b,s,\<,\>
set wildmenu
set wildmode=full
set wildoptions=fuzzy,pum
set wrap