this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

:sparkles: home manager

+181 -47
+20 -2
README.org
··· 10 10 <<inputs>> 11 11 }; 12 12 13 - outputs = {self, nixpkgs}: let 13 + outputs = { self, nixpkgs, home-manager, ... }: let 14 14 system = "x86_64-linux"; 15 15 hostname = "nixos"; 16 16 pkgs = import nixpkgs {inherit system;}; ··· 37 37 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 38 38 #+end_src 39 39 40 + *** Home Manager 41 + #+begin_src nix 42 + home-manager = { 43 + url = "github:nix-community/home-manager"; 44 + inputs.nixpkgs.follows = "nixpkgs"; 45 + }; 46 + #+end_src 47 + 40 48 ** Outputs 41 49 :PROPERTIES: 42 50 :header-args: :noweb-ref outputs ··· 47 55 nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem { 48 56 inherit system; 49 57 50 - modules = [ ./system/configuration.nix ]; 58 + modules = [ 59 + ./system/configuration.nix 60 + home-manager.nixosModules.home-manager 61 + { 62 + home-manager = { 63 + useGlobalPkgs = true; 64 + useUserPackages = true; 65 + users.pedro = import ./home.nix; 66 + }; 67 + } 68 + ]; 51 69 }; 52 70 #+end_src 53 71
+21
flake.lock
··· 1 1 { 2 2 "nodes": { 3 + "home-manager": { 4 + "inputs": { 5 + "nixpkgs": [ 6 + "nixpkgs" 7 + ] 8 + }, 9 + "locked": { 10 + "lastModified": 1683651229, 11 + "narHash": "sha256-HN0Mw8g1XQIrcdyzqT00YW0Uqi/V/BUUUAgvcK1pcSM=", 12 + "owner": "nix-community", 13 + "repo": "home-manager", 14 + "rev": "983f8a1bb965b261492123cd8e2d07da46d4d50a", 15 + "type": "github" 16 + }, 17 + "original": { 18 + "owner": "nix-community", 19 + "repo": "home-manager", 20 + "type": "github" 21 + } 22 + }, 3 23 "nixpkgs": { 4 24 "locked": { 5 25 "lastModified": 1683408522, ··· 18 38 }, 19 39 "root": { 20 40 "inputs": { 41 + "home-manager": "home-manager", 21 42 "nixpkgs": "nixpkgs" 22 43 } 23 44 }
+16 -2
flake.nix
··· 3 3 4 4 inputs = { 5 5 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 6 + home-manager = { 7 + url = "github:nix-community/home-manager"; 8 + inputs.nixpkgs.follows = "nixpkgs"; 9 + }; 6 10 }; 7 11 8 - outputs = {self, nixpkgs}: let 12 + outputs = { self, nixpkgs, home-manager, ... }: let 9 13 system = "x86_64-linux"; 10 14 hostname = "nixos"; 11 15 pkgs = import nixpkgs {inherit system;}; ··· 13 17 nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem { 14 18 inherit system; 15 19 16 - modules = [ ./system/configuration.nix ]; 20 + modules = [ 21 + ./system/configuration.nix 22 + home-manager.nixosModules.home-manager 23 + { 24 + home-manager = { 25 + useGlobalPkgs = true; 26 + useUserPackages = true; 27 + users.pedro = import ./home.nix; 28 + }; 29 + } 30 + ]; 17 31 }; 18 32 }; 19 33 }
+123
home.nix
··· 1 + { config, pkgs, ... }: 2 + 3 + { 4 + # Home Manager needs a bit of information about you and the paths it should 5 + # manage. 6 + home.username = "pedro"; 7 + home.homeDirectory = "/home/pedro"; 8 + 9 + # This value determines the Home Manager release that your configuration is 10 + # compatible with. This helps avoid breakage when a new Home Manager release 11 + # introduces backwards incompatible changes. 12 + # 13 + # You should not change this value, even if you update Home Manager. If you do 14 + # want to update the value, then make sure to first check the Home Manager 15 + # release notes. 16 + home.stateVersion = "22.11"; # Please read the comment before changing. 17 + 18 + # The home.packages option allows you to install Nix packages into your 19 + # environment. 20 + home.packages = with pkgs; [ 21 + neovim 22 + nodejs 23 + ghc 24 + direnv 25 + gnupg 26 + wezterm 27 + vscodium 28 + bibata-cursors 29 + 30 + gnomeExtensions.paperwm 31 + gnome.gnome-tweaks 32 + just 33 + 34 + eww-wayland 35 + ripgrep 36 + jq 37 + # # Adds the 'hello' command to your environment. It prints a friendly 38 + # # "Hello, world!" when run. 39 + # pkgs.hello 40 + 41 + # # It is sometimes useful to fine-tune packages, for example, by applying 42 + # # overrides. You can do that directly here, just don't forget the 43 + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of 44 + # # fonts? 45 + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) 46 + 47 + # # You can also create simple shell scripts directly inside your 48 + # # configuration. For example, this adds a command 'my-hello' to your 49 + # # environment: 50 + # (pkgs.writeShellScriptBin "my-hello" '' 51 + # echo "Hello, ${config.home.username}!" 52 + # '') 53 + ]; 54 + 55 + # Home Manager is pretty good at managing dotfiles. The primary way to manage 56 + # plain files is through 'home.file'. 57 + home.file = { 58 + # # Building this configuration will create a copy of 'dotfiles/screenrc' in 59 + # # the Nix store. Activating the configuration will then make '~/.screenrc' a 60 + # # symlink to the Nix store copy. 61 + # ".screenrc".source = dotfiles/screenrc; 62 + 63 + # # You can also set the file content immediately. 64 + # ".gradle/gradle.properties".text = '' 65 + # org.gradle.console=verbose 66 + # org.gradle.daemon.idletimeout=3600000 67 + # ''; 68 + }; 69 + 70 + # You can also manage environment variables but you will have to manually 71 + # source 72 + # 73 + # ~/.nix-profile/etc/profile.d/hm-session-vars.sh 74 + # 75 + # or 76 + # 77 + # /etc/profiles/per-user/pedro/etc/profile.d/hm-session-vars.sh 78 + # 79 + # if you don't want to manage your shell through Home Manager. 80 + home.sessionVariables = { 81 + # EDITOR = "emacs"; 82 + EDITOR = "emacs"; 83 + VISUAL = "emacs"; 84 + BROWSER = "firefox"; 85 + }; 86 + 87 + # Let Home Manager install and manage itself. 88 + programs = { 89 + alacritty.enable = true; 90 + 91 + firefox.enable = true; 92 + 93 + home-manager.enable = true; 94 + 95 + emacs.enable = true; 96 + 97 + starship.enable = true; 98 + 99 + # Enabling zsh 100 + zsh = { 101 + enable = true; 102 + enableSyntaxHighlighting = true; 103 + oh-my-zsh = { 104 + enable = true; 105 + plugins = [ "git" ]; 106 + }; 107 + }; 108 + }; 109 + 110 + 111 + services = { 112 + gpg-agent = { 113 + enable = true; 114 + enableSshSupport = true; 115 + enableZshIntegration = true; 116 + extraConfig = '' 117 + allow-emacs-pinentry 118 + ''; 119 + }; 120 + }; 121 + 122 + xdg.enable = true; 123 + }
+1 -43
system/configuration.nix
··· 87 87 88 88 # Adding support for flatpak 89 89 flatpak.enable = true; 90 - 91 - emacs = { 92 - enable = true; 93 - package = pkgs.emacs; 94 - }; 95 90 }; 96 91 97 92 # Enable sound with pipewire. ··· 105 100 # services.xserver.libinput.enable = true; 106 101 107 102 programs = { 108 - # Enabling zsh 109 - zsh = { 110 - enable = true; 111 - ohMyZsh = { 112 - enable = true; 113 - plugins = [ "git" ]; 114 - }; 115 - }; 116 - 117 103 gnupg.agent = { 118 104 enable = true; 119 105 enableSSHSupport = true; 120 106 enableExtraSocket = true; 121 107 }; 122 108 109 + zsh.enable = true; 123 110 }; 124 111 125 112 # Define a user account. Don't forget to set a password with ‘passwd’. ··· 127 114 isNormalUser = true; 128 115 description = "Pedro"; 129 116 extraGroups = [ "networkmanager" "wheel" "tty" ]; 130 - packages = with pkgs; [ 131 - firefox 132 - # thunderbird 133 - neovim 134 - nodejs 135 - ghc 136 - alacritty 137 - oh-my-zsh 138 - direnv 139 - gnupg 140 - emacs 141 - wezterm 142 - vscodium 143 - bibata-cursors 144 - 145 - gnomeExtensions.paperwm 146 - gnome.gnome-tweaks 147 - just 148 - 149 - eww-wayland 150 - ripgrep 151 - jq 152 - ]; 153 117 shell = pkgs.zsh; 154 118 }; 155 119 ··· 175 139 vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. 176 140 wget 177 141 ]; 178 - 179 - variables = { 180 - EDITOR = "nvim"; 181 - VISUAL = "nvim"; 182 - BROWSER = "firefox"; 183 - }; 184 142 }; 185 143 186 144