From 10002a4a3913b7593f0a8e3c1dc7ff2281a34245 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 6 Mar 2023 23:51:19 +0900 Subject: [PATCH] Impermanence working? --- README.md | 10 ++++++++++ flake.nix | 9 ++++----- hosts/fuhen/hardware-configuration.nix | 4 ++-- modules/nixos/default.nix | 2 +- modules/nixos/nix/default.nix | 4 +++- password/.gitignore | 1 + 6 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 README.md create mode 100644 password/.gitignore diff --git a/README.md b/README.md new file mode 100644 index 0000000..b1d1623 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Flake + +## To install + +fdisk DEVICE +200M EFI fat32 labelled boot -> on /boot +ext4 labbelled fuhen -> on /nix +mkdir -p /nix/persist/home (else persisted seems to be bugged) + +`nix-shell --run 'mkpasswd -m SHA-512' -p mkpasswd` to generate a password diff --git a/flake.nix b/flake.nix index cd99df1..22ad263 100644 --- a/flake.nix +++ b/flake.nix @@ -7,10 +7,7 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - impermanence = { - url = "github:nix-community/impermanence"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + impermanence.url = "github:nix-community/impermanence"; hyprland = { url = "github:hyprwm/Hyprland/v0.22.0beta"; inputs.nixpkgs.follows = "nixpkgs"; @@ -65,7 +62,9 @@ ({pkgs, ...}: { networking.hostName = hostname; + users.users.root.hashedPassword = builtins.readFile ./password/root; users.users.${user} = { + hashedPassword = builtins.readFile ./password/${user}; isNormalUser = true; extraGroups = ["wheel" "input" "docker" "audio"]; shell = pkgs.zsh; @@ -105,7 +104,7 @@ programs.zsh.enable = true; environment.shells = with pkgs; [zsh]; virtualisation.docker.enable = true; - environment.systemPackages = with pkgs; [docker-compose]; + environment.systemPackages = with pkgs; [docker-compose git]; }) tuxedo-nixos.nixosModules.default diff --git a/hosts/fuhen/hardware-configuration.nix b/hosts/fuhen/hardware-configuration.nix index e1fd876..6e8a810 100644 --- a/hosts/fuhen/hardware-configuration.nix +++ b/hosts/fuhen/hardware-configuration.nix @@ -21,12 +21,12 @@ }; fileSystems."/nix" = { - device = "/dev/disk/by-uuid/e8f1fdc5-c5fc-4468-b92a-63b7b4093345"; + device = "/dev/disk/by-label/fuhen"; fsType = "ext4"; }; fileSystems."/boot" = { - device = "/dev/disk/by-uuid/D229-F68F"; + device = "/dev/disk/by-label/boot"; fsType = "vfat"; }; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 758e79b..039cdc5 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -9,7 +9,7 @@ boot.loader = { systemd-boot = { enable = true; - configurationLimit = 4; +# configurationLimit = 4; }; efi.canTouchEfiVariables = true; }; diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix index 9864aa9..53862f3 100644 --- a/modules/nixos/nix/default.nix +++ b/modules/nixos/nix/default.nix @@ -33,7 +33,6 @@ in { directories = [ "/var/log" "/var/lib/bluetooth" - "/var/lib/nixos" "/var/lib/systemd/coredump" "/var/lib/docker" "/etc/NetworkManager/system-connections" @@ -52,6 +51,9 @@ in { ".local/share/flatpak" ".local/share/atuin" ".config/google-chrome" + # Don't reinstall plugins on reboot + ".local/share/nvim" + ".local/state/nvim" ]; files = [ ]; }; diff --git a/password/.gitignore b/password/.gitignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/password/.gitignore @@ -0,0 +1 @@ +*