Refactoring
This commit is contained in:
@@ -14,7 +14,6 @@ Fuck vagrant
|
|||||||
|
|
||||||
#+begin_src shell
|
#+begin_src shell
|
||||||
nix build .#nixosConfigurations.vm.config.system.build.vm
|
nix build .#nixosConfigurations.vm.config.system.build.vm
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
From https://github.com/nix-community/vagrant-nixos-plugin
|
From https://github.com/nix-community/vagrant-nixos-plugin
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
imports = [./gpg-agent.nix
|
imports = [./gpg-agent.nix
|
||||||
./name.nix];
|
./name.nix];
|
||||||
|
|
||||||
#OPTIONS
|
#Global suite options
|
||||||
options.azos.name = lib.mkOption{
|
options.azos.name = lib.mkOption{
|
||||||
default = "YOUR NAME HERE";
|
default = "YOUR NAME HERE";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|||||||
@@ -8,43 +8,17 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# You can import other home-manager modules here
|
|
||||||
imports = [
|
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
|
./base
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
# You can add overlays here
|
|
||||||
overlays = [
|
overlays = [
|
||||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
|
||||||
outputs.overlays.additions
|
outputs.overlays.additions
|
||||||
outputs.overlays.modifications
|
outputs.overlays.modifications
|
||||||
outputs.overlays.unstable-packages
|
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 = {
|
config = {
|
||||||
# Disable if you don't want unfree packages
|
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||||
allowUnfreePredicate = _: true;
|
allowUnfreePredicate = _: true;
|
||||||
@@ -60,8 +34,6 @@
|
|||||||
homeDirectory = "/home/aner";
|
homeDirectory = "/home/aner";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Add stuff for your user as you see fit:
|
|
||||||
# programs.neovim.enable = true;
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# steam
|
# steam
|
||||||
emacs
|
emacs
|
||||||
@@ -75,7 +47,6 @@
|
|||||||
]))
|
]))
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable home-manager and git
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
programs.git.enable = true;
|
programs.git.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -27,54 +27,25 @@ virtualisation.qemu.options = [
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
imports = [
|
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
|
inputs.home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
# You can add overlays here
|
|
||||||
overlays = [
|
overlays = [
|
||||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
|
||||||
outputs.overlays.additions
|
outputs.overlays.additions
|
||||||
outputs.overlays.modifications
|
outputs.overlays.modifications
|
||||||
outputs.overlays.unstable-packages
|
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
|
# Configure your nixpkgs instance
|
||||||
config = {
|
config = {
|
||||||
# Disable if you don't want unfree packages
|
|
||||||
allowUnfree = true;
|
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);
|
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"];
|
nix.nixPath = ["/etc/nix/path"];
|
||||||
environment.etc =
|
environment.etc =
|
||||||
lib.mapAttrs'
|
lib.mapAttrs'
|
||||||
@@ -85,14 +56,11 @@ imports = [
|
|||||||
config.nix.registry;
|
config.nix.registry;
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
# Enable flakes and new 'nix' command
|
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
# Deduplicate and optimize nix store
|
# Deduplicate and optimize nix store
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# FIXME: Add the rest of your current configuration
|
|
||||||
|
|
||||||
# TODO: Set your hostname
|
# TODO: Set your hostname
|
||||||
networking.hostName = "test-vm";
|
networking.hostName = "test-vm";
|
||||||
|
|
||||||
@@ -100,12 +68,6 @@ imports = [
|
|||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = 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 = {
|
home-manager = {
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
extraSpecialArgs = { inherit inputs outputs; };
|
||||||
users = {
|
users = {
|
||||||
@@ -115,11 +77,7 @@ imports = [
|
|||||||
};
|
};
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
# FIXME: Replace with your username
|
|
||||||
aner = {
|
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";
|
initialPassword = "password";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
|
|||||||
+1
-31
@@ -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,
|
inputs,
|
||||||
outputs,
|
outputs,
|
||||||
@@ -8,40 +6,17 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# You can import other NixOS modules here
|
|
||||||
imports = [
|
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
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
# You can add overlays here
|
|
||||||
overlays = [
|
overlays = [
|
||||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
|
||||||
outputs.overlays.additions
|
outputs.overlays.additions
|
||||||
outputs.overlays.modifications
|
outputs.overlays.modifications
|
||||||
outputs.overlays.unstable-packages
|
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
|
# Configure your nixpkgs instance
|
||||||
config = {
|
config = {
|
||||||
# Disable if you don't want unfree packages
|
# Disable if you don't want unfree packages
|
||||||
@@ -65,21 +40,16 @@
|
|||||||
config.nix.registry;
|
config.nix.registry;
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
# Enable flakes and new 'nix' command
|
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
# Deduplicate and optimize nix store
|
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# FIXME: Add the rest of your current configuration
|
|
||||||
|
|
||||||
# TODO: Set your hostname
|
# TODO: Set your hostname
|
||||||
networking.hostName = "your-hostname";
|
networking.hostName = "your-hostname";
|
||||||
|
|
||||||
# TODO: This is just an example, be sure to use whatever bootloader you prefer
|
# TODO: This is just an example, be sure to use whatever bootloader you prefer
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
||||||
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
|
|
||||||
users.users = {
|
users.users = {
|
||||||
# FIXME: Replace with your username
|
# FIXME: Replace with your username
|
||||||
your-username = {
|
your-username = {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
# Custom packages, that can be defined similarly to ones from nixpkgs
|
|
||||||
# You can build them using 'nix build .#example'
|
|
||||||
pkgs: {
|
pkgs: {
|
||||||
# example = pkgs.callPackage ./example { };
|
# example = pkgs.callPackage ./example { };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user