From f72f22b250ecf22657ffc9e6082086377031ea8a Mon Sep 17 00:00:00 2001 From: tzlil Date: Sun, 30 Jul 2023 13:19:39 +0300 Subject: clean up a bit --- profiles/core.nix | 43 ------------------------------------------- profiles/gentoo.nix | 37 ------------------------------------- profiles/impermanence.nix | 7 ++++--- profiles/stdenv.nix | 37 +++++++++++++++++++++++++++++++++++++ profiles/tzlil.nix | 7 +++---- 5 files changed, 44 insertions(+), 87 deletions(-) delete mode 100644 profiles/core.nix delete mode 100644 profiles/gentoo.nix create mode 100644 profiles/stdenv.nix (limited to 'profiles') diff --git a/profiles/core.nix b/profiles/core.nix deleted file mode 100644 index 4fefbdd..0000000 --- a/profiles/core.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - pkgs, - lib, - config, - inputs, - ... -}: { - # imports = [ - # ../profiles/security.nix - # ../profiles/network.nix - # ]; - config = { - # system.stateVersion = "22.5"; - # nix = { - # registry.nixpkgs.flake = inputs.nixpkgs; - # gc.automatic = true; - # optimise.automatic = true; - # settings = { - # allowed-users = ["root"]; - # trusted-users = ["root"]; - # sandbox = true; - # }; - # extraOptions = '' - # experimental-features = nix-command flakes - # ''; - # }; - # users.mutableUsers = false; - # environment.defaultPackages = lib.mkForce []; - - programs.command-not-found.dbPath = inputs.programsdb.packages.${pkgs.system}.programs-sqlite; - - # boot = { - # tmp.cleanOnBoot = true; - # kernelParams = [ - # "init_on_free=1" - # "page_poison=1" - # "page_alloc.shuffle=1" - # "slab_nomerge" - # "vsyscall=none" - # ]; - # }; - }; -} diff --git a/profiles/gentoo.nix b/profiles/gentoo.nix deleted file mode 100644 index 337a306..0000000 --- a/profiles/gentoo.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - pkgs, - lib, - config, - inputs, - ... -}: { - imports = []; - config = { - nix.binaryCaches = [ - "https://cache.nixos.org/" - "https://cache.allvm.org/" - ]; - - nix.binaryCachePublicKeys = [ - "gravity.cs.illinois.edu-1:yymmNS/WMf0iTj2NnD0nrVV8cBOXM9ivAkEdO1Lro3U=" - ]; - - nativeStdenv = - prev.stdenvAdapters.withCFlags ["-O3" "-pipe" "-march=native"] - (prev.overrideCC prev.llvmPackages_latest.stdenv - (prev.wrapCCWith rec { - cc = prev.llvmPackages_latest.clang-unwrapped; - bintools = final.wrapBintoolsWith { - coreutils = final.uutils-coreutils; - libc = final.musl; - bintools = - final.binutils-unwrapped.overrideAttrs - (old: { - postInstall = '' - ln -sf ${final.mold}/bin/mold $out/bin/ld - ''; - }); - }; - })); - }; -} diff --git a/profiles/impermanence.nix b/profiles/impermanence.nix index 5fdd9eb..c222a43 100644 --- a/profiles/impermanence.nix +++ b/profiles/impermanence.nix @@ -1,4 +1,5 @@ -{inputs, +{ + inputs, config, lib, options, @@ -20,8 +21,8 @@ in { [ ] ++ sshHostKeys - ++ (map (x: x + ".pub") sshHostKeys); + ++ (map (x: x + ".pub") sshHostKeys); }; - age.identityPaths = (map (x: "/nix/persist" + x) sshHostKeys); + age.identityPaths = map (x: "/nix/persist" + x) sshHostKeys; }; } diff --git a/profiles/stdenv.nix b/profiles/stdenv.nix new file mode 100644 index 0000000..337a306 --- /dev/null +++ b/profiles/stdenv.nix @@ -0,0 +1,37 @@ +{ + pkgs, + lib, + config, + inputs, + ... +}: { + imports = []; + config = { + nix.binaryCaches = [ + "https://cache.nixos.org/" + "https://cache.allvm.org/" + ]; + + nix.binaryCachePublicKeys = [ + "gravity.cs.illinois.edu-1:yymmNS/WMf0iTj2NnD0nrVV8cBOXM9ivAkEdO1Lro3U=" + ]; + + nativeStdenv = + prev.stdenvAdapters.withCFlags ["-O3" "-pipe" "-march=native"] + (prev.overrideCC prev.llvmPackages_latest.stdenv + (prev.wrapCCWith rec { + cc = prev.llvmPackages_latest.clang-unwrapped; + bintools = final.wrapBintoolsWith { + coreutils = final.uutils-coreutils; + libc = final.musl; + bintools = + final.binutils-unwrapped.overrideAttrs + (old: { + postInstall = '' + ln -sf ${final.mold}/bin/mold $out/bin/ld + ''; + }); + }; + })); + }; +} diff --git a/profiles/tzlil.nix b/profiles/tzlil.nix index 5e85f35..f2e2505 100644 --- a/profiles/tzlil.nix +++ b/profiles/tzlil.nix @@ -40,7 +40,6 @@ home-manager.users.tzlil = {pkgs, ...} @ hm: { home = { - stateVersion = "22.05"; username = "tzlil"; homeDirectory = "/home/tzlil"; sessionVariables.SSH_AUTH_SOCK = "/run/user/1000/ssh-agent"; @@ -60,9 +59,9 @@ Unit = { Description = "SSH Agent"; }; - Install = { - WantedBy = ["default.target"]; - }; + Install = { + WantedBy = ["default.target"]; + }; Service = { ExecStartPre = "${pkgs.coreutils}/bin/rm -f %t/ssh-agent"; ExecStart = -- cgit 1.4.1