diff options
| -rw-r--r-- | flake.lock | 84 | ||||
| -rw-r--r-- | flake.nix | 4 | ||||
| -rw-r--r-- | lib/ivi.nix | 2 | ||||
| -rw-r--r-- | profiles/core/configuration.nix | 3 | ||||
| -rw-r--r-- | profiles/core/git.nix | 6 | ||||
| -rw-r--r-- | profiles/core/hm.nix | 2 | ||||
| -rw-r--r-- | profiles/core/home.nix | 10 | ||||
| -rw-r--r-- | profiles/core/meta.nix | 2 | ||||
| -rw-r--r-- | profiles/core/secrets.nix | 2 | ||||
| -rw-r--r-- | profiles/email/mailsync.nix | 2 |
10 files changed, 93 insertions, 24 deletions
@@ -1,5 +1,41 @@ { "nodes": { + "deploy-rs": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs", + "utils": "utils" + }, + "locked": { + "lastModified": 1695052866, + "narHash": "sha256-agn7F9Oww4oU6nPiw+YiYI9Xb4vOOE73w8PAoBRP4AA=", + "owner": "serokell", + "repo": "deploy-rs", + "rev": "e3f41832680801d0ee9e2ed33eb63af398b090e9", + "type": "github" + }, + "original": { + "owner": "serokell", + "repo": "deploy-rs", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1668681692, + "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -22,16 +58,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1696879762, - "narHash": "sha256-Ud6bH4DMcYHUDKavNMxAhcIpDGgHMyL/yaDEAVSImQY=", - "owner": "nixos", + "lastModified": 1671417167, + "narHash": "sha256-JkHam6WQOwZN1t2C2sbp1TqMv3TVRjzrdoejqfefwrM=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "f99e5f03cc0aa231ab5950a15ed02afec45ed51a", + "rev": "bb31220cca6d044baa6dc2715b07497a2a7c4bc7", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-unstable", + "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -54,6 +90,22 @@ }, "nixpkgs_2": { "locked": { + "lastModified": 1696879762, + "narHash": "sha256-Ud6bH4DMcYHUDKavNMxAhcIpDGgHMyL/yaDEAVSImQY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f99e5f03cc0aa231ab5950a15ed02afec45ed51a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { "lastModified": 1696693680, "narHash": "sha256-PH0HQTkqyj7DmdPKPwrrXwVURLBqzZs4nqnDw9q8mhg=", "owner": "NixOS", @@ -70,14 +122,15 @@ }, "root": { "inputs": { + "deploy-rs": "deploy-rs", "home-manager": "home-manager", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "sops-nix": "sops-nix" } }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { @@ -93,6 +146,21 @@ "repo": "sops-nix", "type": "github" } + }, + "utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", @@ -38,7 +38,7 @@ ++ [({ config, ... }: { nixpkgs.overlays = with lib; [(composeManyExtensions [ (import ./overlays/vimPlugins.nix {inherit pkgs;}) - (import ./overlays/suckless.nix {inherit pkgs; home = config.users.users.mike.home;}) + (import ./overlays/suckless.nix {inherit pkgs; home = config.ivi.home;}) ])];}) ]; }; @@ -58,7 +58,7 @@ { hostname = hostname + "." + ivi.domain; sshUser = "root"; - profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${hostname} + profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${hostname}; }) (filterAttrs (_: machine: machine.isDeployed) ivi.machines); diff --git a/lib/ivi.nix b/lib/ivi.nix index 64d358a..2d2d881 100644 --- a/lib/ivi.nix +++ b/lib/ivi.nix @@ -35,7 +35,7 @@ self: lib: with lib; let }; isDeployed = mkOption { description = "The machine is deployed with nixos"; - type = boolean; + type = bool; default = false; }; }; diff --git a/profiles/core/configuration.nix b/profiles/core/configuration.nix index e487fae..a427677 100644 --- a/profiles/core/configuration.nix +++ b/profiles/core/configuration.nix @@ -1,8 +1,9 @@ { config, pkgs, + lib, ... -}: { +}: with lib; { imports = [ (mkAliasOptionModule [ "ivi" ] [ "users" "users" ivi.username ]) ]; time.timeZone = "Europe/Amsterdam"; diff --git a/profiles/core/git.nix b/profiles/core/git.nix index 84b165a..31136ee 100644 --- a/profiles/core/git.nix +++ b/profiles/core/git.nix @@ -1,9 +1,9 @@ -{config, ...}: { +{config, lib, ...}: with lib; { hm = { programs.git = { enable = true; - userName = "Mike Vink"; - userEmail = "mike1994vink@gmail.com"; + userName = ivi.realName; + userEmail = ivi.email; extraConfig = { worktree.guessRemote = true; mergetool.fugitive.cmd = "vim -f -c \"Gdiff\" \"$MERGED\""; diff --git a/profiles/core/hm.nix b/profiles/core/hm.nix index 5e56fed..2d3d085 100644 --- a/profiles/core/hm.nix +++ b/profiles/core/hm.nix @@ -1,7 +1,7 @@ {inputs, config, lib, ...}: with lib; { imports = [ inputs.home-manager.nixosModules.default - (mkAliasOptionModule [ "hm" ] [ "home-manager" "users" "mike" ]) + (mkAliasOptionModule [ "hm" ] [ "home-manager" "users" ivi.username ]) ]; system.extraDependencies = collectFlakeInputs inputs.home-manager; diff --git a/profiles/core/home.nix b/profiles/core/home.nix index fc33dcb..198e5a7 100644 --- a/profiles/core/home.nix +++ b/profiles/core/home.nix @@ -49,7 +49,7 @@ enable = true; matchBlocks = { "*" = { - identityFile = "${config.users.users.mike.home}/.ssh/id_ed25519"; + identityFile = "${config.ivi.home}/.ssh/id_ed25519"; }; }; }; @@ -60,8 +60,8 @@ }; home.sessionPath = [ - "${config.users.users.mike.home}/.krew/bin" - "${config.users.users.mike.home}/.cargo/bin" + "${config.ivi.home}/.krew/bin" + "${config.ivi.home}/.cargo/bin" "${pkgs.ncurses}/bin" ]; @@ -142,9 +142,9 @@ k = "kubectl "; d = "docker "; ls = "ls --color=auto"; - s = "sudo nixos-rebuild switch --flake ${config.users.users.mike.home}/flake#"; + s = "sudo nixos-rebuild switch --flake ${config.ivi.home}/flake#"; b = "/run/current-system/bin/switch-to-configuration boot"; - h = "home-manager switch --flake ${config.users.users.mike.home}/flake --impure"; + h = "home-manager switch --flake ${config.ivi.home}/flake --impure"; fa = "azdo-switch-project"; v = "nvim"; V = "nvim -S .vimsession.vim"; diff --git a/profiles/core/meta.nix b/profiles/core/meta.nix index 3f1d334..f813b56 100644 --- a/profiles/core/meta.nix +++ b/profiles/core/meta.nix @@ -1,6 +1,6 @@ {inputs,lib,config, ...}: with lib; { lib.meta = { - configPath = "${config.users.users.mike.home}/flake"; + configPath = "${config.ivi.home}/flake"; mkMutableSymlink = path: config.hm.lib.file.mkOutOfStoreSymlink (config.lib.meta.configPath + removePrefix (toString inputs.self) (toString path)); diff --git a/profiles/core/secrets.nix b/profiles/core/secrets.nix index 15d6ee5..6b52376 100644 --- a/profiles/core/secrets.nix +++ b/profiles/core/secrets.nix @@ -1,7 +1,7 @@ {machine,inputs,config,lib,pkgs,...}: with lib; { imports = [ inputs.sops-nix.nixosModules.sops - (mkAliasOptionModule [ "secrets" ] [ "home-manager" "users" "mike" ]) # TODO: get my username(s) from machine config + (mkAliasOptionModule [ "secrets" ] [ "home-manager" "users" ivi.username ]) # TODO: get my username(s) from machine config ]; sops = { age.sshKeyPaths = []; diff --git a/profiles/email/mailsync.nix b/profiles/email/mailsync.nix index 3095194..5e1037a 100644 --- a/profiles/email/mailsync.nix +++ b/profiles/email/mailsync.nix @@ -28,7 +28,7 @@ Service = { Type = "oneshot"; RemainAfterExit = "no"; - ExecSearchPath = "${config.users.users.mike.home}/.local/bin:${config.hm.home.profileDirectory}/bin:/run/current-system/sw/bin"; + ExecSearchPath = "${config.ivi.home}/.local/bin:${config.hm.home.profileDirectory}/bin:/run/current-system/sw/bin"; ExecStart = "mailsync"; }; }; |
