merge impermanence #1

Merged
Xory merged 2 commits from impermanence into master 2025-10-27 13:58:41 +02:00
4 changed files with 72 additions and 40 deletions

31
flake.lock generated
View file

@ -7,32 +7,46 @@
]
},
"locked": {
"lastModified": 1756245065,
"narHash": "sha256-aAZNbGcWrVRZgWgkQbkabSGcDVRDMgON4BipMy69gvI=",
"lastModified": 1761266473,
"narHash": "sha256-QxCyKWBmuzI+eMhYV1JmbZsiUnBNATRP1EW34OBt5Vg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "54b2879ce622d44415e727905925e21b8f833a98",
"rev": "5c71d4a730bd3c972befff343bb074421e345937",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1737831083,
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1756217674,
"narHash": "sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo=",
"lastModified": 1761114652,
"narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4e7667a90c167f7a81d906e5a75cba4ad8bee620",
"rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.05",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -40,6 +54,7 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"impermanence": "impermanence",
"nixpkgs": "nixpkgs"
}
}

View file

@ -5,10 +5,11 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable/";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
impermanence.url = "github:nix-community/impermanence";
};
outputs =
{ self, nixpkgs, home-manager, ... } @ inputs:
{ self, nixpkgs, impermanence, home-manager, ... } @ inputs:
let
system = "x86_64-linux";
username = "xory";
@ -17,8 +18,9 @@
nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./hosts/${hostName}/configuration.nix
./hosts/${hostName}/configuration.nix
./hosts/${hostName}/hardware-configuration.nix
impermanence.nixosModules.impermanence
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;

View file

@ -18,25 +18,10 @@
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "voidspear"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# ZeroTier
services.zerotierone.enable = true;
services.zerotierone.joinNetworks = [ "b3ce837c63" "363c67c55a726a89" ];
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
libGL
SDL2
];
# Set your time zone.
time.timeZone = "Europe/Athens";
@ -55,6 +40,50 @@
LC_TIME = "en_GB.UTF-8";
};
# Impermanence
fileSystems."/persist" = {
device = "/dev/disk/by-uuid/1578f380-e588-419b-ace0-f63e6a48ca39";
fsType = "ext4";
neededForBoot = true;
};
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/home"
"/var/log"
"/var/lib/bluetooth"
"/etc/NetworkManager/system-connections"
"/var/lib/nixos"
];
};
environment.etc."machine-id" = {
source = "/persist/etc/machine-id";
mode = "0444";
};
# Define a user account. Don't forget to set a password with passwd.
programs.zsh.enable = true; # home-manager already installs this but nixos complains w/o it
users.users.xory = {
isNormalUser = true;
description = "xory";
extraGroups = [ "networkmanager" "wheel" "docker" "libvirt" "dialout" ];
shell = pkgs.zsh;
initialHashedPassword = "$6$JXLpG5JYMJgZndm9$0sC8uPJ99cYL.hNv3DFQ20ky8tiZoxioe9GlMEanTwAD99LJ175/bHtN6Bm6bYsQG1BVGRdmphnXEcWS9ApoK0";
};
# ZeroTier
services.zerotierone.enable = true;
services.zerotierone.joinNetworks = [ "b3ce837c63" "363c67c55a726a89" ];
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
libGL
SDL2
];
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = true;
@ -103,17 +132,6 @@
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
programs.zsh.enable = true; # home-manager already installs this but nixos complains w/o it
users.users.xory = {
isNormalUser = true;
description = "xory";
extraGroups = [ "networkmanager" "wheel" "docker" "libvirt" "dialout" ];
packages = with pkgs; [
# thunderbird
];
shell = pkgs.zsh;
};
services.ollama.enable = true;
services.ollama.acceleration = "cuda";

View file

@ -20,10 +20,7 @@
ffmpeg
yt-dlp
prismlauncher
(discord.override {
withOpenASAR = true;
withVencord = true;
})
vesktop
keepassxc
obs-studio
mpv