1

feat: use flakes for config

This commit is contained in:
Himadri Bhattacharjee
2023-08-25 07:08:09 +05:30
parent 6c91375d0d
commit 7e47dc6ba9
4 changed files with 73 additions and 7 deletions

View File

@@ -5,7 +5,7 @@
{
imports =
[ # Include the results of the hardware scan.
./home.nix
# ./home.nix
./hardware-configuration.nix
./gnome-extensions.nix
];
@@ -177,7 +177,6 @@
gh
ghidra
gimp
git
gnome.gnome-boxes
gnome.gnome-tweaks
gnome-secrets
@@ -280,6 +279,7 @@
aircrack-ng
bat
exa
git
helix
iw
macchanger

48
flake.lock generated Normal file
View File

@@ -0,0 +1,48 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1692763155,
"narHash": "sha256-qMrGKZ8c/q/mHO3ZdrcBPwiVVXPLLgXjY98Ejqb5kAA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6a20e40acaebf067da682661aa67da8b36812606",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1692794066,
"narHash": "sha256-H0aG8r16dj0x/Wz6wQhQxc9V7AsObOiHPaKxQgH6Y08=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fc944919f743bb22379dddf18dcb72db6cff84aa",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

23
flake.nix Normal file
View File

@@ -0,0 +1,23 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ... }: {
nixosConfigurations.cafe = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.h = import ./home.nix;
}
];
};
};
}

View File

@@ -1,11 +1,6 @@
{ config, pkgs, ... }:
{
imports = [
# nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager
# nix-channel --update
<home-manager/nixos>
];
home-manager.users.h = {
home.stateVersion = "23.05";