fix: apply-system.sh now uses flake

nix-components
pegasust 2022-11-06 11:48:16 +00:00
parent 711babdf6b
commit 56c6847439
4 changed files with 97 additions and 15 deletions

View File

@ -18,5 +18,5 @@ ln -s -T ${SCRIPT_DIR} ${CONFIG_DIR}
# $PWD to ~/.dotfiles
pushd ~/.dotfiles
sudo nixos-rebuild switch -I nixos-config=./system/configuration.nix
sudo nixos-rebuild switch --flake ./system#nixos
popd

30
devel/flake.nix Normal file
View File

@ -0,0 +1,30 @@
{
description = "My development flake";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }: {
programs.neovim = {
enable = true;
defaultEditor = true;
};
programs.git = {
enable = true;
};
programs.zsh = {
enable = true;
shellAliases = {
# list lists
ll = "ls -l";
update = "sudo nixos-rebuild switch";
};
history = {
size = 10000;
path = "${config.xdg.dataHome}/zsh/history";
};
};
};
}

View File

@ -11,7 +11,6 @@ in
nixos-wsl.nixosModules.wsl
];
networking.hostName = "nixos";
system.stateVersion = "22.05";
wsl = {
@ -28,6 +27,7 @@ in
};
# users.users.<defaultUser>.uid = 1000;
networking.hostName = "nixos";
# Enable nix flakes
nix.package = pkgs.nixFlakes;
@ -44,19 +44,6 @@ in
enable = true;
# more information should be configured under user level
};
programs.zsh = {
enable = true;
shellAliases = {
# list lists
ll = "ls -l";
update = "sudo nixos-rebuild switch";
};
history = {
size = 10000;
path = "${config.xdg.dataHome}/zsh/history";
};
};
environment.systemPackages = [
pkgs.gnumake
];

View File

@ -0,0 +1,65 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ ];
boot.initrd.availableKernelModules = [ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/sdd";
fsType = "ext4";
};
fileSystems."/usr/lib/wsl/drivers" =
{ device = "drivers";
fsType = "9p";
};
fileSystems."/usr/lib/wsl/lib" =
{ device = "lib";
fsType = "9p";
};
fileSystems."/mnt/wsl" =
{ device = "tmpfs";
fsType = "tmpfs";
};
fileSystems."/mnt/c" =
{ device = "C:\134";
fsType = "9p";
};
fileSystems."/mnt/d" =
{ device = "D:\134";
fsType = "9p";
};
fileSystems."/mnt/f" =
{ device = "F:\134";
fsType = "9p";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.bond0.useDHCP = lib.mkDefault true;
# networking.interfaces.bonding_masters.useDHCP = lib.mkDefault true;
# networking.interfaces.dummy0.useDHCP = lib.mkDefault true;
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
# networking.interfaces.sit0.useDHCP = lib.mkDefault true;
# networking.interfaces.tunl0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}