Compare commits

..

No commits in common. "de8c6e1327ab8c6c8b649bb3293acd3b422fb456" and "6626767ef2f3d76c513a1ad06445f82c396bf793" have entirely different histories.

23 changed files with 426 additions and 486 deletions

View file

@ -1,37 +1,38 @@
{ withSystem, inputs, ... }:
{ {
withSystem, perSystem =
inputs, {
... config,
}: { pkgs,
perSystem = { lib,
config, inputs',
pkgs, ...
lib, }:
inputs', {
... devShells.idris2 =
}: { let
devShells.idris2 = let libPackages = with pkgs; [
libPackages = with pkgs; [ readline70
readline70 openssl
openssl ];
]; in
in pkgs.mkShell {
pkgs.mkShell { buildInputs =
buildInputs = with pkgs; with pkgs;
[ [
# Idris toolchain # Idris toolchain
inputs'.nixpkgs-unstable.legacyPackages.idris2Packages.pack inputs'.nixpkgs-unstable.legacyPackages.idris2Packages.pack
inputs'.nixpkgs-unstable.legacyPackages.idris2 inputs'.nixpkgs-unstable.legacyPackages.idris2
pkg-config pkg-config
gmp gmp
gnumake gnumake
chez chez
rlwrap rlwrap
] ]
++ libPackages; ++ libPackages;
shellHook = '' shellHook = ''
export LD_LIBRARY_PATH=${lib.makeLibraryPath libPackages} export LD_LIBRARY_PATH=${lib.makeLibraryPath libPackages}
''; '';
}; };
}; };
} }

View file

@ -1,25 +0,0 @@
{
withSystem,
inputs,
...
}: {
perSystem = {
config,
pkgs,
lib,
inputs',
...
}: {
devShells.markdown = pkgs.mkShell {
buildInputs = with pkgs; [
(python3.withPackages (ps:
with ps; [
mdformat
mdformat-gfm
mdformat-tables
mdformat-footnote
]))
];
};
};
}

View file

@ -1,40 +1,41 @@
{ withSystem, inputs, ... }:
{ {
withSystem, perSystem =
inputs, {
... config,
}: { pkgs,
perSystem = { lib,
config, inputs',
pkgs, ...
lib, }:
inputs', {
... devShells.raku =
}: { let
devShells.raku = let rakudo_env = pkgs.buildEnv {
rakudo_env = pkgs.buildEnv { name = "rakudo-env";
name = "rakudo-env"; paths = with pkgs; [
paths = with pkgs; [ rakudo
rakudo zef
zef ];
]; pathsToLink = [
pathsToLink = [ "/bin"
"/bin" "/lib"
"/lib" "/share"
"/share" ];
]; };
}; libPackages = with pkgs; [ readline70 ];
libPackages = with pkgs; [readline70]; in
in pkgs.mkShell {
pkgs.mkShell { buildInputs =
buildInputs = with pkgs; with pkgs;
[ [
# Raku toolchain # Raku toolchain
rakudo_env rakudo_env
] ]
++ libPackages; ++ libPackages;
shellHook = '' shellHook = ''
export LD_LIBRARY_PATH=${lib.makeLibraryPath libPackages} export LD_LIBRARY_PATH=${lib.makeLibraryPath libPackages}
''; '';
}; };
}; };
} }

View file

@ -1,21 +1,16 @@
{ withSystem, inputs, ... }:
{ {
withSystem, perSystem =
inputs, { config, pkgs, ... }:
... {
}: { devShells.rust = pkgs.mkShell {
perSystem = { buildInputs = with pkgs; [
config, # Rust toolchain
pkgs, clang
... rustup
}: { # Faster builds
devShells.rust = pkgs.mkShell { sccache
buildInputs = with pkgs; [ ];
# Rust toolchain };
clang
rustup
# Faster builds
sccache
];
}; };
};
} }

View file

@ -20,12 +20,9 @@
}; };
}; };
outputs = inputs @ { outputs =
flake-parts, inputs@{ flake-parts, self, ... }:
self, flake-parts.lib.mkFlake { inherit inputs; } {
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [ imports = [
inputs.devshell.flakeModule inputs.devshell.flakeModule
./nixos/machines/wsl/configuration.nix ./nixos/machines/wsl/configuration.nix
@ -36,7 +33,6 @@
./devshells/rust.nix ./devshells/rust.nix
./devshells/idris2.nix ./devshells/idris2.nix
./devshells/raku.nix ./devshells/raku.nix
./devshells/markdown.nix
]; ];
config = { config = {
systems = [ systems = [
@ -45,28 +41,31 @@
"aarch64-darwin" "aarch64-darwin"
"x86_64-darwin" "x86_64-darwin"
]; ];
perSystem = { perSystem =
config, {
self', config,
inputs', self',
pkgs, inputs',
system, pkgs,
... system,
}: { ...
# Per-system attributes can be defined here. The self' and inputs' }:
# module parameters provide easy access to attributes of the same {
# system. # Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.
# Equivalent to inputs'.nixpkgs.legacyPackages.hello; # Equivalent to inputs'.nixpkgs.legacyPackages.hello;
packages.default = pkgs.hello; packages.default = pkgs.hello;
}; };
}; };
options = with inputs.nixpkgs.lib; { options = with inputs.nixpkgs.lib; {
flake = flake-parts.lib.mkSubmoduleOptions { flake = flake-parts.lib.mkSubmoduleOptions {
homeConfigurations = mkOption { homeConfigurations = mkOption {
type = types.lazyAttrsOf types.raw; type = types.lazyAttrsOf types.raw;
default = {}; default = { };
}; };
}; };
}; };
}; };

View file

@ -1,67 +1,56 @@
{ withSystem, inputs, ... }:
{ {
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; }; # perSystem = { ... }: { config.packages.hello = ...; };
flake.homeConfigurations.crash = withSystem "x86_64-linux" ( flake.homeConfigurations.crash = withSystem "x86_64-linux" (
ctx @ { ctx@{ config, inputs', ... }:
config, inputs.home-manager.lib.homeManagerConfiguration {
inputs', pkgs = inputs.nixpkgs.legacyPackages.${"x86_64-linux"};
... extraSpecialArgs = {
}: inherit inputs inputs';
inputs.home-manager.lib.homeManagerConfiguration { packages = config.packages;
pkgs = inputs.nixpkgs.legacyPackages.${"x86_64-linux"}; };
extraSpecialArgs = { modules = [
inherit inputs inputs'; (
packages = config.packages; {
}; config,
modules = [ lib,
( pkgs,
{ ...
config, }:
lib, {
pkgs, imports = [
... ../../modules/programs/shell.nix
}: { ../../modules/programs/neovim.nix
imports = [ (import ../../modules/programs/git.nix { })
../../modules/programs/shell.nix ../../modules/programs/core.nix
../../modules/programs/neovim.nix ../../modules/programs/devel.nix
(import ../../modules/programs/git.nix {}) ../../modules/programs/ssh.nix
../../modules/programs/core.nix (import ../../modules/programs/emacs.nix { })
../../modules/programs/devel.nix ../../modules/programs/fonts.nix
../../modules/programs/ssh.nix ../../modules/programs/desktop.nix
(import ../../modules/programs/emacs.nix {}) ];
../../modules/programs/fonts.nix home.username = "nathan";
../../modules/programs/desktop.nix home.homeDirectory = "/home/nathan/";
]; programs.command-not-found.enable = true;
home.username = "nathan"; home.stateVersion = "24.11";
home.homeDirectory = "/home/nathan/"; programs.home-manager.enable = true;
programs.command-not-found.enable = true;
home.stateVersion = "24.11";
programs.home-manager.enable = true;
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Machine specific configuration # Machine specific configuration
services.emacs.defaultEditor = true; services.emacs.defaultEditor = true;
systemd.user = { systemd.user.targets.tray = {
targets.tray = { Unit = {
Unit = { Description = "Home Manager System Tray";
Description = "Home Manager System Tray"; Requires = [ "graphical-session-pre.target" ];
Requires = ["graphical-session.target"];
};
};
services.syncthingtray = {
Service.ExecStart = lib.mkForce "${pkgs.syncthingtray}/bin/syncthingtray --wait";
};
}; };
} };
) }
]; )
} ];
}
); );
} }

View file

@ -1,57 +1,51 @@
{ withSystem, inputs, ... }:
{ {
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; }; # perSystem = { ... }: { config.packages.hello = ...; };
flake.homeConfigurations.wsl = withSystem "x86_64-linux" ( flake.homeConfigurations.wsl = withSystem "x86_64-linux" (
ctx @ { ctx@{ config, inputs', ... }:
config, inputs.home-manager.lib.homeManagerConfiguration {
inputs', pkgs = inputs.nixpkgs.legacyPackages.${"x86_64-linux"};
... extraSpecialArgs = {
}: inherit inputs inputs';
inputs.home-manager.lib.homeManagerConfiguration { packages = config.packages;
pkgs = inputs.nixpkgs.legacyPackages.${"x86_64-linux"}; };
extraSpecialArgs = { modules = [
inherit inputs inputs'; (
packages = config.packages; {
}; config,
modules = [ lib,
( pkgs,
{ ...
config, }:
lib, {
pkgs, imports = [
... ../../modules/programs/shell.nix
}: { ../../modules/programs/neovim.nix
imports = [ (import ../../modules/programs/git.nix { })
../../modules/programs/shell.nix ../../modules/programs/core.nix
../../modules/programs/neovim.nix ../../modules/programs/devel.nix
(import ../../modules/programs/git.nix {}) ../../modules/programs/ssh.nix
../../modules/programs/core.nix (import ../../modules/programs/emacs.nix { })
../../modules/programs/devel.nix ../../modules/programs/fonts.nix
../../modules/programs/ssh.nix ];
(import ../../modules/programs/emacs.nix {}) home.username = "nathan";
../../modules/programs/fonts.nix home.homeDirectory = "/home/nathan/";
]; programs.command-not-found.enable = true;
home.username = "nathan"; home.stateVersion = "24.11";
home.homeDirectory = "/home/nathan/"; programs.home-manager.enable = true;
programs.command-not-found.enable = true;
home.stateVersion = "24.11";
programs.home-manager.enable = true;
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Machine specific configuration # Machine specific configuration
programs.nushell.environmentVariables = { programs.nushell.environmentVariables = {
VISUAL = "nvim"; VISUAL = "nvim";
EDITOR = "nvim"; EDITOR = "nvim";
}; };
} }
) )
]; ];
} }
); );
} }

View file

@ -3,7 +3,9 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
# Rust rewrites of cli stuff # Rust rewrites of cli stuff
fd fd
@ -39,10 +41,7 @@
aggressiveResize = true; aggressiveResize = true;
keyMode = "vi"; keyMode = "vi";
shortcut = "x"; shortcut = "x";
terminal = terminal = if pkgs.stdenv.isLinux then "tmux-256color" else "screen-256color";
if pkgs.stdenv.isLinux
then "tmux-256color"
else "screen-256color";
escapeTime = 100; escapeTime = 100;
plugins = with pkgs; [ plugins = with pkgs; [
tmuxPlugins.cpu tmuxPlugins.cpu
@ -57,4 +56,5 @@
}; };
programs.btop.enable = true; programs.btop.enable = true;
programs.jq.enable = true; programs.jq.enable = true;
} }

View file

@ -4,7 +4,9 @@
pkgs, pkgs,
inputs', inputs',
... ...
}: { }:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
# Communications # Communications
webcord-vencord webcord-vencord
@ -25,4 +27,5 @@
enable = true; enable = true;
}; };
}; };
} }

View file

@ -2,9 +2,10 @@
config, config,
lib, lib,
pkgs, pkgs,
inputs',
... ...
}: { }:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
# Git addons # Git addons
git-secret git-secret
@ -14,10 +15,6 @@
nix-du nix-du
sops sops
hut hut
# Markdown
cmark-gfm
pandoc
mdbook
]; ];
programs = { programs = {
direnv.enable = true; direnv.enable = true;

View file

@ -1,19 +1,21 @@
{emacsPackage ? null}: { {
emacsPackage ? null,
}:
{
config, config,
lib, lib,
pkgs, pkgs,
... ...
}: let }:
let
myAspell = pkgs.aspellWithDicts (d: [ myAspell = pkgs.aspellWithDicts (d: [
d.en d.en
d.en-science d.en-science
d.en-computers d.en-computers
]); ]);
emacsPackage' = emacsPackage' = if emacsPackage == null then pkgs.emacs29-pgtk else emacsPackage;
if emacsPackage == null in
then pkgs.emacs29-pgtk {
else emacsPackage;
in {
home.packages = with pkgs; [ home.packages = with pkgs; [
# For markdown rendering # For markdown rendering
python312Packages.grip python312Packages.grip
@ -46,7 +48,7 @@ in {
comment = "Org protocol"; comment = "Org protocol";
desktopName = "org-protocol"; desktopName = "org-protocol";
type = "Application"; type = "Application";
mimeTypes = ["x-scheme-handler/org-protocol"]; mimeTypes = [ "x-scheme-handler/org-protocol" ];
}) })
# For format output # For format output
# wkhtmltopdf # wkhtmltopdf
@ -54,20 +56,19 @@ in {
programs.emacs = { programs.emacs = {
enable = true; enable = true;
package = emacsPackage'; package = emacsPackage';
extraPackages = epkgs: extraPackages =
with pkgs; [ epkgs: with pkgs; [
epkgs.mu4e epkgs.mu4e
epkgs.vterm epkgs.vterm
epkgs.pdf-tools epkgs.pdf-tools
epkgs.emacsql epkgs.emacsql
epkgs.emacsql-sqlite epkgs.emacsql-sqlite
(tree-sitter.withPlugins ( (tree-sitter.withPlugins (
grammars: grammars: with grammars; [
with grammars; [ tree-sitter-nix
tree-sitter-nix tree-sitter-rust
tree-sitter-rust tree-sitter-toml
tree-sitter-toml ]
]
)) ))
]; ];
}; };

View file

@ -3,7 +3,9 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
fonts.fontconfig = { fonts.fontconfig = {
enable = true; enable = true;
defaultFonts = { defaultFonts = {
@ -11,8 +13,8 @@
"Noto Emoji" "Noto Emoji"
"Noto Color Emoji" "Noto Color Emoji"
]; ];
monospace = ["JetBrainsMono-NF-Regular"]; monospace = [ "JetBrainsMono-NF-Regular" ];
sansSerif = ["Roboto"]; sansSerif = [ "Roboto" ];
}; };
}; };

View file

@ -1,12 +1,15 @@
{ {
gitUserName ? "Nathan McCarty", gitUserName ? "Nathan McCarty",
gitUserEmail ? "thatonelutenist@stranger.systems", gitUserEmail ? "thatonelutenist@stranger.systems",
}: { }:
{
config, config,
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
programs.git = { programs.git = {
enable = true; enable = true;
package = pkgs.gitAndTools.gitFull; package = pkgs.gitAndTools.gitFull;

View file

@ -3,7 +3,9 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
programs.neovim = { programs.neovim = {
enable = true; enable = true;
viAlias = true; viAlias = true;

View file

@ -3,7 +3,9 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
programs.nushell = { programs.nushell = {
enable = true; enable = true;
configFile.source = ./nushell/config.nu; configFile.source = ./nushell/config.nu;
@ -62,4 +64,5 @@
}; };
programs.fzf.enable = true; programs.fzf.enable = true;
} }

View file

@ -3,7 +3,9 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
programs.ssh = { programs.ssh = {
# SSH configuration # SSH configuration
enable = true; enable = true;

View file

@ -1,15 +1,13 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
imports = [ imports = [
]; ];
# Setup nixbuild.net, since this laptop is somewhat under powered
programs.ssh.extraConfig = '' programs.ssh.extraConfig = ''
Host eu.nixbuild.net Host eu.nixbuild.net
PubkeyAcceptedKeyTypes ssh-ed25519 PubkeyAcceptedKeyTypes ssh-ed25519
@ -17,27 +15,25 @@
IPQoS throughput IPQoS throughput
IdentityFile /home/nathan/.ssh/id_ed25519 IdentityFile /home/nathan/.ssh/id_ed25519
''; '';
programs.ssh.knownHosts = { programs.ssh.knownHosts = {
nixbuild = { nixbuild = {
hostNames = ["eu.nixbuild.net"]; hostNames = [ "eu.nixbuild.net" ];
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM"; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM";
}; };
}; };
# Configure nix
nix = { nix = {
settings = { settings = {
# Auto optimize the store after every action
auto-optimise-store = true; auto-optimise-store = true;
trusted-users = [ trusted-users = [
"root" "root"
"nathan" "nathan"
]; ];
}; };
# GC agressively
gc = { gc = {
automatic = true; automatic = true;
dates = "daily"; dates = "hourly";
options = "--delete-older-than 7d"; options = "--delete-older-than 7d";
}; };
distributedBuilds = true; distributedBuilds = true;
@ -54,30 +50,9 @@
]; ];
}; };
# Bootloader and plymouth # Bootloader.
boot = { boot.loader.systemd-boot.enable = true;
loader = { boot.loader.efi.canTouchEfiVariables = true;
systemd-boot = {
enable = true;
consoleMode = "auto";
};
efi.canTouchEfiVariables = true;
};
plymouth = {
enable = true;
};
};
# Steam setup
programs.steam = {
enable = true;
gamescopeSession = {
enable = true;
args = [
"--expose-wayland"
];
};
};
networking.hostName = "crash"; # Define your hostname. networking.hostName = "crash"; # Define your hostname.
@ -145,7 +120,7 @@
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.nathan = { users.users.nathan = {
extraGroups = ["networkmanager"]; extraGroups = [ "networkmanager" ];
}; };
# Install firefox. # Install firefox.
@ -186,4 +161,5 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment? system.stateVersion = "24.11"; # Did you read the comment?
} }

View file

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

View file

@ -1,53 +1,49 @@
{ withSystem, inputs, ... }:
{ {
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; }; # perSystem = { ... }: { config.packages.hello = ...; };
flake.nixosConfigurations.crash = withSystem "x86_64-linux" ( flake.nixosConfigurations.crash = withSystem "x86_64-linux" (
ctx @ { ctx@{ config, inputs', ... }:
config, inputs.nixpkgs.lib.nixosSystem {
inputs', # 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
inputs.nixpkgs.lib.nixosSystem { # on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html
# Expose `packages`, `inputs` and `inputs'` as module arguments. specialArgs = {
# Use specialArgs permits use in `imports`. packages = config.packages;
# Note: if you publish modules for reuse, do not rely on specialArgs, but inherit inputs inputs';
# on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html };
specialArgs = { modules = [
packages = config.packages; (
inherit inputs inputs'; {
}; config,
modules = [ lib,
( pkgs,
{ ...
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;
})
];
nix.settings.experimental-features = [ {
"nix-command" imports = [
"flakes" # 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"
];
}
)
];
}
); );
} }

View file

@ -1,64 +1,60 @@
{ withSystem, inputs, ... }:
{ {
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; }; # perSystem = { ... }: { config.packages.hello = ...; };
flake.nixosConfigurations.inst = withSystem "x86_64-linux" ( flake.nixosConfigurations.inst = withSystem "x86_64-linux" (
ctx @ { ctx@{ config, inputs', ... }:
config, inputs.nixpkgs.lib.nixosSystem {
inputs', # 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
inputs.nixpkgs.lib.nixosSystem { # on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html
# Expose `packages`, `inputs` and `inputs'` as module arguments. specialArgs = {
# Use specialArgs permits use in `imports`. packages = config.packages;
# Note: if you publish modules for reuse, do not rely on specialArgs, but inherit inputs inputs';
# on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html };
specialArgs = { modules = [
packages = config.packages; "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix"
inherit inputs inputs'; "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
}; inputs.nixos-hardware.nixosModules.microsoft-surface-common
modules = [ (
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix" # NixOS-WSL specific options are documented on the NixOS-WSL repository:
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" # https://github.com/nix-community/NixOS-WSL
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";
nix.settings.experimental-features = [ {
"nix-command" config,
"flakes" lib,
]; pkgs,
...
}:
networking.hostId = "9affdaa4"; {
imports = [
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
environment.systemPackages = with pkgs; [ nix.settings.experimental-features = [
]; "nix-command"
"flakes"
];
time.timeZone = "America/Kentucky/Louisville"; networking.hostId = "9affdaa4";
# This value determines the NixOS release from which the default environment.systemPackages = with pkgs; [
# 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. time.timeZone = "America/Kentucky/Louisville";
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # This value determines the NixOS release from which the default
system.stateVersion = "24.11"; # Did you read the comment? # 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,76 +1,72 @@
{ withSystem, inputs, ... }:
{ {
withSystem,
inputs,
...
}: {
# perSystem = { ... }: { config.packages.hello = ...; }; # perSystem = { ... }: { config.packages.hello = ...; };
flake.nixosConfigurations.wsl = withSystem "x86_64-linux" ( flake.nixosConfigurations.wsl = withSystem "x86_64-linux" (
ctx @ { ctx@{ config, inputs', ... }:
config, inputs.nixpkgs.lib.nixosSystem {
inputs', # 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
inputs.nixpkgs.lib.nixosSystem { # on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html
# Expose `packages`, `inputs` and `inputs'` as module arguments. specialArgs = {
# Use specialArgs permits use in `imports`. packages = config.packages;
# Note: if you publish modules for reuse, do not rely on specialArgs, but inherit inputs inputs';
# on the flake scope instead. See also https://flake.parts/define-module-in-separate-file.html };
specialArgs = { modules = [
packages = config.packages; (
inherit inputs inputs'; # NixOS-WSL specific options are documented on the NixOS-WSL repository:
}; # https://github.com/nix-community/NixOS-WSL
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";
wsl.enable = true; {
wsl.defaultUser = "nathan"; config,
lib,
pkgs,
...
}:
services.openssh.enable = true; {
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.tailscale.enable = true; wsl.enable = true;
wsl.defaultUser = "nathan";
nix.settings.system-features = ["x86_64-linux"]; services.openssh.enable = true;
nix.settings.experimental-features = [ services.tailscale.enable = true;
"nix-command"
"flakes"
];
environment.systemPackages = with pkgs; [ nix.settings.system-features = [ "x86_64-linux" ];
];
time.timeZone = "America/Kentucky/Louisville"; nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# This value determines the NixOS release from which the default environment.systemPackages = with pkgs; [
# 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. time.timeZone = "America/Kentucky/Louisville";
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # This value determines the NixOS release from which the default
system.stateVersion = "24.11"; # Did you read the comment? # 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,9 +1,12 @@
{inputs}: { { inputs }:
{
config, config,
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
imports = [ imports = [
inputs.lix-module.nixosModules.default inputs.lix-module.nixosModules.default
]; ];
@ -17,7 +20,7 @@
neovim neovim
git git
tmux tmux
alejandra nixfmt-rfc-style
nix-index nix-index
]; ];

View file

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