mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2024-10-05 20:06:16 -07:00
Compare commits
3 Commits
08be9f6272
...
07ab279d00
Author | SHA1 | Date | |
---|---|---|---|
07ab279d00 | |||
dbb35cecf3 | |||
acb8519f43 |
@ -43,6 +43,40 @@
|
|||||||
"type": "github"
|
"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": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -101,6 +135,28 @@
|
|||||||
"url": "https://github.com/Jovian-Experiments/Jovian-NixOS"
|
"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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703013332,
|
"lastModified": 1703013332,
|
||||||
@ -138,6 +194,7 @@
|
|||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"jovian-nixos": "jovian-nixos",
|
"jovian-nixos": "jovian-nixos",
|
||||||
|
"nixos-wsl": "nixos-wsl",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -155,6 +212,21 @@
|
|||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"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",
|
"root": "root",
|
||||||
|
@ -8,9 +8,11 @@
|
|||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
jovian-nixos.url = "git+https://github.com/Jovian-Experiments/Jovian-NixOS?ref=development";
|
jovian-nixos.url = "git+https://github.com/Jovian-Experiments/Jovian-NixOS?ref=development";
|
||||||
jovian-nixos.flake = false;
|
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
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
user = "tstarr";
|
user = "tstarr";
|
||||||
@ -33,6 +35,10 @@
|
|||||||
inherit lib;
|
inherit lib;
|
||||||
inherit system user inputs agenix home-manager jovian-nixos;
|
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;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user inputs; };
|
specialArgs = { inherit user inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
../default/physical/configuration.nix
|
../default # shared by all configs
|
||||||
./configuration.nix
|
../default/physical/configuration.nix # shared by physical machines
|
||||||
|
./configuration.nix # bulwark specific
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
../../modules
|
../../modules
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
|
33
provision/hosts/default/default.nix
Normal file
33
provision/hosts/default/default.nix
Normal 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";
|
||||||
|
}
|
20
provision/hosts/default/home-default.nix
Normal file
20
provision/hosts/default/home-default.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
@ -1,53 +1,20 @@
|
|||||||
{ config, pkgs, user, lib, inputs, ... }:
|
{ config, pkgs, user, lib, inputs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../git.nix
|
|
||||||
../backup.nix
|
|
||||||
./home-configuration.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.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.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Los_Angeles";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
|
|
||||||
# Define user account.
|
# Define user account.
|
||||||
users.users.${user} = {
|
users.users.${user} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "dialout" "wheel" "docker" "libvirtd" ];
|
extraGroups = [ "dialout" "wheel" "docker" "libvirtd" ];
|
||||||
shell = pkgs.bash;
|
shell = pkgs.bash;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
inputs.agenix.packages.x86_64-linux.default
|
|
||||||
];
|
|
||||||
|
|
||||||
# Did you read the comment?
|
|
||||||
system.stateVersion = "23.11";
|
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,9 @@
|
|||||||
{ config, pkgs, user, ... }:
|
{ config, pkgs, user, ... }:
|
||||||
{
|
{
|
||||||
home-manager.users.${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 = {
|
programs.vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.vscode.fhs;
|
package = pkgs.vscode.fhs;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
];
|
|
||||||
|
|
||||||
# Did you read the comment?
|
|
||||||
home.stateVersion = "23.11";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user inputs; };
|
specialArgs = { inherit user inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
../default/physical/configuration.nix
|
../default # shared by all configs
|
||||||
./configuration.nix
|
../default/physical/configuration.nix # shared by physical machines
|
||||||
|
./configuration.nix # kestrel specific
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
../../modules
|
../../modules
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user inputs; };
|
specialArgs = { inherit user inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
../default/physical/configuration.nix
|
../default # shared by all configs
|
||||||
./configuration.nix
|
../default/physical/configuration.nix # shared by physical machines
|
||||||
|
./configuration.nix # shivan specific
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
../../modules
|
../../modules
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user inputs; };
|
specialArgs = { inherit user inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
../default/physical/configuration.nix
|
../default # shared by all configs
|
||||||
./configuration.nix
|
../default/physical/configuration.nix # shared by physical machines
|
||||||
|
./configuration.nix # torus specific
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
../../modules
|
../../modules
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
|
57
provision/hosts/wsl/configuration.nix
Normal file
57
provision/hosts/wsl/configuration.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
21
provision/hosts/wsl/default.nix
Normal file
21
provision/hosts/wsl/default.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user