forked from irl/nix-configs
Compare commits
7 commits
Author | SHA1 | Date | |
---|---|---|---|
3b810aebc0 | |||
c03c840154 | |||
f655c56b22 | |||
6e8d58e5ac | |||
1cd9bccbbb | |||
4bb4ec3db4 | |||
fb13b01ffd |
4 changed files with 161 additions and 29 deletions
67
flake.lock
generated
67
flake.lock
generated
|
@ -1,5 +1,26 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nur",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733312601,
|
||||||
|
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
|
@ -53,11 +74,34 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nur": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"treefmt-nix": "treefmt-nix"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1749201010,
|
||||||
|
"narHash": "sha256-haiPLogZwEFQTrIarZD92LUK7ScIcMbtEzPlcC988Qk=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "NUR",
|
||||||
|
"rev": "17efc5275a8f21e2b48f39ecade74cdaff3ba411",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "NUR",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nur": "nur"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
@ -74,6 +118,27 @@
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"treefmt-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nur",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733222881,
|
||||||
|
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
60
flake.nix
60
flake.nix
|
@ -8,18 +8,30 @@
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# nur = {
|
nur = {
|
||||||
# url = "github:nix-community/NUR";
|
url = "github:nix-community/NUR";
|
||||||
# inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
# };
|
};
|
||||||
};
|
};
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
home-manager,
|
home-manager,
|
||||||
|
nur,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
supportedSystems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
"aarch64-linux"
|
||||||
|
];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
overlays = [
|
||||||
|
nur.overlays.default
|
||||||
|
];
|
||||||
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
laptop = nixpkgs.lib.nixosSystem {
|
laptop = nixpkgs.lib.nixosSystem {
|
||||||
|
@ -31,23 +43,31 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
homeConfigurations = nixpkgs.lib.foldl' (
|
||||||
|
acc: system:
|
||||||
|
acc
|
||||||
|
// {
|
||||||
|
"irl-${system}" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system overlays;
|
||||||
|
};
|
||||||
|
modules = [ ./home/irl.nix ];
|
||||||
|
};
|
||||||
|
"irl-gui-${system}" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system overlays;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./home/irl.nix
|
||||||
|
{
|
||||||
|
irl.gui-packages = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
) { } supportedSystems;
|
||||||
}
|
}
|
||||||
// flake-utils.lib.eachSystem flake-utils.lib.allSystems (system: {
|
// flake-utils.lib.eachSystem supportedSystems (system: {
|
||||||
formatter = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
|
formatter = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
|
||||||
packages.homeConfigurations = {
|
|
||||||
irl = home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
modules = [ ./home/irl.nix ];
|
|
||||||
};
|
|
||||||
irl-gui = home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
modules = [
|
|
||||||
./home/irl.nix
|
|
||||||
{
|
|
||||||
irl.gui-packages = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
61
home/irl.nix
61
home/irl.nix
|
@ -13,17 +13,21 @@ in
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home.username = "irl";
|
home.username = "irl";
|
||||||
home.homeDirectory = "/home/irl";
|
home.homeDirectory =
|
||||||
|
if lib.strings.hasSuffix "darwin" pkgs.system then "/Users/irl" else "/home/irl";
|
||||||
home.stateVersion = "25.05";
|
home.stateVersion = "25.05";
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
fish
|
fish
|
||||||
neofetch
|
neofetch
|
||||||
|
rust-analyzer
|
||||||
starship
|
starship
|
||||||
tree
|
tree
|
||||||
];
|
];
|
||||||
home.shellAliases = {
|
home.shellAliases = {
|
||||||
hms =
|
hms =
|
||||||
"home-manager switch --flake ~/.config/nix-configs#irl" + (if cfg.gui-packages then "-gui" else "");
|
"home-manager switch --flake ~/.config/nix-configs#irl"
|
||||||
|
+ (if cfg.gui-packages then "-gui" else "")
|
||||||
|
+ "-${pkgs.system}";
|
||||||
};
|
};
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -39,11 +43,15 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles.irl = {
|
profiles.irl = {
|
||||||
extensions = {
|
extensions = {
|
||||||
# packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
force = true;
|
||||||
# bitwarden
|
packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
# kagi-search
|
bitwarden
|
||||||
# privacy-badger
|
kagi-search
|
||||||
# ];
|
privacy-badger
|
||||||
|
];
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
"extensions.autoDisableScope" = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -86,8 +94,47 @@ in
|
||||||
vimdiffAlias = true;
|
vimdiffAlias = true;
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
bufferline-nvim
|
bufferline-nvim
|
||||||
|
nvim-lspconfig
|
||||||
nvim-treesitter.withAllGrammars
|
nvim-treesitter.withAllGrammars
|
||||||
];
|
];
|
||||||
|
extraLuaConfig = ''
|
||||||
|
vim.lsp.config('rust_analyzer', {
|
||||||
|
settings = {
|
||||||
|
['rust-analyzer'] = {},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
group = vim.api.nvim_create_augroup('my.lsp', {}),
|
||||||
|
callback = function(args)
|
||||||
|
local client = assert(vim.lsp.get_client_by_id(args.data.client_id))
|
||||||
|
if client:supports_method('textDocument/implementation') then
|
||||||
|
-- Create a keymap for vim.lsp.buf.implementation ...
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Enable auto-completion. Note: Use CTRL-Y to select an item. |complete_CTRL-Y|
|
||||||
|
if client:supports_method('textDocument/completion') then
|
||||||
|
-- Optional: trigger autocompletion on EVERY keypress. May be slow!
|
||||||
|
-- local chars = {}; for i = 32, 126 do table.insert(chars, string.char(i)) end
|
||||||
|
-- client.server_capabilities.completionProvider.triggerCharacters = chars
|
||||||
|
|
||||||
|
vim.lsp.completion.enable(true, client.id, args.buf, {autotrigger = true})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Auto-format ("lint") on save.
|
||||||
|
-- Usually not needed if server supports "textDocument/willSaveWaitUntil".
|
||||||
|
if not client:supports_method('textDocument/willSaveWaitUntil')
|
||||||
|
and client:supports_method('textDocument/formatting') then
|
||||||
|
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
|
group = vim.api.nvim_create_augroup('my.lsp', {clear=false}),
|
||||||
|
buffer = args.buf,
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.buf.format({ bufnr = args.buf, id = client.id, timeout_ms = 1000 })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
hardware.gpgSmartcards.enable = true;
|
hardware.gpgSmartcards.enable = true;
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSSHSupport = true;
|
# enableSSHSupport = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "25.05";
|
system.stateVersion = "25.05";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue