Compare commits

...

3 Commits

13 changed files with 223 additions and 59 deletions

View File

@ -43,6 +43,40 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -101,6 +135,28 @@
"url": "https://github.com/Jovian-Experiments/Jovian-NixOS"
}
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1727464323,
"narHash": "sha256-XhiLvnM95aNpRm3qJ9hsVV/prin4GVapn4snMN4Ol6k=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "4aef94d5afb4a791e5e9a3ee844c68ad01f54a14",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NixOS-WSL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1703013332,
@ -138,6 +194,7 @@
"agenix": "agenix",
"home-manager": "home-manager_2",
"jovian-nixos": "jovian-nixos",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_2"
}
},
@ -155,6 +212,21 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View File

@ -8,9 +8,11 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs";
jovian-nixos.url = "git+https://github.com/Jovian-Experiments/Jovian-NixOS?ref=development";
jovian-nixos.flake = false;
nixos-wsl.url = "github:nix-community/NixOS-WSL";
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ { self, nixpkgs, home-manager, jovian-nixos, agenix, ... }:
outputs = inputs @ { self, nixpkgs, home-manager, jovian-nixos, agenix, nixos-wsl, ... }:
let
system = "x86_64-linux";
user = "tstarr";
@ -33,6 +35,10 @@
inherit lib;
inherit system user inputs agenix home-manager jovian-nixos;
});
wsl = lib.nixosSystem (import ./hosts/wsl {
inherit lib;
inherit system user inputs agenix home-manager nixos-wsl;
});
};
};
}

View File

@ -3,8 +3,9 @@
inherit system;
specialArgs = { inherit user inputs; };
modules = [
../default/physical/configuration.nix
./configuration.nix
../default # shared by all configs
../default/physical/configuration.nix # shared by physical machines
./configuration.nix # bulwark specific
./hardware.nix
../../modules
agenix.nixosModules.default

View File

@ -0,0 +1,33 @@
{ config, pkgs, user, lib, inputs, ... }:
{
imports = [
./git.nix
./home-default.nix
];
nix = {
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
settings.auto-optimise-store = true;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
# Add non-free packages
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = import ../../lib/overlays.nix;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
environment.systemPackages = with pkgs; [
inputs.agenix.packages.x86_64-linux.default
];
# Did you read the comment?
system.stateVersion = "23.11";
}

View File

@ -0,0 +1,20 @@
{ config, pkgs, user, ... }:
{
home-manager.users.${user} = {
home.username = "${user}";
home.homeDirectory = "/home/${user}";
programs.home-manager.enable = true;
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
home.packages = with pkgs; [
];
# Did you read the comment?
home.stateVersion = "23.11";
};
}

View File

@ -1,53 +1,20 @@
{ config, pkgs, user, lib, inputs, ... }:
{
imports = [
../git.nix
../backup.nix
./home-configuration.nix
./backup.nix
];
nix = {
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
settings.auto-optimise-store = true;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
# Add non-free packages
nixpkgs.config.allowUnfree = true;
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" "openssl-1.1.1w" ];
nixpkgs.overlays = import ../../../lib/overlays.nix;
# Hardware options
#hardware.bluetooth.enable = true;
#hardware.bluetooth.package = pkgs.bluez;
#hardware.sensor.iio.enable = true;
#hardware.graphics.enable = true;
#hardware.graphics.enable32Bit = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
# Define user account.
users.users.${user} = {
isNormalUser = true;
extraGroups = [ "dialout" "wheel" "docker" "libvirtd" ];
shell = pkgs.bash;
};
environment.systemPackages = with pkgs; [
inputs.agenix.packages.x86_64-linux.default
];
# Did you read the comment?
system.stateVersion = "23.11";
}

View File

@ -1,25 +1,9 @@
{ config, pkgs, user, ... }:
{
home-manager.users.${user} = {
home.username = "${user}";
home.homeDirectory = "/home/${user}";
programs.home-manager.enable = true;
programs.direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
programs.vscode = {
enable = true;
package = pkgs.vscode.fhs;
};
home.packages = with pkgs; [
];
# Did you read the comment?
home.stateVersion = "23.11";
};
}

View File

@ -3,8 +3,9 @@
inherit system;
specialArgs = { inherit user inputs; };
modules = [
../default/physical/configuration.nix
./configuration.nix
../default # shared by all configs
../default/physical/configuration.nix # shared by physical machines
./configuration.nix # kestrel specific
./hardware.nix
../../modules
agenix.nixosModules.default

View File

@ -3,8 +3,9 @@
inherit system;
specialArgs = { inherit user inputs; };
modules = [
../default/physical/configuration.nix
./configuration.nix
../default # shared by all configs
../default/physical/configuration.nix # shared by physical machines
./configuration.nix # shivan specific
./hardware.nix
../../modules
agenix.nixosModules.default

View File

@ -3,8 +3,9 @@
inherit system;
specialArgs = { inherit user inputs; };
modules = [
../default/physical/configuration.nix
./configuration.nix
../default # shared by all configs
../default/physical/configuration.nix # shared by physical machines
./configuration.nix # torus specific
./hardware.nix
../../modules
agenix.nixosModules.default

View File

@ -0,0 +1,57 @@
{ config, pkgs, user, lib, inputs, nixos-wsl, ... }:
let
defaultUser = user;
in
{
imports = [
nixos-wsl.nixosModules.wsl
];
wsl = {
inherit defaultUser;
enable = true;
wslConf.automount.root = "/mnt";
};
# Set networking options
networking.hostName = "wsl";
networking.firewall.checkReversePath = "loose";
networking.firewall.enable = false;
boot.isContainer = true;
# configure root
users.users.root = {
extraGroups = [ "root" ];
};
security.sudo.wheelNeedsPassword = false;
# Disable systemd units that don't make sense on WSL
systemd.services."serial-getty@ttyS0".enable = false;
systemd.services."serial-getty@hvc0".enable = false;
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@".enable = false;
systemd.services.firewall.enable = false;
systemd.services.systemd-resolved.enable = false;
systemd.services.systemd-udevd.enable = false;
# Don't allow emergency mode, because we don't have a console.
systemd.enableEmergencyMode = false;
environment.systemPackages = with pkgs; [
];
# Modules
modules = {
devel = {
python.enable = true;
tooling.enable = true;
};
system = {
ssh.enable = true;
terminal.enable = true;
};
};
}

View File

@ -0,0 +1,21 @@
{ lib, system, user, inputs, agenix, home-manager, nixos-wsl, ... }:
{
inherit system;
specialArgs = { inherit user inputs nixos-wsl; };
modules = [
../default # shared by all configs
./configuration.nix # wsl specific
../../modules
agenix.nixosModules.default
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user; };
home-manager.users.${user} = {
imports = [
../../home-modules
];
};
}
];
}