❄️ Switch to Flakes and use it in ~/.nixos-config

main
Christian Ott 2 years ago
parent a9e5861b3f
commit 998846e2b0
  1. 11
      configuration.nix
  2. 1
      disko.nix
  3. 48
      flake.lock
  4. 38
      flake.nix

@ -8,7 +8,10 @@
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
"${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix" "${builtins.fetchTarball {
url = "https://github.com/nix-community/disko/archive/master.tar.gz";
sha256 = "0bc1jrkv7mmr6iw3w452gn23fzvrq71p3klvj2bl4rc52mh8fb77";
}}/module.nix"
./disko.nix ./disko.nix
]; ];
@ -78,10 +81,12 @@
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
#vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. #vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
git
neofetch neofetch
wget wget
curl curl
btop btop
vscodium
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
@ -128,8 +133,8 @@
nix = { nix = {
package = pkgs.nixFlakes; package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes"; settings.experimental-features = ["nix-command" "flakes"];
};t };
} }

@ -21,7 +21,6 @@
}; };
}; };
luks = { luks = {
# start = "2G";
size = "2004G"; size = "2004G";
content = { content = {
type = "luks"; type = "luks";

@ -0,0 +1,48 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1713294767,
"narHash": "sha256-LmaabaQZdx52MPGKPRt9Opoc9Gd9RbwvCdysUUYQoXI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fa8c16e2452bf092ac76f09ee1fb1e9f7d0796e7",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1713145326,
"narHash": "sha256-m7+IWM6mkWOg22EC5kRUFCycXsXLSU7hWmHdmBfmC3s=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "53a2c32bc66f5ae41a28d7a9a49d321172af621e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

@ -0,0 +1,38 @@
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11";
home-manager = {
url = github:nix-community/home-manager;
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ... }@inputs:
let
username = "chrigi";
lib = nixpkgs.lib;
in {
nixosConfigurations.nix-f16 = lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
];
};
# home-manager-config = {
# fw16-chrigi = home-manager.lib.homeManagerConfiguration {
# inherit system pkgs;
# username = ${username};
# homeDirectory = "/home/${username}";
# stateVersion = "23.11";
# configuration = {
# imports = [
# ./home.nix
# ];
# };
# };
# };
};
}
Loading…
Cancel
Save

Powered by TurnKey Linux.