Initial flake commit
Enough of an initial flake and layout for an initial commit.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
# Ignore generated hardware configuration files
|
|
||||||
hardware-configuration.nix
|
|
||||||
@@ -5,17 +5,10 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
|
||||||
[
|
|
||||||
# Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "nixos-base"; # Define your hostname.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
# Configure network proxy if necessary
|
||||||
@@ -43,10 +36,6 @@
|
|||||||
LC_TIME = "en_US.UTF-8";
|
LC_TIME = "en_US.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable automatic updates
|
|
||||||
system.autoUpgrade.enable = true;
|
|
||||||
system.autoUpgrade.allowReboot = true;
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
|
||||||
@@ -88,29 +77,6 @@
|
|||||||
# to login make sure you set hashedPassword on users.users.<name> using mkpasswd.
|
# to login make sure you set hashedPassword on users.users.<name> using mkpasswd.
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with 'passwd'.
|
|
||||||
users.users.wesley = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Wesley Irvin";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
shell = pkgs.zsh; # Set our default shell for our user to zsh
|
|
||||||
hashedPassword = "$y$j9T$PXPH.OUWrqDkhAQR03weh/$Ge5dooWNGvExpXtA2Wtqe01e6CIyVvrMZiKZM6Ufzd3";
|
|
||||||
packages = with pkgs; [
|
|
||||||
alacritty
|
|
||||||
bottom
|
|
||||||
brave
|
|
||||||
element-desktop
|
|
||||||
jamesdsp
|
|
||||||
keepassxc
|
|
||||||
neofetch
|
|
||||||
neovim
|
|
||||||
nextcloud-client
|
|
||||||
retroarchFull
|
|
||||||
rustup
|
|
||||||
spotify
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
@@ -148,7 +114,7 @@
|
|||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
keyMode = "vi";
|
keyMode = "vi";
|
||||||
shortcut = "s";
|
shortcut = "a";
|
||||||
clock24 = true;
|
clock24 = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
49
flake.lock
generated
Normal file
49
flake.lock
generated
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1687871164,
|
||||||
|
"narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-23.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1687555006,
|
||||||
|
"narHash": "sha256-GD2Kqb/DXQBRJcHqkM2qFZqbVenyO7Co/80JHRMg2U0=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "33223d479ffde3d05ac16c6dff04ae43cc27e577",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-23.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
30
flake.nix
Normal file
30
flake.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
description = "Wesley's NixOS Configurations Flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||||
|
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, home-manager, ... }@inputs: {
|
||||||
|
nixosConfigurations = {
|
||||||
|
"nixos-bootstrap" = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./hardware/nixos-bootstrap.nix
|
||||||
|
./configs/desktop.nix
|
||||||
|
./hosts/nixos-bootstrap.nix
|
||||||
|
./users/wesley.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.wesley = import ./home/wesley.nix;
|
||||||
|
}
|
||||||
|
./updates/no-restart.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
36
hardware/nixos-bootstrap.nix
Normal file
36
hardware/nixos-bootstrap.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# 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 =
|
||||||
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/544f57e2-71e0-433b-8afe-305610bb4a6b";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/DE9E-321B";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
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.enp1s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
||||||
5
hosts/nixos-bootstrap.nix
Normal file
5
hosts/nixos-bootstrap.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
networking.hostName = "nixos-bootstrap"; # Define your hostname.
|
||||||
|
}
|
||||||
9
updates/no-restart.nix
Normal file
9
updates/no-restart.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Enable automatic updates
|
||||||
|
system.autoUpgrade.enable = true;
|
||||||
|
# Automatically restart after update
|
||||||
|
#system.autoUpgrade.allowReboot = true;
|
||||||
|
}
|
||||||
|
|
||||||
25
users/wesley.nix
Normal file
25
users/wesley.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
users.users.wesley = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Wesley Irvin";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
|
shell = pkgs.zsh; # Set our default shell for our user to zsh
|
||||||
|
hashedPassword = "$y$j9T$PXPH.OUWrqDkhAQR03weh/$Ge5dooWNGvExpXtA2Wtqe01e6CIyVvrMZiKZM6Ufzd3";
|
||||||
|
packages = with pkgs; [
|
||||||
|
alacritty
|
||||||
|
bottom
|
||||||
|
brave
|
||||||
|
element-desktop
|
||||||
|
jamesdsp
|
||||||
|
keepassxc
|
||||||
|
neofetch
|
||||||
|
neovim
|
||||||
|
nextcloud-client
|
||||||
|
retroarchFull
|
||||||
|
rustup
|
||||||
|
spotify
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user