Refactoring

This commit is contained in:
2024-08-23 05:59:04 +03:00
parent 860eba085f
commit 83e94f9051
6 changed files with 2 additions and 106 deletions
-1
View File
@@ -14,7 +14,6 @@ Fuck vagrant
#+begin_src shell
nix build .#nixosConfigurations.vm.config.system.build.vm
#+end_src
From https://github.com/nix-community/vagrant-nixos-plugin
+1 -1
View File
@@ -3,7 +3,7 @@
imports = [./gpg-agent.nix
./name.nix];
#OPTIONS
#Global suite options
options.azos.name = lib.mkOption{
default = "YOUR NAME HERE";
type = lib.types.str;
-29
View File
@@ -8,43 +8,17 @@
pkgs,
...
}: {
# You can import other home-manager modules here
imports = [
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
# Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules.default
# You can also split up your configuration and import pieces of it here:
# ./nvim.nix
# ./gpg-agent.nix
# ./options.nix
# ./name.nix
./base
];
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = _: true;
@@ -60,8 +34,6 @@
homeDirectory = "/home/aner";
};
# Add stuff for your user as you see fit:
# programs.neovim.enable = true;
home.packages = with pkgs; [
# steam
emacs
@@ -75,7 +47,6 @@
]))
];
# Enable home-manager and git
programs.home-manager.enable = true;
programs.git.enable = true;
-42
View File
@@ -27,54 +27,25 @@ virtualisation.qemu.options = [
];
};
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
# ./vm-hardware-configuration.nix
inputs.home-manager.nixosModules.home-manager
];
nixpkgs.hostPlatform = "x86_64-linux";
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
nix.nixPath = ["/etc/nix/path"];
environment.etc =
lib.mapAttrs'
@@ -85,14 +56,11 @@ imports = [
config.nix.registry;
nix.settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
};
# FIXME: Add the rest of your current configuration
# TODO: Set your hostname
networking.hostName = "test-vm";
@@ -100,12 +68,6 @@ imports = [
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
# users.users = {
# # FIXME: Replace with your username
# aner = import ../home-manager/home.nix;
# };
home-manager = {
extraSpecialArgs = { inherit inputs outputs; };
users = {
@@ -115,11 +77,7 @@ imports = [
};
users.users = {
# FIXME: Replace with your username
aner = {
# TODO: You can set an initial password for your user.
# If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install.
# Be sure to change it (using passwd) after rebooting!
initialPassword = "password";
isNormalUser = true;
openssh.authorizedKeys.keys = [
+1 -31
View File
@@ -1,5 +1,3 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
outputs,
@@ -8,40 +6,17 @@
pkgs,
...
}: {
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
];
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
@@ -65,21 +40,16 @@
config.nix.registry;
nix.settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
};
# FIXME: Add the rest of your current configuration
# TODO: Set your hostname
networking.hostName = "your-hostname";
# TODO: This is just an example, be sure to use whatever bootloader you prefer
boot.loader.systemd-boot.enable = true;
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users.users = {
# FIXME: Replace with your username
your-username = {
-2
View File
@@ -1,5 +1,3 @@
# Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example'
pkgs: {
# example = pkgs.callPackage ./example { };
}