Ändringar
This commit is contained in:
parent
952e9a3229
commit
2cfb13ad40
7 changed files with 91 additions and 138 deletions
BIN
.flake.nix.swp
Normal file
BIN
.flake.nix.swp
Normal file
Binary file not shown.
|
@ -13,6 +13,7 @@
|
||||||
../moduler/common/dmenu.nix
|
../moduler/common/dmenu.nix
|
||||||
../moduler/common/kitty.nix
|
../moduler/common/kitty.nix
|
||||||
../moduler/common/tmux.nix
|
../moduler/common/tmux.nix
|
||||||
|
../moduler/common/vim.nix
|
||||||
# ../moduler/common/zsh.nix
|
# ../moduler/common/zsh.nix
|
||||||
../moduler/common/fish.nix
|
../moduler/common/fish.nix
|
||||||
# ../moduler/common/starship.nix
|
# ../moduler/common/starship.nix
|
||||||
|
@ -104,6 +105,7 @@
|
||||||
macchina
|
macchina
|
||||||
|
|
||||||
#Desktop
|
#Desktop
|
||||||
|
# vim_configurable
|
||||||
aerc
|
aerc
|
||||||
firefox
|
firefox
|
||||||
vimb
|
vimb
|
||||||
|
|
100
flake.lock
generated
100
flake.lock
generated
|
@ -1,23 +1,5 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-parts": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1715865404,
|
|
||||||
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fw-pkgs": {
|
"fw-pkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716560453,
|
"lastModified": 1716560453,
|
||||||
|
@ -41,11 +23,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715381426,
|
"lastModified": 1716729592,
|
||||||
"narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=",
|
"narHash": "sha256-Y3bOjoh2cFBqZN0Jw1zUdyr7tjygyxl2bD/QY73GZP0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4",
|
"rev": "2c78a57c544dd19b07442350727ced097e1aa6e6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -55,53 +37,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-gaming": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1716513383,
|
|
||||||
"narHash": "sha256-WKO8A3PvMRTXB5wNhFyTNXnYQThSazIyVqY5Yh4YIiI=",
|
|
||||||
"owner": "fufexan",
|
|
||||||
"repo": "nix-gaming",
|
|
||||||
"rev": "a1b37351bf0fe01192eeb93f643749f2e0f944eb",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "fufexan",
|
|
||||||
"repo": "nix-gaming",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716062047,
|
"lastModified": 1716633019,
|
||||||
"narHash": "sha256-OhysviwHQz4p2HZL4g7XGMLoUbWMjkMr/ogaR3VUYNA=",
|
"narHash": "sha256-xim1b5/HZYbWaZKyI7cn9TJCM6ewNVZnesRr00mXeS4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "02923630b89aa1ab36ef8e422501a6f4fd4b2016",
|
"rev": "9d29cd266cebf80234c98dd0b87256b6be0af44e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixpkgs-unstable",
|
"ref": "nixos-23.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1714640452,
|
|
||||||
"narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=",
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716061101,
|
"lastModified": 1716061101,
|
||||||
|
@ -120,11 +71,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716330097,
|
"lastModified": 1716509168,
|
||||||
"narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
|
"narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
|
"rev": "bfb7a882678e518398ce9a31a881538679f6f092",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -135,22 +86,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1716361217,
|
|
||||||
"narHash": "sha256-mzZDr00WUiUXVm1ujBVv6A0qRd8okaITyUp4ezYRgc4=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "46397778ef1f73414b03ed553a3368f0e7e33c2f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-23.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716062047,
|
"lastModified": 1716062047,
|
||||||
"narHash": "sha256-OhysviwHQz4p2HZL4g7XGMLoUbWMjkMr/ogaR3VUYNA=",
|
"narHash": "sha256-OhysviwHQz4p2HZL4g7XGMLoUbWMjkMr/ogaR3VUYNA=",
|
||||||
|
@ -170,29 +105,26 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"fw-pkgs": "fw-pkgs",
|
"fw-pkgs": "fw-pkgs",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-gaming": "nix-gaming",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs": "nixpkgs_2",
|
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"sops-nix": "sops-nix"
|
"sops-nix": "sops-nix"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716400300,
|
"lastModified": 1716400300,
|
||||||
"narHash": "sha256-0lMkIk9h3AzOHs1dCL9RXvvN4PM8VBKb+cyGsqOKa4c=",
|
"narHash": "sha256-0lMkIk9h3AzOHs1dCL9RXvvN4PM8VBKb+cyGsqOKa4c=",
|
||||||
"owner": "Mic92",
|
"path": "/nix/store/5cals4p1ryzfk8yb26dmk6j0rjqkyw3w-source",
|
||||||
"repo": "sops-nix",
|
|
||||||
"rev": "b549832718b8946e875c016a4785d204fcfc2e53",
|
"rev": "b549832718b8946e875c016a4785d204fcfc2e53",
|
||||||
"type": "github"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Mic92",
|
"id": "sops-nix",
|
||||||
"repo": "sops-nix",
|
"type": "indirect"
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
22
flake.nix
22
flake.nix
|
@ -10,8 +10,6 @@
|
||||||
# Home manager
|
# Home manager
|
||||||
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
|
||||||
sops-nix.url = "github:Mic92/sops-nix";
|
|
||||||
|
|
||||||
# TODO: Add any other flake you might need
|
# TODO: Add any other flake you might need
|
||||||
# hardware.url = "github:nixos/nixos-hardware";
|
# hardware.url = "github:nixos/nixos-hardware";
|
||||||
|
@ -71,17 +69,6 @@
|
||||||
};
|
};
|
||||||
modules = [./maskiner/jobb/configuration.nix];
|
modules = [./maskiner/jobb/configuration.nix];
|
||||||
};
|
};
|
||||||
server = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs outputs;
|
|
||||||
myhostname = "server";
|
|
||||||
};
|
|
||||||
inherit system;
|
|
||||||
modules = [
|
|
||||||
({nixpkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
|
||||||
./maskiner/server/configuration.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Standalone home-manager configuration entrypoint
|
# Standalone home-manager configuration entrypoint
|
||||||
|
@ -117,15 +104,6 @@
|
||||||
# > Our main home-manager configuration file <
|
# > Our main home-manager configuration file <
|
||||||
modules = [./config/home.nix];
|
modules = [./config/home.nix];
|
||||||
};
|
};
|
||||||
"fw@server" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs outputs;
|
|
||||||
myhostname = "server";
|
|
||||||
};
|
|
||||||
# > Our main home-manager configuration file <
|
|
||||||
modules = [./config/server.nix];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
font = if myhostname == "laptop" then {
|
font = if myhostname == "laptop" then {
|
||||||
name = "FiraCode Nerd Font";
|
name = "FiraCode Nerd Font";
|
||||||
size = 24;
|
size = 20;
|
||||||
} else {
|
} else {
|
||||||
name = "FiraCode Nerd Font";
|
name = "FiraCode Nerd Font";
|
||||||
size = 18;
|
size = 18;
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set -g @dracula-show-powerline true
|
set -g @dracula-show-powerline true
|
||||||
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage, network, network-bandwidth, network-ping, ssh-session, attached-clients, network-vpn, weather, time, mpc, spotify-tui, playerctl, kubernetes-context, synchronize-panes
|
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage, network, network-bandwidth, network-ping, ssh-session, attached-clients, network-vpn, weather, time, mpc, spotify-tui, playerctl, kubernetes-context, synchronize-panes
|
||||||
# set -g @dracula-plugins 'spotify-tui battery time'
|
set -g @dracula-plugins 'spotify-tui battery time'
|
||||||
set -g @dracula-plugins 'battery time'
|
# set -g @dracula-plugins 'battery time'
|
||||||
set -g @dracula-refresh-rate 10
|
set -g @dracula-refresh-rate 10
|
||||||
set -g @dracula-show-timezone false
|
set -g @dracula-show-timezone false
|
||||||
set -g @dracula-military-time true
|
set -g @dracula-military-time true
|
||||||
|
|
|
@ -1,41 +1,82 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
environment.variables = { EDITOR = "vim"; };
|
programs.vim = {
|
||||||
|
enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
((vim_configurable.override { }).customize{
|
ale
|
||||||
name = "vim";
|
|
||||||
# Install plugins for example for syntax highlighting of nix files
|
|
||||||
vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
|
|
||||||
start = [
|
|
||||||
vim-nix
|
vim-nix
|
||||||
vim-lastplace
|
vim-lastplace
|
||||||
vim-dracula
|
dracula-vim
|
||||||
vim-sensible
|
vim-sensible
|
||||||
vim-commentary
|
vim-commentary
|
||||||
vim-fugitive
|
vim-fugitive
|
||||||
fzf-vim
|
fzf-vim
|
||||||
YouCompleteMe
|
YouCompleteMe
|
||||||
|
asyncomplete-vim
|
||||||
|
asyncomplete-lsp-vim
|
||||||
|
ultisnips
|
||||||
|
vim-snippets
|
||||||
|
vim-lsp
|
||||||
|
vim-lsp-snippets
|
||||||
|
vim-lsp-ultisnips
|
||||||
|
vim-lsp-settings
|
||||||
|
asyncomplete-lsp-vim
|
||||||
];
|
];
|
||||||
opt = [];
|
settings = { ignorecase = true; };
|
||||||
};
|
extraConfig = ''
|
||||||
vimrcConfig.customRC = ''
|
nnoremap <Space>f :Files<Cr>
|
||||||
nnoremap <Space>e :Files<Cr>
|
nnoremap <Space>w :w<Cr>
|
||||||
nnoremap <Space>w :w<Cr>
|
nnoremap <Space>q :q<Cr>
|
||||||
nnoremap <Space>q :q<Cr>
|
nnoremap <Tab> :bnext<Cr>
|
||||||
nnoremap <Tab> :bnext<Cr>
|
nnoremap <S-Tab> :bprev<Cr>
|
||||||
nnoremap <S-Tab> :bprev<Cr>
|
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||||
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||||
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
|
||||||
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() : "\<cr>"
|
|
||||||
|
|
||||||
set cmdheight=1
|
set cmdheight=1
|
||||||
set relativenumber
|
set relativenumber
|
||||||
set wrap
|
set wrap
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
set termguicolors
|
set termguicolors
|
||||||
'';
|
colorscheme dracula
|
||||||
}
|
|
||||||
)];
|
function! s:on_lsp_buffer_enabled() abort
|
||||||
|
setlocal omnifunc=lsp#complete
|
||||||
|
setlocal signcolumn=yes
|
||||||
|
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
|
||||||
|
nmap <buffer> gd <plug>(lsp-definition)
|
||||||
|
nmap <buffer> gs <plug>(lsp-document-symbol-search)
|
||||||
|
nmap <buffer> gS <plug>(lsp-workspace-symbol-search)
|
||||||
|
nmap <buffer> gr <plug>(lsp-references)
|
||||||
|
nmap <buffer> gi <plug>(lsp-implementation)
|
||||||
|
nmap <buffer> gt <plug>(lsp-type-definition)
|
||||||
|
nmap <buffer> <leader>rn <plug>(lsp-rename)
|
||||||
|
nmap <buffer> [g <plug>(lsp-previous-diagnostic)
|
||||||
|
nmap <buffer> ]g <plug>(lsp-next-diagnostic)
|
||||||
|
nmap <buffer> K <plug>(lsp-hover)
|
||||||
|
nnoremap <buffer> <expr><c-f> lsp#scroll(+4)
|
||||||
|
nnoremap <buffer> <expr><c-d> lsp#scroll(-4)
|
||||||
|
|
||||||
|
let g:lsp_format_sync_timeout = 1000
|
||||||
|
autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync')
|
||||||
|
|
||||||
|
" refer to doc to add more commands
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
augroup lsp_install
|
||||||
|
au!
|
||||||
|
" call s:on_lsp_buffer_enabled only for languages that has the server registered.
|
||||||
|
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
|
||||||
|
augroup END
|
||||||
|
if executable('nil')
|
||||||
|
autocmd User lsp_setup call lsp#register_server({
|
||||||
|
\ 'name': 'nil',
|
||||||
|
\ 'cmd': {server_info->['nil']},
|
||||||
|
\ 'whitelist': ['nix'],
|
||||||
|
\ })
|
||||||
|
endif
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue