WIP: Switch to NixOS #5

Draft
FunctionalHacker wants to merge 1349 commits from nix into main
5 changed files with 71 additions and 13 deletions
Showing only changes of commit eae3e9544c - Show all commits

6
Makefile Normal file
View file

@ -0,0 +1,6 @@
.PHONY: update clean
update:
home-manager switch --flake .#functionalhacker
clean:
nix-collect-garbage -d

View file

@ -64,14 +64,12 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git
gnumake
home-manager
neovim neovim
telegram-desktop telegram-desktop
zsh
neofetch
usbutils usbutils
wl-clipboard wl-clipboard
git
pass
gnumake
]; ];
} }

22
flake.lock generated
View file

@ -1,5 +1,26 @@
{ {
"nodes": { "nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1725703823,
"narHash": "sha256-tDgM4d8mLK0Hd6YMB2w1BqMto1XBXADOzPEaLl10VI4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "208df2e558b73b6a1f0faec98493cb59a25f62ba",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1726320982, "lastModified": 1726320982,
@ -18,6 +39,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View file

@ -3,15 +3,32 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
};
outputs = { self, nixpkgs, ...}@inputs: { home-manager = {
nixosConfigurations.Mirkwood = nixpkgs.lib.nixosSystem { url = "github:nix-community/home-manager/release-24.05";
system = "x86_64-linux"; inputs.nixpkgs.follows = "nixpkgs";
modules = [
./common.nix
./hosts/Mirkwood/configuration.nix
];
}; };
}; };
outputs = { nixpkgs, home-manager, ...}:
let
lib = nixpkgs.lib;
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
nixosConfigurations.Mirkwood = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./common.nix
./hosts/Mirkwood/configuration.nix
];
};
homeConfigurations = {
functionalhacker = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
};
};
};
} }

15
home.nix Normal file
View file

@ -0,0 +1,15 @@
{ lib, pkgs, ... }:
{
home = {
packages = with pkgs; [
neofetch
pass
zsh
];
username = "functionalhacker";
homeDirectory = "/home/functionalhacker";
stateVersion = "24.05";
};
}