update to new home-manager flake format
This commit is contained in:
parent
00d07da8ff
commit
7e9aa4328a
36
flake.lock
36
flake.lock
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"hardware": {
|
"hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1653145312,
|
"lastModified": 1656933710,
|
||||||
"narHash": "sha256-affCuB0Boa8CDFykoJVPZfhHLBok7Sq+QEOJvo3Xf+k=",
|
"narHash": "sha256-SVG8EqY1OTJWBRY4hpct2ZR2Rk0L8hCFkug3m0ABoZE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "8b5e1bf2fd62adefff05ae67cd49440be93ea193",
|
"rev": "3bf48d3587d3f34f745a19ebc968b002ef5b5c5a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -19,14 +19,15 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
],
|
||||||
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1653153149,
|
"lastModified": 1657241847,
|
||||||
"narHash": "sha256-8B/tWWZziFq4DqnAm9uO7M4Z4PNfllYg5+teX1e5yDQ=",
|
"narHash": "sha256-/aN3p2LaRNVXf7w92GWgXq9H5f23YRQPOvsm3BrBqzU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "94780dd888881bf35165dfdd334a57ef6b14ead8",
|
"rev": "8160b3b45b8457d58d2b3af2aeb2eb6f47042e0f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -37,11 +38,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1653060744,
|
"lastModified": 1657114324,
|
||||||
"narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
|
"narHash": "sha256-fWuaUNXrHcz/ciHRHlcSO92dvV3EVS0GJQUSBO5JIB4=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dfd82985c273aac6eced03625f454b334daae2e8",
|
"rev": "a5c867d9fe9e4380452628e8f171c26b69fa9d3d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -57,6 +58,21 @@
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1653893745,
|
||||||
|
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
21
flake.nix
21
flake.nix
|
@ -16,14 +16,19 @@
|
||||||
# Bring some functions into scope (from builtins and other flakes)
|
# Bring some functions into scope (from builtins and other flakes)
|
||||||
inherit (nixpkgs.lib) nixosSystem;
|
inherit (nixpkgs.lib) nixosSystem;
|
||||||
inherit (home-manager.lib) homeManagerConfiguration;
|
inherit (home-manager.lib) homeManagerConfiguration;
|
||||||
in
|
# We'll use x86_64-linux for everything, but you can have hosts/homes for
|
||||||
rec {
|
# different systems and architectures if you want
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in {
|
||||||
# System configurations
|
# System configurations
|
||||||
# Accessible via 'nixos-rebuild'
|
# Accessible via 'nixos-rebuild'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# FIXME: Replace with your hostname
|
# FIXME: Replace with your hostname
|
||||||
your-hostname = nixosSystem {
|
your-hostname = nixosSystem {
|
||||||
system = "x86_64-linux";
|
inherit system;
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
# >> Main NixOS configuration file <<
|
# >> Main NixOS configuration file <<
|
||||||
modules = [ ./nixos/configuration.nix ];
|
modules = [ ./nixos/configuration.nix ];
|
||||||
# Make our inputs available to the config (for importing modules)
|
# Make our inputs available to the config (for importing modules)
|
||||||
|
@ -35,13 +40,11 @@
|
||||||
# Accessible via 'home-manager'
|
# Accessible via 'home-manager'
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
# FIXME: Replace with your username@hostname
|
# FIXME: Replace with your username@hostname
|
||||||
"your-name@your-hostname" = homeManagerConfiguration rec {
|
"your-name@your-hostname" = homeManagerConfiguration {
|
||||||
# FIXME: Replace with your username
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
username = "your-name";
|
|
||||||
homeDirectory = "/home/${username}";
|
|
||||||
system = "x86_64-linux";
|
|
||||||
# >> Main home-manager configuration file <<
|
# >> Main home-manager configuration file <<
|
||||||
configuration = ./home-manager/home.nix;
|
modules = [ ./home-manager/home.nix ];
|
||||||
# Make our inputs available to the config (for importing modules)
|
# Make our inputs available to the config (for importing modules)
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,6 +12,12 @@
|
||||||
# Comment out if you wish to disable unfree packages for your system
|
# Comment out if you wish to disable unfree packages for your system
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# TODO: Set your username
|
||||||
|
home = {
|
||||||
|
username = "your-name";
|
||||||
|
homeDirectory = "/home/your-name";
|
||||||
|
};
|
||||||
|
|
||||||
# Add stuff for your user as you see fit:
|
# Add stuff for your user as you see fit:
|
||||||
# programs.neovim.enable = true;
|
# programs.neovim.enable = true;
|
||||||
# home.packages = with pkgs; [ steam ];
|
# home.packages = with pkgs; [ steam ];
|
||||||
|
@ -22,4 +28,7 @@
|
||||||
|
|
||||||
# Nicely reload system units when changing configs
|
# Nicely reload system units when changing configs
|
||||||
systemd.user.startServices = "sd-switch";
|
systemd.user.startServices = "sd-switch";
|
||||||
|
|
||||||
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
|
home.stateVersion = "22.05";
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,14 +29,12 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
# Make sure we have at least nix 2.4
|
settings = {
|
||||||
# TODO: You can remove me if you're using NixOS 22.05+
|
# Enable flakes and new 'nix' command
|
||||||
package = pkgs.nixFlakes;
|
experimental-features = "nix-command flakes";
|
||||||
# Enable flakes and new 'nix' command
|
# Deduplicate and optimize nix store
|
||||||
extraOptions = ''
|
auto-optimise-store = true;
|
||||||
experimental-features = nix-command flakes
|
};
|
||||||
'';
|
|
||||||
autoOptimiseStore = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Remove if you wish to disable unfree packages for your system
|
# Remove if you wish to disable unfree packages for your system
|
||||||
|
@ -76,4 +74,7 @@
|
||||||
# Use keys only. Remove if you want to SSH using password (not recommended)
|
# Use keys only. Remove if you want to SSH using password (not recommended)
|
||||||
passwordAuthentication = false;
|
passwordAuthentication = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
|
system.stateVersion = "22.05";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue