From 659cdd28049fcc5c955d30e44094eefd73e577e3 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Mon, 19 Dec 2022 15:45:59 +0100 Subject: [PATCH] initial working home manager setup --- flake.lock | 6 +- flake.nix | 2 +- hosts/thinkpad/configuration.nix | 8 +- users/rouven/.default.nix.swp | Bin 0 -> 12288 bytes users/rouven/default.nix | 19 +++ users/rouven/modules/default.nix | 283 +++++++++++++++++++++++++++++++ 6 files changed, 308 insertions(+), 10 deletions(-) create mode 100644 users/rouven/.default.nix.swp create mode 100644 users/rouven/default.nix create mode 100644 users/rouven/modules/default.nix diff --git a/flake.lock b/flake.lock index 30c1d31..0a14654 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1671215800, - "narHash": "sha256-2W54K41A7MefEaWzgL/TsaWlhKRK/RhWUybyOW4i0K8=", + "lastModified": 1671313200, + "narHash": "sha256-itZTrtHeDJjV696+ur0/TzkTqb5y3Eb57WRLRPK3rwA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9d692a724e74d2a49f7c985132972f991d144254", + "rev": "0938d73bb143f4ae037143572f11f4338c7b2d1c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c13f504..e8d2028 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "My hardware setup"; + description = "My nix setup"; inputs = { nixpkgs.url = github:nixos/nixpkgs/nixos-22.11; home-manager.url = github:nix-community/home-manager; diff --git a/hosts/thinkpad/configuration.nix b/hosts/thinkpad/configuration.nix index 18acfec..36e5889 100755 --- a/hosts/thinkpad/configuration.nix +++ b/hosts/thinkpad/configuration.nix @@ -5,6 +5,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix + ../../users/rouven ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -73,11 +74,6 @@ # enable polkit security.polkit.enable = true; - # Define a user account. - users.users.rouven = { - isNormalUser = true; - extraGroups = [ "wheel" "video" "network" "libvirtd" ]; - }; # List packages installed in system profile. To search, run: # $ nix search wget @@ -195,7 +191,7 @@ # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix. - system.copySystemConfiguration = true; + # system.copySystemConfiguration = true; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/users/rouven/.default.nix.swp b/users/rouven/.default.nix.swp new file mode 100644 index 0000000000000000000000000000000000000000..f2cc536fadad19858a0c28e3727f52c93c604eef GIT binary patch literal 12288 zcmYc?2=nw+u+%ePU|?VnU|>kESdbjgaE!rKgpr{rzqBkh46F!=C6=Ko>+|Cjs>4A1!)7!L6>Ff8Y1VCds#U?}BhU~uMVV6fw7U=ZhLVEDwx z!0?fefnhHn1H%G728Q{33=9+a7#O1X7#M>27#RHcAm-+R%pQVaGwS5g5Eu=C(GVC7 zfzc2c4S~@R7!85Z5Eu=C(GVC70qh}A%b=i8Yt5jb0H+ibGV*g%^@>XpOH#v9i;6Sz z^Av0qlJoP@GSl^nD~n4~b5SHAnj!KEwhGk@V8b$V3-XIfiWO`Xq80S?bMsS5b5e^H zVnK>Q#_Q%L<|U@57U_W(mFqzkm4kFEFFudT0u-i*W{j)pOlyr zkev>)qNJ!a6`RSS#i>OBiOJcC>8Z%dp#Dv*C@D&GFUl`107*tGD3xcVrsgOqD3xWV zq~ + let mapleader = " " + + " air-line + let g:airline_powerline_fonts = 1 + + " NERDTree + nnoremap n :NERDTreeFocus :NERDTreeRefreshRoot + " NERDTree autostart" + autocmd VimEnter * NERDTree | wincmd p + + " Close the tab if NERDTree is the only window remaining in it. + autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif + + "remove ex-mode shortcut + nmap Q + + " trigger the fuzzy finder (fzf) + nnoremap f :Files + nnoremap g :GFiles + nnoremap b :Buffers + nnoremap r :Rg + + " keybinds for coc + nnoremap d :CocDiagnostics + + " quickfixlist binds + nnoremap :cnext + nnoremap :cprev + + " locallist binds + nnoremap :lnext + nnoremap :lprev + + " split keybinds + nnoremap s :sp + nnoremap v :vs + + nnoremap h h + nnoremap j j + nnoremap k k + nnoremap l l + + " coloring stuff + let g:dracula_colorterm = 0 + colorscheme dracula + + " better autocompletion menu colors + highlight Pmenu ctermbg=darkgray ctermfg=black + highlight PmenuSel ctermbg=gray ctermfg=black + + ''; + }; + + + services.picom = { + enable = true; + }; + + + # This value determines the Home Manager release that your + # configuration is compatible with. This helps avoid breakage + # when a new Home Manager release introduces backwards + # incompatible changes. + # + # You can update Home Manager without changing this value. See + # the Home Manager release notes for a list of state version + # changes in each release. + home.stateVersion = "22.11"; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +}