flake #5

Merged
wesley merged 2 commits from flake into master 2023-06-29 13:52:29 -04:00
9 changed files with 155 additions and 37 deletions
Showing only changes of commit dd4835f520 - Show all commits

2
.gitignore vendored
View File

@@ -1,2 +0,0 @@
# Ignore generated hardware configuration files
hardware-configuration.nix

View File

@@ -5,17 +5,10 @@
{ config, pkgs, ... }:
{
imports =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos-base"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
@@ -43,10 +36,6 @@
LC_TIME = "en_US.UTF-8";
};
# Enable automatic updates
system.autoUpgrade.enable = true;
system.autoUpgrade.allowReboot = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
@@ -88,29 +77,6 @@
# to login make sure you set hashedPassword on users.users.<name> using mkpasswd.
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
nixpkgs.config.allowUnfree = true;
@@ -148,7 +114,7 @@
programs.tmux = {
enable = true;
keyMode = "vi";
shortcut = "s";
shortcut = "a";
clock24 = true;
};

49
flake.lock generated Normal file
View 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
View 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
];
};
};
};
}

View 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";
}

View File

@@ -0,0 +1,5 @@
{ config, pkgs, ... }:
{
networking.hostName = "nixos-bootstrap"; # Define your hostname.
}

9
updates/no-restart.nix Normal file
View 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
View 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
];
};
}