This commit is contained in:
ChaotiCryptidz 2021-12-28 17:47:07 +00:00
parent 240eb8cdef
commit 89f24f5fec
11 changed files with 148 additions and 43 deletions

View file

@ -36,16 +36,45 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1627913399,
"narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2",
"type": "github"
},
"original": {
"id": "flake-compat",
"type": "indirect"
}
},
"flake-utils": {
"locked": {
"lastModified": 1631561581,
"narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1640417317,
"narHash": "sha256-jT2uMARXs0Xm65ccroFsKyr4LTHSecw+9HAnmBdJO8U=",
"lastModified": 1640592198,
"narHash": "sha256-F5dWVGQMscmGyLTzNLocPB1v8Ijp8ONx8Nq9Dmi5PSw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "48f2b381dd397ec88040d3354ac9c036739ba139",
"rev": "0b197562ab7bf114dd5f6716f41d4b5be6ccd357",
"type": "github"
},
"original": {
@ -54,22 +83,40 @@
"type": "github"
}
},
"mobile-nixos": {
"lowdown-src": {
"flake": false,
"locked": {
"lastModified": 1640614937,
"narHash": "sha256-ymiYJNOVJIZzwUxFpFresjX7glyUxwBTdWiPCAFsP/Y=",
"owner": "chaoticryptidz",
"repo": "mobile-nixos",
"rev": "49c0a0959407415ee3ae4db35525e9aca749cb04",
"lastModified": 1632468475,
"narHash": "sha256-NNOm9CbdA8cuwbvaBHslGbPTiU6bh1Ao+MpEPx4rSGo=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "6bd668af3fd098bdd07a1bedd399564141e275da",
"type": "github"
},
"original": {
"owner": "chaoticryptidz",
"repo": "mobile-nixos",
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
}
},
"nix": {
"inputs": {
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1633098935,
"narHash": "sha256-UtuBczommNLwUNEnfRI7822z4vPA7OoRKsgAZ8zsHQI=",
"owner": "nixos",
"repo": "nix",
"rev": "4f496150eb4e0012914c11f0a3ff4df2412b1d09",
"type": "github"
},
"original": {
"id": "nix",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1632086102,
@ -102,11 +149,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1640408860,
"narHash": "sha256-h2uF3+a8bVfM8SjcS4hLbsOzOuG3qsxuImC0BucWs1Q=",
"lastModified": 1640540585,
"narHash": "sha256-cCmknKFjWgam9jq+58wSd0Z4REia8mjBP65kXcL3ki8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "cb372c3b8880e504b06946e8fb2ca9777c685505",
"rev": "ac169ec6371f0d835542db654a65e0f2feb07838",
"type": "github"
},
"original": {
@ -116,12 +163,41 @@
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1632864508,
"narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "82891b5e2c2359d7e58d08849e4c89511ab94234",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-21.05-small",
"type": "indirect"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1632495107,
"narHash": "sha256-4NGE56r+FJGBaCYu3CTH4O83Ys4TrtnEPXrvdwg1TDs=",
"owner": "serokell",
"repo": "nixpkgs",
"rev": "be220b2dc47092c1e739bf6aaf630f29e71fe1c4",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"deploy-rs": "deploy-rs",
"home-manager": "home-manager",
"mobile-nixos": "mobile-nixos",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_3",
"vault-secrets": "vault-secrets"
}
},
"utils": {
@ -138,6 +214,27 @@
"repo": "flake-utils",
"type": "github"
}
},
"vault-secrets": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"nix": "nix",
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1633626134,
"narHash": "sha256-fvd+l1iuH+ufwNIt6ppZnIfMs+BEj5dtIAKmGKTbaCQ=",
"owner": "serokell",
"repo": "vault-secrets",
"rev": "1bf4a02eea83d3042bd3d1e2f2266b15077b48b4",
"type": "github"
},
"original": {
"owner": "serokell",
"repo": "vault-secrets",
"type": "github"
}
}
},
"root": "root",

View file

@ -5,12 +5,7 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
deploy-rs.url = "github:serokell/deploy-rs";
mobile-nixos = {
# plz change to NixOS/ when https://github.com/NixOS/mobile-nixos/pull/435 merges
url = "github:chaoticryptidz/mobile-nixos";
flake = false;
};
vault-secrets.url = "github:serokell/vault-secrets";
};
outputs = { ... }@inputs: import ./outputs.nix inputs;

View file

@ -1,7 +1,8 @@
{ pkgs, ... }: {
{ config, pkgs, ... }: {
home.packages = with pkgs; [
exa
ripgrep
vault
];
programs.zsh = {
@ -26,6 +27,7 @@
log = "journalctl";
dmesg = "dmesg -HP";
hg = "history 0 | rg";
vaulttest = "echo ${vs.example}";
};
};
programs.direnv = {

View file

@ -1,7 +1,7 @@
{ self, home-manager, nixpkgs, tree, ... }@inputs:
let
defaultModules =
[ home-manager.nixosModules.home-manager tree.impure.profiles.base ];
[ home-manager.nixosModules.home-manager tree.impure.modules.nixos tree.impure.profiles.base ];
defaultSpecialArgs = {
tree = tree.impure;
pureTree = tree.pure;

View file

@ -11,9 +11,10 @@
profiles.network_manager
profiles.sway
profiles.dnscrypt
profiles.gaming
#profiles.gaming
# so i can build nixos mobile
profiles.qemu_user
profiles.vault-secrets
# for sci-hub and whenever websites break
profiles.tor
@ -26,14 +27,14 @@
home.base
home.bluetooth
home.gui
home.gaming
#home.gaming
home.dev
home.network_manager
home.sway
home.reversing
home.apps.vivaldi
home.apps.telegram
home.apps.osu-lazer
#home.apps.osu-lazer
home.programming
home.programming.languages.go
home.programming.languages.nix

1
modules/nixos/keep.nix Normal file
View file

@ -0,0 +1 @@
{ ... }: { }

View file

@ -1,4 +1,4 @@
{ self, nixpkgs, home-manager, mobile-nixos, deploy-rs, ... }@inputs:
{ self, nixpkgs, home-manager, vault-secrets, deploy-rs, ... }@inputs:
let
mkTree = import ./tree.nix { inherit (nixpkgs) lib; };
tree = mkTree {
@ -11,6 +11,14 @@ let
"home/*".functor.enable = true;
"home/apps/*".functor.enable = true;
"home/programming/languages/*".functor.enable = true;
"modules/nixos" = {
functor = {
enable = true;
external = [
(import (inputs.vault-secrets + "/modules/vault-secrets.nix"))
];
};
};
};
};
in {

View file

@ -3,7 +3,7 @@
nixpkgs.config.pulseaudio = true;
hardware.pulseaudio = {
enable = true;
support32Bit = true;
#support32Bit = true;
extraModules = with pkgs; [ pkgs.pulseaudio-modules-bt ];
package = pkgs.pulseaudioFull;
extraConfig = "\n load-module module-switch-on-connect\n ";

View file

@ -1,13 +0,0 @@
{ config, pkgs, ... }: {
boot.binfmt.registrations.aarch64 = {
interpreter = "${pkgs.qemu}/bin/qemu-aarch64";
magicOrExtension =
"\\x7fELF\\x02\\x01\\x01\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\xb7\\x00";
mask =
"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\xff\\xfe\\xff\\xff\\xff";
};
nix.sandboxPaths = [ "/run/binfmt" "${pkgs.qemu}" ];
nix.extraOptions = ''
extra-platforms = aarch64-linux ${pkgs.system}
'';
}

View file

@ -0,0 +1,14 @@
{ config, ... }:
let
vs = config.vault-secrets.secrets;
in {
vault-secrets = {
# This applies to all secrets
vaultPrefix = "nixos/servers/${config.networking.hostName}";
vaultAddress = "https://vault.cryptidz.qcx.io";
# Define a secret called `something`, with default options.
secrets.example = {};
};
}

0
scripts/deploy-all.sh Normal file
View file