Compare commits

6 Commits

Author SHA1 Message Date
Wesley Irvin
28b22b9f33 Merge pull request 'flake' (#5) from flake into master
Reviewed-on: #5
2023-06-29 17:52:29 +00:00
Wesley Irvin
dd4835f520 Initial flake commit
Enough of an initial flake and layout for an initial commit.
2023-06-29 13:42:57 -04:00
Wesley Irvin
69122b6ad7 Ignore Hardware Configuration
Added in a .gitignore that adds in hardware-configuration.nix so
that we don't commit our hardware configurations and they can
stay unique per system.
2023-06-25 16:24:43 -04:00
Wesley Irvin
5338912d19 Merge pull request 'KeepassXC and Nextcloud' (#1) from nextcloud-keepass into master
Reviewed-on: #1
2023-06-18 20:13:18 +00:00
Wesley Irvin
86201c23b0 KeepassXC and Nextcloud
Patch to add KeepassXC and Nextcloud desktop to base config to
install for user wesley.
2023-06-18 16:10:45 -04:00
Wesley Irvin
e0011f16b6 Timeshift and tmux
Added in support for timeshift and added in cron services with
correct entry so that timeshift will take snapshots properly
on a schedule. Added in and configured tmux support. Was thinking
of using zellij but tmux just integrates so much nicer to nix.
2023-06-17 21:04:34 -04:00
8 changed files with 168 additions and 32 deletions

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,27 +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
neofetch
neovim
retroarchFull
rustup
spotify
];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
@@ -142,6 +110,14 @@
# Now add the zsh shell to /etc/shells so others can set their shell
environment.shells = with pkgs; [ zsh ];
# Enable tmux support and configure it to our usage
programs.tmux = {
enable = true;
keyMode = "vi";
shortcut = "a";
clock24 = true;
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
@@ -152,6 +128,12 @@
# List services that you want to enable:
# Enable Vixie cron service
services.cron.enable = true;
services.cron.systemCronJobs = [
"0 * * * * root timeshift --check --scripted"
];
# Enable the OpenSSH daemon.
# services.openssh.enable = 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
];
};
}