couple improvements

This commit is contained in:
Gabriel Fontes 2021-12-16 18:36:16 -03:00
parent c479f8a7b8
commit db27336c16
No known key found for this signature in database
GPG key ID: 2E54EA7BFE630916
3 changed files with 39 additions and 16 deletions

View file

@ -1,12 +1,14 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{ inputs, lib, config, pkgs, ... }: {
imports = [
# If you want to use modules from other flakes (such as nixos-hardware), use something like:
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# It's extremely recommended you take a look at https://github.com/nixos/nixos-hardware
# and import modules relevant to your hardware (the above examples are for AMD CPUs and SSDs).
# It's strongly recommended you take a look at
# https://github.com/nixos/nixos-hardware
# and import modules relevant to your hardware.
# Import your generated hardware configuration
./hardware-configuration.nix
@ -14,10 +16,10 @@
# Feel free to split up your configuration and import pieces of it here.
];
# Set your hostname
# TODO: Set your hostname
networking.hostName = "cool-computer";
# Comment out to disable unfree packages for your system
# Comment out if you wish to disable unfree packages for your system
nixpkgs.config.allowUnfree = true;
# This will make all users source .nix-profile on login, activating home
@ -33,5 +35,5 @@
lib.nameValuePair ("${n}") ({ flake = inputs."${n}"; })
) inputs;
system.stateVersion = "21.11";
system.stateVersion = "22.05";
}

View file

@ -25,31 +25,46 @@
overlay = (import ./overlays.nix);
# This repo's overlay plus any other overlays you use
# If you want to use packages from flakes that are not nixpkgs, add their overlays here.
overlays = [ self.overlay nur.overlay ];
# If you want to use packages from flakes that are not nixpkgs (such as NUR), add their overlays here.
overlays = [
self.overlay
# nur.overlay
];
# System configurations
# Accessible via 'nixos-rebuild --flake'
nixosConfigurations = {
# TODO: Replace with your hostname
cool-computer = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./configuration.nix
# Adds your overlay and packages to nixpkgs
{ nixpkgs.overlays = self.overlays; }
];
# Pass our flake inputs into the config
specialArgs = { inherit inputs; };
};
};
# Home configurations
# Accessible via 'home-manager --flake'
homeConfigurations = {
"you@cool-computer" = home-manager.lib.homeManagerConfiguration {
system = "x86_64-linux";
# TODO: Replace with your username@hostname
"you@cool-computer" = home-manager.lib.homeManagerConfiguration rec {
# TODO: Replace with your username
username = "you";
homeDirectory = "/home/you";
homeDirectory = "/home/${username}";
system = "x86_64-linux";
configuration = ./home.nix;
extraModules = [{ nixpkgs.overlays = self.overlays; }];
extraModules = [
# Adds your overlay and packages to nixpkgs
{ nixpkgs.overlays = self.overlays; }
];
# Pass our flake inputs into the config
extraSpecialArgs = { inherit inputs; };
};
};
}

View file

@ -1,4 +1,7 @@
{ inputs, pkgs, hostname, ... }: {
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{ inputs, lib, config, pkgs, ... }: {
imports = [
# If you want to use home-manager modules from other flakes (such as nix-colors), use something like:
# inputs.nix-colors.nixosModule
@ -6,16 +9,19 @@
# Feel free to split up your configuration and import pieces of it here.
];
# Comment out to disable unfree packages for your system
# Comment out if you wish to disable unfree packages for your system
nixpkgs.config.allowUnfree = true;
# Add stuff for your user as you see fit:
# TODO: Add stuff for your user as you see fit:
# programs.neovim.enable = true;
# home.packages = with pkgs; [ steam ];
# Enable home-manager and git
programs.home-manager.enable = true;
programs.git.enable = true;
# Nicely reload system units when changing configs
systemd.users.startServices = "sd-switch";
systemd.user.startServices = "sd-switch";
home.stateVersion = "22.05";
}