This commit is contained in:
Nathan McCarty 2025-01-13 14:53:42 -05:00
parent ac3825e6f9
commit 29fd118635
22 changed files with 424 additions and 424 deletions

View file

@ -1,10 +1,11 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
imports = [
];
@ -18,7 +19,7 @@
'';
programs.ssh.knownHosts = {
nixbuild = {
hostNames = [ "eu.nixbuild.net" ];
hostNames = ["eu.nixbuild.net"];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM";
};
};
@ -144,7 +145,7 @@
# Define a user account. Don't forget to set a password with passwd.
users.users.nathan = {
extraGroups = [ "networkmanager" ];
extraGroups = ["networkmanager"];
};
# Install firefox.
@ -185,5 +186,4 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}

View file

@ -7,9 +7,7 @@
pkgs,
modulesPath,
...
}:
{
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
@ -20,9 +18,9 @@
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/0a846b89-7219-47c1-9db5-362e3c018964";
@ -39,7 +37,7 @@
};
swapDevices = [
{ device = "/dev/disk/by-uuid/bf35a46f-552c-4b37-a68b-c2fcf132f359"; }
{device = "/dev/disk/by-uuid/bf35a46f-552c-4b37-a68b-c2fcf132f359";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -1,49 +1,53 @@
{ withSystem, inputs, ... }:
{
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; };
flake.nixosConfigurations.crash = withSystem "x86_64-linux" (
ctx@{ config, inputs', ... }:
inputs.nixpkgs.lib.nixosSystem {
# Expose `packages`, `inputs` and `inputs'` as module arguments.
# Use specialArgs permits use in `imports`.
# Note: if you publish modules for reuse, do not rely on specialArgs, but
# on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html
specialArgs = {
packages = config.packages;
inherit inputs inputs';
};
modules = [
(
{
config,
lib,
pkgs,
...
}:
ctx @ {
config,
inputs',
...
}:
inputs.nixpkgs.lib.nixosSystem {
# Expose `packages`, `inputs` and `inputs'` as module arguments.
# Use specialArgs permits use in `imports`.
# Note: if you publish modules for reuse, do not rely on specialArgs, but
# on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html
specialArgs = {
packages = config.packages;
inherit inputs inputs';
};
modules = [
(
{
config,
lib,
pkgs,
...
}: {
imports = [
# Hardware support
inputs.nixos-hardware.nixosModules.microsoft-surface-common
# Our modules
(import ../../modules/base.nix {inherit inputs;})
(import ./configuration.nix)
(import ./hardware.nix)
(import ../../modules/user.nix {
inherit inputs;
mutableUsers = false;
})
];
{
imports = [
# Hardware support
inputs.nixos-hardware.nixosModules.microsoft-surface-common
# Our modules
(import ../../modules/base.nix { inherit inputs; })
(import ./configuration.nix)
(import ./hardware.nix)
(import ../../modules/user.nix {
inherit inputs;
mutableUsers = false;
})
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}
)
];
}
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}
)
];
}
);
}

View file

@ -1,60 +1,64 @@
{ withSystem, inputs, ... }:
{
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; };
flake.nixosConfigurations.inst = withSystem "x86_64-linux" (
ctx@{ config, inputs', ... }:
inputs.nixpkgs.lib.nixosSystem {
# Expose `packages`, `inputs` and `inputs'` as module arguments.
# Use specialArgs permits use in `imports`.
# Note: if you publish modules for reuse, do not rely on specialArgs, but
# on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html
specialArgs = {
packages = config.packages;
inherit inputs inputs';
};
modules = [
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix"
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
inputs.nixos-hardware.nixosModules.microsoft-surface-common
(
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
ctx @ {
config,
inputs',
...
}:
inputs.nixpkgs.lib.nixosSystem {
# Expose `packages`, `inputs` and `inputs'` as module arguments.
# Use specialArgs permits use in `imports`.
# Note: if you publish modules for reuse, do not rely on specialArgs, but
# on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html
specialArgs = {
packages = config.packages;
inherit inputs inputs';
};
modules = [
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix"
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
inputs.nixos-hardware.nixosModules.microsoft-surface-common
(
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
{
config,
lib,
pkgs,
...
}: {
imports = [
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
{
config,
lib,
pkgs,
...
}:
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
{
imports = [
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
networking.hostId = "9affdaa4";
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
environment.systemPackages = with pkgs; [
];
networking.hostId = "9affdaa4";
time.timeZone = "America/Kentucky/Louisville";
environment.systemPackages = with pkgs; [
];
time.timeZone = "America/Kentucky/Louisville";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}
)
];
}
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}
)
];
}
);
}

View file

@ -1,72 +1,76 @@
{ withSystem, inputs, ... }:
{
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; };
flake.nixosConfigurations.wsl = withSystem "x86_64-linux" (
ctx@{ config, inputs', ... }:
inputs.nixpkgs.lib.nixosSystem {
# Expose `packages`, `inputs` and `inputs'` as module arguments.
# Use specialArgs permits use in `imports`.
# Note: if you publish modules for reuse, do not rely on specialArgs, but
# on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html
specialArgs = {
packages = config.packages;
inherit inputs inputs';
};
modules = [
(
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
ctx @ {
config,
inputs',
...
}:
inputs.nixpkgs.lib.nixosSystem {
# Expose `packages`, `inputs` and `inputs'` as module arguments.
# Use specialArgs permits use in `imports`.
# Note: if you publish modules for reuse, do not rely on specialArgs, but
# on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html
specialArgs = {
packages = config.packages;
inherit inputs inputs';
};
modules = [
(
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
{
config,
lib,
pkgs,
...
}: {
imports = [
# WSL support
inputs.nixos-wsl.nixosModules.default
# Our modules
(import ../../modules/base.nix {inherit inputs;})
(import ../../modules/user.nix {
inherit inputs;
mutableUsers = true;
})
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
{
config,
lib,
pkgs,
...
}:
wsl.enable = true;
wsl.defaultUser = "nathan";
{
imports = [
# WSL support
inputs.nixos-wsl.nixosModules.default
# Our modules
(import ../../modules/base.nix { inherit inputs; })
(import ../../modules/user.nix {
inherit inputs;
mutableUsers = true;
})
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
services.openssh.enable = true;
wsl.enable = true;
wsl.defaultUser = "nathan";
services.tailscale.enable = true;
services.openssh.enable = true;
nix.settings.system-features = ["x86_64-linux"];
services.tailscale.enable = true;
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.system-features = [ "x86_64-linux" ];
environment.systemPackages = with pkgs; [
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
time.timeZone = "America/Kentucky/Louisville";
environment.systemPackages = with pkgs; [
];
time.timeZone = "America/Kentucky/Louisville";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}
)
];
}
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}
)
];
}
);
}

View file

@ -1,12 +1,9 @@
{ inputs }:
{
{inputs}: {
config,
lib,
pkgs,
...
}:
{
}: {
imports = [
inputs.lix-module.nixosModules.default
];

View file

@ -3,15 +3,12 @@
mutableUsers ? false,
username ? "nathan",
homedir ? "/home/nathan",
}:
{
}: {
config,
lib,
pkgs,
...
}:
{
}: {
security.polkit = {
enable = true;
};
@ -30,6 +27,5 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEtE+KjKuHUj5bKKQBDKqhO5dpEQf8E8u1G6kRj7y6dI nathan@nixos"
];
};
};
}