From 0921151c6ea4ad335f8477559f0a91880e11b298 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Thu, 18 May 2023 12:49:06 +0200 Subject: [PATCH] flake cleanup, removed impermanence --- flake.lock | 58 +++++++++++++--------------------------- flake.nix | 12 +-------- hosts/vm/default.nix | 8 +++--- shared/vim.nix | 2 +- shared/zsh.nix | 1 + users/rouven/default.nix | 4 --- 6 files changed, 26 insertions(+), 59 deletions(-) diff --git a/flake.lock b/flake.lock index c01a6a4..87b7ade 100644 --- a/flake.lock +++ b/flake.lock @@ -23,17 +23,16 @@ ] }, "locked": { - "lastModified": 1684189380, - "narHash": "sha256-GUp9OkZynocyppLur1VX8oAjtXGue0oKRHbsksOMUm0=", + "lastModified": 1684321175, + "narHash": "sha256-V4EbM+jK7pvjKBaj0dgAiW9ultzDE27Nz5fRyu/ceMk=", "owner": "nix-community", "repo": "home-manager", - "rev": "b7d814c5744dca7e70b3dc2638f06568dce96ca6", + "rev": "59659243cd4ababda605e79b4a9c2e6d83e24c86", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" + "id": "home-manager", + "type": "indirect" } }, "hyprland": { @@ -44,11 +43,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1684255384, - "narHash": "sha256-u8NIuk2ZTGECWTUPlNkv6iLllTbplTg0hBSKQZwAWZw=", + "lastModified": 1684332077, + "narHash": "sha256-briamwodIZsYolceEjX41mqw/VkKiHuIEprw0u5wioY=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "b5b9af508ab74b1922bc3354d178ebf457db631e", + "rev": "79b8576df9630ea1c0fb1c6e399a424c3dcdcd47", "type": "github" }, "original": { @@ -78,21 +77,6 @@ "type": "github" } }, - "impermanence": { - "locked": { - "lastModified": 1684144492, - "narHash": "sha256-5TBG9kZGdKrZGHdyjLA04ODSzhx1Bx/vwMxfRgWF+JU=", - "owner": "nix-community", - "repo": "impermanence", - "rev": "ec1a8e70d61261f9ada30f4e450ea7230d9efb62", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "impermanence", - "type": "github" - } - }, "nix-colors": { "inputs": { "base16-schemes": "base16-schemes", @@ -136,15 +120,14 @@ "locked": { "lastModified": 1684169666, "narHash": "sha256-N5jrykeSxLVgvm3Dd3hZ38/XwM/jU+dltqlXgrGlYxk=", - "owner": "nixos", + "owner": "NixOS", "repo": "nixos-hardware", "rev": "71ce85372a614d418d5e303dd5702a79d1545c04", "type": "github" }, "original": { - "owner": "nixos", - "repo": "nixos-hardware", - "type": "github" + "id": "nixos-hardware", + "type": "indirect" } }, "nixpkgs": { @@ -196,18 +179,17 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1684215771, - "narHash": "sha256-fsum28z+g18yreNa1Y7MPo9dtps5h1VkHfZbYQ+YPbk=", - "owner": "nixos", + "lastModified": 1684305980, + "narHash": "sha256-vd4SKXX1KZfSX6n3eoguJw/vQ+sBL8XGdgfxjEgLpKc=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "963006aab35e3e8ebbf6052b6bf4ea712fdd3c28", + "rev": "e6e389917a8c778be636e67a67ec958f511cc55d", "type": "github" }, "original": { - "owner": "nixos", + "id": "nixpkgs", "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "indirect" } }, "purge": { @@ -234,7 +216,6 @@ "inputs": { "home-manager": "home-manager", "hyprland": "hyprland", - "impermanence": "impermanence", "nix-colors": "nix-colors", "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", @@ -260,9 +241,8 @@ "type": "github" }, "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" + "id": "sops-nix", + "type": "indirect" } }, "trucksimulatorbot-images": { diff --git a/flake.nix b/flake.nix index 4d1b4b5..291c234 100644 --- a/flake.nix +++ b/flake.nix @@ -2,25 +2,17 @@ description = "My nix setup"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixos-hardware.url = "github:nixos/nixos-hardware"; - impermanence.url = "github:nix-community/impermanence"; - + nixpkgs.url = "nixpkgs/nixos-unstable"; nix-index-database = { url = "github:Mic92/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; - - sops-nix = { - url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; - home-manager = { - url = "github:nix-community/home-manager"; inputs = { nixpkgs.follows = "nixpkgs"; }; @@ -44,7 +36,6 @@ , nixpkgs , home-manager , nix-index-database - , impermanence , hyprland , sops-nix , nix-colors @@ -110,7 +101,6 @@ modules = [ ./hosts/vm ./shared - impermanence.nixosModules.impermanence nix-index-database.nixosModules.nix-index sops-nix.nixosModules.sops ]; diff --git a/hosts/vm/default.nix b/hosts/vm/default.nix index 16558d1..248994c 100644 --- a/hosts/vm/default.nix +++ b/hosts/vm/default.nix @@ -15,10 +15,10 @@ tmp.useTmpfs = true; }; networking.hostName = "vm"; - environment.persistence."/nix/persistent/system" = { - directories = [ "/etc/nixos" ]; - files = [ "/etc/machine-id" ]; - }; + # environment.persistence."/nix/persistent/system" = { + # directories = [ "/etc/nixos" ]; + # files = [ "/etc/machine-id" ]; + # }; time.timeZone = "Europe/Berlin"; diff --git a/shared/vim.nix b/shared/vim.nix index e0b2aaf..8fb1fca 100644 --- a/shared/vim.nix +++ b/shared/vim.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: { - environment.variables = { EDITOR = "vim"; }; + environment.variables = { EDITOR = "hx"; }; # we set helix in here to have it shared environment.systemPackages = with pkgs; [ ((vim_configurable.override { }).customize { name = "vim"; diff --git a/shared/zsh.nix b/shared/zsh.nix index fe9d0b0..e2d0bd6 100644 --- a/shared/zsh.nix +++ b/shared/zsh.nix @@ -53,6 +53,7 @@ zsh-newuser-install () {} switch() { + sudo true # ask the password so we can leave during the (sometimes quite long) build process OUT_PATH=/tmp/nixos-rebuild-nom-$(date +%s) ${pkgs.nix-output-monitor}/bin/nom build /etc/nixos#nixosConfigurations.${config.networking.hostName}.config.system.build.toplevel -o $OUT_PATH sudo ${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $OUT_PATH diff --git a/users/rouven/default.nix b/users/rouven/default.nix index 6dfeed2..aee1944 100644 --- a/users/rouven/default.nix +++ b/users/rouven/default.nix @@ -6,10 +6,6 @@ isNormalUser = true; extraGroups = [ "wheel" "video" "libvirtd" ]; }; - system.activationScripts.report-home-manager-changes = '' - PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]} - nvd diff $(ls -dv /nix/var/nix/profiles/per-user/rouven/home-manager-*-link | tail -2) - ''; home-manager.useUserPackages = true; home-manager.useGlobalPkgs = true;