Compare commits

...

4 Commits

Author SHA1 Message Date
Christian Ott b88ad9b5df Add Obsidian dependency 2 years ago
Christian Ott b69bfdd120 🛖 Use home-manager as nixos-module 2 years ago
Christian Ott 4b89f8d1ab 🛖 Demilitarize hostname 2 years ago
Christian Ott 998846e2b0 ❄️ Switch to Flakes and use it in ~/.nixos-config 2 years ago
  1. 13
      configuration.nix
  2. 1
      disko.nix
  3. 66
      flake.lock
  4. 38
      flake.nix
  5. 27
      home.nix

@ -8,7 +8,10 @@
imports =
[ # Include the results of the hardware scan.
./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
];
@ -17,7 +20,7 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nix-f16"; # Define your hostname.
networking.hostName = "nix-fw16"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
@ -78,10 +81,12 @@
# $ nix search wget
environment.systemPackages = with pkgs; [
#vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
git
neofetch
wget
curl
btop
vscodium
];
# Some programs need SUID wrappers, can be configured further or are
@ -128,8 +133,8 @@
nix = {
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
};t
settings.experimental-features = ["nix-command" "flakes"];
};
}

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

@ -0,0 +1,66 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1712386041,
"narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"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"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1713248628,
"narHash": "sha256-NLznXB5AOnniUtZsyy/aPWOk8ussTuePp2acb9U+ISA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5672bc9dbf9d88246ddab5ac454e82318d094bb8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},
"root": "root",
"version": 7
}

@ -0,0 +1,38 @@
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = github:nix-community/home-manager/release-23.11;
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs:
let
username = "chrigi";
lib = nixpkgs.lib;
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
in {
nixosConfigurations.nix-fw16 = lib.nixosSystem {
modules = [
./configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${username} = import ./home.nix;
home-manager.extraSpecialArgs = {inherit pkgs-unstable username; };
}
];
};
};
}

@ -0,0 +1,27 @@
{ config, pkgs, pkgs-unstable, username, ... }:
{
# TODO please change the username & home directory to your own
home.username = "${username}";
home.homeDirectory = "/home/${username}";
# Packages that should be installed to the user profile.
home.packages = with pkgs; [
eza
pkgs-unstable.obsidian
jq
];
# This value determines the home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new home Manager release introduces backwards
# incompatible changes.
#
# You can update home Manager without changing this value. See
# the home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "23.11";
# Let home Manager install and manage itself.
# programs.home-manager.enable = true;
}
Loading…
Cancel
Save

Powered by TurnKey Linux.