Compare commits
No commits in common. "97fd1543df71edb981f5347283e02b5e27bf066a" and "ecfc6bf1fa36ad3f7b2dd740465cb9c1a08167e7" have entirely different histories.
97fd1543df
...
ecfc6bf1fa
100
c_.nix
100
c_.nix
|
@ -1,100 +0,0 @@
|
||||||
# a small helper that only builds on top of builtins functions
|
|
||||||
{src}@inputs:
|
|
||||||
builtins // (let
|
|
||||||
formatSecondsSinceEpoch = t:
|
|
||||||
let
|
|
||||||
rem = x: y: x - x / y * y;
|
|
||||||
days = t / 86400;
|
|
||||||
secondsInDay = rem t 86400;
|
|
||||||
hours = secondsInDay / 3600;
|
|
||||||
minutes = (rem secondsInDay 3600) / 60;
|
|
||||||
seconds = rem t 60;
|
|
||||||
|
|
||||||
# Courtesy of https://stackoverflow.com/a/32158604.
|
|
||||||
z = days + 719468;
|
|
||||||
era = (if z >= 0 then z else z - 146096) / 146097;
|
|
||||||
doe = z - era * 146097;
|
|
||||||
yoe = (doe - doe / 1460 + doe / 36524 - doe / 146096) / 365;
|
|
||||||
y = yoe + era * 400;
|
|
||||||
doy = doe - (365 * yoe + yoe / 4 - yoe / 100);
|
|
||||||
mp = (5 * doy + 2) / 153;
|
|
||||||
d = doy - (153 * mp + 2) / 5 + 1;
|
|
||||||
m = mp + (if mp < 10 then 3 else -9);
|
|
||||||
y' = y + (if m <= 2 then 1 else 0);
|
|
||||||
|
|
||||||
pad = s: if builtins.stringLength s < 2 then "0" + s else s;
|
|
||||||
in "${toString y'}${pad (toString m)}${pad (toString d)}${pad (toString hours)}"
|
|
||||||
+ "${pad (toString minutes)}${pad (toString seconds)}";
|
|
||||||
|
|
||||||
fetchTree =
|
|
||||||
# this is the value of flake.lock#lock.nodes.${input_name}.locked
|
|
||||||
{type
|
|
||||||
, host? ""
|
|
||||||
, owner? ""
|
|
||||||
, repo? ""
|
|
||||||
, rev? ""
|
|
||||||
, submodules? ""
|
|
||||||
, path? ""
|
|
||||||
, narHash? null
|
|
||||||
, lastModified? 0
|
|
||||||
}@info:
|
|
||||||
if info.type == "github" then
|
|
||||||
{ outPath =
|
|
||||||
fetchTarball
|
|
||||||
({ url = "https://api.${info.host or "github.com"}/repos/"
|
|
||||||
+ "${info.owner}/${info.repo}/tarball/${info.rev}"; }
|
|
||||||
// (if info ? narHash then { sha256 = info.narHash; } else {})
|
|
||||||
);
|
|
||||||
rev = info.rev;
|
|
||||||
shortRev = builtins.substring 0 7 info.rev;
|
|
||||||
lastModified = info.lastModified;
|
|
||||||
lastModifiedDate = formatSecondsSinceEpoch info.lastModified;
|
|
||||||
narHash = info.narHash;
|
|
||||||
}
|
|
||||||
else if info.type == "git" then
|
|
||||||
{ outPath =
|
|
||||||
builtins.fetchGit
|
|
||||||
({ url = info.url; }
|
|
||||||
// (if info ? rev then { inherit (info) rev; } else {})
|
|
||||||
// (if info ? ref then { inherit (info) ref; } else {})
|
|
||||||
// (if info ? submodules then { inherit (info) submodules; } else {})
|
|
||||||
);
|
|
||||||
lastModified = info.lastModified;
|
|
||||||
lastModifiedDate = formatSecondsSinceEpoch info.lastModified;
|
|
||||||
narHash = info.narHash;
|
|
||||||
} // (if info ? rev then {
|
|
||||||
rev = info.rev;
|
|
||||||
shortRev = builtins.substring 0 7 info.rev;
|
|
||||||
} else {
|
|
||||||
})
|
|
||||||
else if info.type == "path" then
|
|
||||||
{ outPath = builtins.path {
|
|
||||||
path = if builtins.substring 0 1 info.path != "/"
|
|
||||||
then src + ("/" + info.path) # make this absolute path by prepending ./
|
|
||||||
else info.path; # it's already an absolute path
|
|
||||||
};
|
|
||||||
narHash = info.narHash;
|
|
||||||
}
|
|
||||||
else if info.type == "tarball" then
|
|
||||||
{ outPath =
|
|
||||||
fetchTarball
|
|
||||||
({ inherit (info) url; }
|
|
||||||
// (if info ? narHash then { sha256 = info.narHash; } else {})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else if info.type == "gitlab" then
|
|
||||||
{ inherit (info) rev narHash lastModified;
|
|
||||||
outPath =
|
|
||||||
fetchTarball
|
|
||||||
({ url = "https://${info.host or "gitlab.com"}/api/v4/projects/${info.owner}%2F${info.repo}/repository/archive.tar.gz?sha=${info.rev}"; }
|
|
||||||
// (if info ? narHash then { sha256 = info.narHash; } else {})
|
|
||||||
);
|
|
||||||
shortRev = builtins.substring 0 7 info.rev;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
# FIXME: add Mercurial, tarball inputs.
|
|
||||||
throw "flake input has unsupported input type '${info.type}'";
|
|
||||||
in {
|
|
||||||
inherit fetchTree;
|
|
||||||
})
|
|
||||||
|
|
10
default.nix
10
default.nix
|
@ -1,11 +1,11 @@
|
||||||
# We use top-level nix-flake, so default.nix is basically just a wrapper around ./flake.nix
|
# We use top-level nix-flake, so default.nix is basically just a wrapper around ./flake.nix
|
||||||
(import
|
(import
|
||||||
(
|
(
|
||||||
let
|
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
|
||||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
fetchTarball {
|
||||||
c_ = import ./c_.nix {src = ./.;};
|
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||||
in
|
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||||
c_.fetchTree lock.nodes.flake-compat.locked
|
}
|
||||||
)
|
)
|
||||||
{ src = ./.; }
|
{ src = ./.; }
|
||||||
).defaultNix
|
).defaultNix
|
||||||
|
|
36
flake.lock
36
flake.lock
|
@ -117,11 +117,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673737886,
|
"lastModified": 1673343300,
|
||||||
"narHash": "sha256-hNTqD0uIgpbtTI2Nuj/Q1lEFOOdZqqXpxoc8rMno2F0=",
|
"narHash": "sha256-5Xdj6kpXYMie0MlnGwqK5FaMdsedxvyuakWtyKB3zaQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "2827b5306462d91edec16a3d069b2d6e54c3079f",
|
"rev": "176e455371a8371586e8a3ff0d56ee9f3ca2324e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -156,11 +156,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "contrib",
|
"dir": "contrib",
|
||||||
"lastModified": 1673746461,
|
"lastModified": 1673683108,
|
||||||
"narHash": "sha256-Y21pbVNlPWPokXFbngSahnxeCff0LX+LKdDktEBIVm4=",
|
"narHash": "sha256-zg1W14wyrOCKiTkXU+nGHf/EfqX6wtcUWcMo4O/Q6nY=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "6134c1e8a39a5e61d0593613343a5923a86e3545",
|
"rev": "e89c39d6f016a4140293755250e968e839009617",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -177,11 +177,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673770422,
|
"lastModified": 1673684013,
|
||||||
"narHash": "sha256-hYVEUzvqobxAM2FZfWTrTLKKNfkOSfsm0uGqNoSiIvw=",
|
"narHash": "sha256-ljfG17g9K5sl7DGounCwOIfQLOGzXF0ffuDGxo3UN1E=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "fd8e5953cfeada345d7daeedce6ab0919f1284d4",
|
"rev": "85b0900729bffa5e0d1817bbc6f024916dc1f38e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -197,11 +197,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673752441,
|
"lastModified": 1673365945,
|
||||||
"narHash": "sha256-/g4ImZWV05CrXRWTSJsda6ztIp7LAPxs2L6RCrbQ66U=",
|
"narHash": "sha256-/duo8kCEbo62D5gn46m//jfvRtT56KS5dy+j6+Rl+4Y=",
|
||||||
"owner": "mic92",
|
"owner": "mic92",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "391180f77505c1c8cdd45fe1a59dc89d3e40300a",
|
"rev": "0e51ff44d6bef0b6b2bbf9e34fdc029fc24820fc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -259,11 +259,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673631141,
|
"lastModified": 1673540789,
|
||||||
"narHash": "sha256-AprpYQ5JvLS4wQG/ghm2UriZ9QZXvAwh1HlgA/6ZEVQ=",
|
"narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "befc83905c965adfd33e5cae49acb0351f6e0404",
|
"rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -308,11 +308,11 @@
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673749717,
|
"lastModified": 1673662873,
|
||||||
"narHash": "sha256-hgrw8w/AThRWfVafx3EO3/TQlGcUou4nui8X47cVhXo=",
|
"narHash": "sha256-/YOtiDKPUXKKpIhsAds11llfC42ScGW27bbHnNZebco=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "aab6eb2dfc7a1e42d94b6f24ef13639ff8544af4",
|
"rev": "90163bbbadce526f8b248a5fe545b06c59597108",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
{
|
{
|
||||||
nixConfig = {
|
|
||||||
|
|
||||||
};
|
|
||||||
description = "My personal configuration in Nix (and some native configurations)";
|
description = "My personal configuration in Nix (and some native configurations)";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
-- - zk @ https://github.com/mickael-menu/zk
|
-- - zk @ https://github.com/mickael-menu/zk
|
||||||
-- - prettierd @ npm install -g @fsouza/prettierd
|
-- - prettierd @ npm install -g @fsouza/prettierd
|
||||||
|
|
||||||
|
local data_dir = vim.fn.stdpath('data')
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
||||||
let plug_path = data_dir . '/autoload/plug.vim'
|
let plug_path = data_dir . '/autoload/plug.vim'
|
||||||
|
@ -23,6 +24,11 @@ local function truthy(v) return v ~= nil end
|
||||||
|
|
||||||
local function cfg(cfg_var, do_fn) if truthy(cfg_var) then do_fn() end end
|
local function cfg(cfg_var, do_fn) if truthy(cfg_var) then do_fn() end end
|
||||||
|
|
||||||
|
local function cfg_render(do_fn)
|
||||||
|
local should_render = not truthy(os.getenv("NVIM_HEADLESS"))
|
||||||
|
cfg(should_render, do_fn)
|
||||||
|
end
|
||||||
|
|
||||||
-- vim-plug
|
-- vim-plug
|
||||||
local Plug = vim.fn['plug#']
|
local Plug = vim.fn['plug#']
|
||||||
|
|
||||||
|
@ -81,6 +87,7 @@ Plug('kylechui/nvim-surround') -- surrounds with tags/parenthesis
|
||||||
Plug('simrat39/rust-tools.nvim') -- config rust-analyzer and nvim integration
|
Plug('simrat39/rust-tools.nvim') -- config rust-analyzer and nvim integration
|
||||||
|
|
||||||
-- UI & colorscheme
|
-- UI & colorscheme
|
||||||
|
cfg_render(function()
|
||||||
Plug('simrat39/inlay-hints.nvim') -- type-hints with pseudo-virtual texts
|
Plug('simrat39/inlay-hints.nvim') -- type-hints with pseudo-virtual texts
|
||||||
Plug('gruvbox-community/gruvbox') -- theme provider
|
Plug('gruvbox-community/gruvbox') -- theme provider
|
||||||
Plug('nvim-lualine/lualine.nvim') -- fancy status line
|
Plug('nvim-lualine/lualine.nvim') -- fancy status line
|
||||||
|
@ -88,6 +95,7 @@ Plug('lukas-reineke/indent-blankline.nvim') -- identation lines on blank lines
|
||||||
Plug('kyazdani42/nvim-web-devicons') -- icons for folder and filetypes
|
Plug('kyazdani42/nvim-web-devicons') -- icons for folder and filetypes
|
||||||
Plug('m-demare/hlargs.nvim') -- highlights arguments; great for func prog
|
Plug('m-demare/hlargs.nvim') -- highlights arguments; great for func prog
|
||||||
Plug('folke/todo-comments.nvim') -- Highlights TODO
|
Plug('folke/todo-comments.nvim') -- Highlights TODO
|
||||||
|
end)
|
||||||
|
|
||||||
-- other utilities
|
-- other utilities
|
||||||
Plug('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
|
Plug('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
|
||||||
|
@ -131,52 +139,30 @@ vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
vim.g.gruvbox_contrast_dark="soft";
|
vim.cmd([[
|
||||||
vim.g.gruvbox_contrast_light="soft";
|
set ignorecase
|
||||||
vim.opt.ignorecase = true;
|
set smartcase
|
||||||
vim.opt.smartcase = true;
|
set incsearch
|
||||||
vim.opt.incsearch = true;
|
set number relativenumber
|
||||||
vim.opt.number = true;
|
set tabstop=4 softtabstop=4
|
||||||
vim.opt.relativenumber = true;
|
set autoindent
|
||||||
vim.opt.autoindent = true;
|
set smartindent
|
||||||
vim.opt.smartindent = true;
|
set expandtab
|
||||||
vim.opt.expandtab = true;
|
set shiftwidth=4
|
||||||
vim.opt.exrc = true;
|
set exrc
|
||||||
|
set incsearch
|
||||||
vim.opt.tabstop = 4;
|
set scrolloff=30
|
||||||
vim.opt.softtabstop = 4;
|
set signcolumn=yes
|
||||||
vim.opt.shiftwidth = 4;
|
set colorcolumn=80
|
||||||
vim.opt.scrolloff = 30;
|
set background=light
|
||||||
vim.opt.signcolumn = "yes";
|
]])
|
||||||
vim.opt.colorcolumn = "80";
|
|
||||||
|
|
||||||
vim.opt.background = "light";
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command('Dark', function(opts)
|
|
||||||
-- opts: {name, args: str, fargs: Splited<str>, range, ...}
|
|
||||||
---@type string
|
|
||||||
local contrast = (opts.args and string.len(opts.args) > 0) and opts.args or vim.g.gruvbox_contrast_dark;
|
|
||||||
vim.g.gruvbox_contrast_dark = contrast;
|
|
||||||
vim.opt.background = "dark";
|
|
||||||
end,
|
|
||||||
{nargs = "?";})
|
|
||||||
|
|
||||||
vim.api.nvim_create_user_command('Light', function(opts)
|
|
||||||
-- opts: {name, args: str, fargs: Splited<str>, range, ...}
|
|
||||||
---@type string
|
|
||||||
local contrast = (opts.args and string.len(opts.args) > 0) and opts.args or vim.g.gruvbox_contrast_dark;
|
|
||||||
vim.g.gruvbox_contrast_light = contrast;
|
|
||||||
vim.opt.background = "light";
|
|
||||||
end,
|
|
||||||
{nargs = "?";})
|
|
||||||
|
|
||||||
vim.opt.lazyredraw = true
|
vim.opt.lazyredraw = true
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
-- some plugins misbehave when we do swap files
|
-- some plugins misbehave when we do swap files
|
||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
vim.opt.backup = false
|
vim.opt.backup = false
|
||||||
vim.opt.undodir = vim.fn.stdpath('state')..'/.vim/undodir'
|
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
vim.opt.completeopt = 'menuone,noselect'
|
vim.opt.completeopt = 'menuone,noselect'
|
||||||
-- vim.opt.clipboard = "unnamedplus"
|
-- vim.opt.clipboard = "unnamedplus"
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{nix-index-database
|
{
|
||||||
,...
|
|
||||||
}@inputs:{
|
|
||||||
mkModuleArgs = import ./mkModuleArgs.nix;
|
mkModuleArgs = import ./mkModuleArgs.nix;
|
||||||
modules = [
|
modules = [
|
||||||
./alacritty.nix
|
./alacritty.nix
|
||||||
|
@ -10,6 +8,5 @@
|
||||||
{
|
{
|
||||||
config.programs.home-manager.enable = true;
|
config.programs.home-manager.enable = true;
|
||||||
}
|
}
|
||||||
nix-index-database.hmModules.nix-index
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,14 +3,17 @@
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1668681692,
|
||||||
"narHash": "sha256-d6CilJXP+UPv3nF00zBBRhMgRklTCjSCMrjbYtYDuOI=",
|
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
|
||||||
"path": "../../out-of-tree/flake-compat",
|
"owner": "edolstra",
|
||||||
"type": "path"
|
"repo": "flake-compat",
|
||||||
|
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
|
||||||
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "../../out-of-tree/flake-compat",
|
"owner": "edolstra",
|
||||||
"type": "path"
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_2": {
|
"flake-compat_2": {
|
||||||
|
@ -97,11 +100,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673737886,
|
"lastModified": 1673343300,
|
||||||
"narHash": "sha256-hNTqD0uIgpbtTI2Nuj/Q1lEFOOdZqqXpxoc8rMno2F0=",
|
"narHash": "sha256-5Xdj6kpXYMie0MlnGwqK5FaMdsedxvyuakWtyKB3zaQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "2827b5306462d91edec16a3d069b2d6e54c3079f",
|
"rev": "176e455371a8371586e8a3ff0d56ee9f3ca2324e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -136,11 +139,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "contrib",
|
"dir": "contrib",
|
||||||
"lastModified": 1673746461,
|
"lastModified": 1673504032,
|
||||||
"narHash": "sha256-Y21pbVNlPWPokXFbngSahnxeCff0LX+LKdDktEBIVm4=",
|
"narHash": "sha256-x4nv7g8+bQXg5PfkFw3vCcr3pYI0Hco0VoSbAy60xek=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "6134c1e8a39a5e61d0593613343a5923a86e3545",
|
"rev": "143d3f1f3224bca02bfef7df0932b9d7524a3ff2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -157,11 +160,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673770422,
|
"lastModified": 1673511313,
|
||||||
"narHash": "sha256-hYVEUzvqobxAM2FZfWTrTLKKNfkOSfsm0uGqNoSiIvw=",
|
"narHash": "sha256-QGUT3w1bHclVRqX958EPOd3OxR/R10MoV97N5jx/qbw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "fd8e5953cfeada345d7daeedce6ab0919f1284d4",
|
"rev": "5af6fe31f9906e70a1e8985dbbdcc4ae66c7f82d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -170,26 +173,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-index-database": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1673752441,
|
|
||||||
"narHash": "sha256-/g4ImZWV05CrXRWTSJsda6ztIp7LAPxs2L6RCrbQ66U=",
|
|
||||||
"owner": "mic92",
|
|
||||||
"repo": "nix-index-database",
|
|
||||||
"rev": "391180f77505c1c8cdd45fe1a59dc89d3e40300a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "mic92",
|
|
||||||
"repo": "nix-index-database",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixgl": {
|
"nixgl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_3",
|
||||||
|
@ -239,11 +222,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673631141,
|
"lastModified": 1673450908,
|
||||||
"narHash": "sha256-AprpYQ5JvLS4wQG/ghm2UriZ9QZXvAwh1HlgA/6ZEVQ=",
|
"narHash": "sha256-b8em+kwrNtnB7gR8SyVf6WuTyQ+6tHS6dzt9D9wgKF0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "befc83905c965adfd33e5cae49acb0351f6e0404",
|
"rev": "6c8644fc37b6e141cbfa6c7dc8d98846c4ff0c2e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -276,7 +259,6 @@
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"kpcli-py": "kpcli-py",
|
"kpcli-py": "kpcli-py",
|
||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||||
"nix-index-database": "nix-index-database",
|
|
||||||
"nixgl": "nixgl",
|
"nixgl": "nixgl",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
|
@ -288,11 +270,11 @@
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673749717,
|
"lastModified": 1673576998,
|
||||||
"narHash": "sha256-hgrw8w/AThRWfVafx3EO3/TQlGcUou4nui8X47cVhXo=",
|
"narHash": "sha256-I6vYVejEWTao+Ze/F6VFSTFxu6/X2OPT3Eu4AM/zzec=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "aab6eb2dfc7a1e42d94b6f24ef13639ff8544af4",
|
"rev": "ca474ccdd5f81ed742328e15dae38bb57a1006e3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{
|
{
|
||||||
nixConfig = {
|
|
||||||
accept-flake-config = true;
|
|
||||||
experimental-features = "nix-command flakes";
|
|
||||||
};
|
|
||||||
description = "simple home-manager config";
|
description = "simple home-manager config";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
@ -15,7 +11,7 @@
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
# Allows default.nix to call onto flake.nix. Useful for nix eval and automations
|
# Allows default.nix to call onto flake.nix. Useful for nix eval and automations
|
||||||
flake-compat = {
|
flake-compat = {
|
||||||
url = "path:../../out-of-tree/flake-compat";
|
url = "github:edolstra/flake-compat";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
kpcli-py = {
|
kpcli-py = {
|
||||||
|
@ -63,7 +59,7 @@
|
||||||
config = { allowUnfree = true; };
|
config = { allowUnfree = true; };
|
||||||
};
|
};
|
||||||
# lib = (import ../lib { inherit pkgs; lib = pkgs.lib; });
|
# lib = (import ../lib { inherit pkgs; lib = pkgs.lib; });
|
||||||
base = import ./base flake_inputs;
|
base = import ./base;
|
||||||
inherit (base) mkModuleArgs;
|
inherit (base) mkModuleArgs;
|
||||||
|
|
||||||
nerd_font_module = { config, pkgs, ... }: {
|
nerd_font_module = { config, pkgs, ... }: {
|
||||||
|
@ -131,28 +127,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"hungtran" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
inherit pkgs;
|
|
||||||
modules = base.modules ++ [
|
|
||||||
./home.nix
|
|
||||||
{
|
|
||||||
base.graphics.enable = false;
|
|
||||||
# don't want to deal with GL stuffs on mac yet :/
|
|
||||||
base.graphics.useNixGL.defaultPackage = null;
|
|
||||||
# NOTE: this actually does not exist
|
|
||||||
base.keepass.path = "/Users/htran/keepass.kdbx";
|
|
||||||
base.alacritty.font.size = 11.0;
|
|
||||||
}
|
|
||||||
nerd_font_module
|
|
||||||
];
|
|
||||||
extraSpecialArgs = mkModuleArgs {
|
|
||||||
inherit pkgs;
|
|
||||||
myHome = {
|
|
||||||
username = "hungtran";
|
|
||||||
homeDirectory = "/Users/hungtran";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"htran" = home-manager.lib.homeManagerConfiguration {
|
"htran" = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = base.modules ++ [
|
modules = base.modules ++ [
|
||||||
|
|
|
@ -37,7 +37,7 @@ in
|
||||||
# pkgs.xorg.xclock # TODO: only include if have gui # For testing GL installation
|
# pkgs.xorg.xclock # TODO: only include if have gui # For testing GL installation
|
||||||
# pkgs.logseq # TODO: only include if have GL # Obsidian alt
|
# pkgs.logseq # TODO: only include if have GL # Obsidian alt
|
||||||
pkgs.mosh # Parsec for SSH
|
pkgs.mosh # Parsec for SSH
|
||||||
pkgs.nixops_unstable # nixops v2 # insecure for now
|
# pkgs.nixops_unstable # nixops v2 # insecure for now
|
||||||
pkgs.lynx # Web browser at your local terminal
|
pkgs.lynx # Web browser at your local terminal
|
||||||
pkgs.zk
|
pkgs.zk
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# NOTE: Untested on case of no home-manager
|
# NOTE: Untested on case of no home-manager
|
||||||
set -xv
|
set -xv
|
||||||
# Where this script located
|
# Where this script located
|
||||||
SCRIPT_DIR=$(readlink -f $(dirname $0))
|
SCRIPT_DIR=$(realpath $(dirname $0))
|
||||||
echo "SCRIPT_DIR: ${SCRIPT_DIR}"
|
echo "SCRIPT_DIR: ${SCRIPT_DIR}"
|
||||||
|
|
||||||
HOME_MANAGER_DIR="${SCRIPT_DIR}/../nix-conf/home-manager"
|
HOME_MANAGER_DIR="${SCRIPT_DIR}/../nix-conf/home-manager"
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
# This architecture is because we use top-level flake.nix
|
# This architecture is because we use top-level flake.nix
|
||||||
(import
|
(import
|
||||||
(
|
(
|
||||||
let
|
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
|
||||||
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
fetchTarball {
|
||||||
in (import ./c_.nix {src = ./.;}).fetchTree lock.nodes.flake-compat.locked
|
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||||
|
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||||
|
}
|
||||||
)
|
)
|
||||||
{ src = ./.; }
|
{ src = ./.; }
|
||||||
).shellNix
|
).shellNix
|
||||||
|
|
Loading…
Reference in New Issue