install for laptop 1st attempt

This commit is contained in:
2025-01-09 10:48:22 -06:00
parent 51e6922790
commit 5e573e45ba
8 changed files with 216 additions and 70 deletions

View File

@@ -1,7 +1,8 @@
# NixOS System Config # Project 001 - Olympus
This is a repo for all of my nixos system configurations and isos This is a repo for all of my nixos system configurations and isos
# Goal: # Goal:
>- to define configs for all my nixos machines >- to define configs for all my nixos machines
>- to create a **100% reproduceable** system that can be deployed **offline** and **unattended** >- to create a **100% reproduceable** system that can be deployed **offline** and **unattended**
>- to serve as a foundation for future projects

View File

@@ -45,18 +45,21 @@
nixosConfigurations.homebox = nixpkgs.lib.nixosSystem { nixosConfigurations.homebox = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
./system-config/configuration/homebox ./system-config/configuration/homebox
]; ];
}; };
nixosConfigurations.laptop = nixpkgs.lib.nixosSystem { nixosConfigurations.laptop = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
./system-config/configuration/laptop ./system-config/configuration/laptop
];
};
nixosConfigurations.live = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./system-config/configuration/live
]; ];
}; };
}; };

View File

@@ -86,6 +86,12 @@
LC_TIME = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8";
}; };
services.displayManager.sddm.settings.AutoLogin = {
User = "nathan";
Session = "hyprland";
Relogin = true;
};
networking = { networking = {
hostName = "homebox"; hostName = "homebox";
nameservers = [ "1.1.1.1" "1.0.0.1" ]; nameservers = [ "1.1.1.1" "1.0.0.1" ];

View File

@@ -1,10 +1,18 @@
# Edit this configuration file to define what should be installed on { config, pkgs, lib, inputs, ... }:
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{ {
imports = [
./hardware-configuration.nix
inputs.system.nixosModule
inputs.home-manager.nixosModules.default
inputs.sops-nix.nixosModules.sops
];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Bootloader. # Bootloader.
@@ -17,12 +25,7 @@
}; };
hardware = { hardware = {
#graphics.enable = true; graphics.enable = true;
opengl = {
enable = true;
driSupport = true;
};
nvidia = { nvidia = {
modesetting.enable = true; modesetting.enable = true;
@@ -52,6 +55,7 @@
}; };
sysconfig.opts = { sysconfig.opts = {
sddm.enable = true;
openssh.enable = false; openssh.enable = false;
steam.enable = true; steam.enable = true;
pipewire.enable = true; pipewire.enable = true;
@@ -61,6 +65,30 @@
nh.enable = true; nh.enable = true;
}; };
home-manager = {
backupFileExtension = "backup";
extraSpecialArgs = { inherit inputs; };
users = {
"nathan" = lib.mkMerge [
{
config.homeconfig = {
impermanence.enable = false;
hyprland.enable = true;
swaylock.enable = true;
wal.enable = true;
wayvnc.enable = false;
mpd.enable = true;
ags.enable = true;
calcurse.enable = true;
rofi.enable = true;
firefox.enable = true;
};
}
inputs.nathan.homeManagerModule
];
};
};
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver = { services.xserver = {
enable = true; enable = true;
@@ -80,30 +108,17 @@
}; };
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
environment.shells = with pkgs; [ zsh ]; environment.shells = with pkgs; [ zsh ];
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
programs.adb.enable = true; programs.adb.enable = true;
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true; programs.zsh.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its 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 = "23.05"; # Did you read the comment? system.stateVersion = "23.05"; # Did you read the comment?
} }

View File

@@ -1,5 +1,84 @@
{ config, lib, pkgs, inputs, ... }: { { config, lib, pkgs, inputs, modulesPath, ... }: {
imports = with inputs; [
disko.nixosModules.default
(import ./disko.nix { device = "/dev/sda"; })
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
#sops-nix.nixosModules.sops
#home-manager.nixosModules.default
#system.nixosModule
];
config = {
nixpkgs.hostPlatform = "x86_64-linux";
boot = {
#kernelPackages = pkgs.linuxKernel.packages.linux_6_6;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
system.stateVersion = "24.05"; /*sysconfig.opts = {
sddm.enable = true;
openssh.enable = false;
pipewire.enable = true;
ags.enable = true;
hyprland.enable = true;
git.enable = true;
nh.enable = true;
};*/
users.users."nathan" = {
isNormalUser = true;
initialPassword = "7567";
extraGroups = [ "wheel" ];
};
/*home-manager = {
backupFileExtension = "backup";
extraSpecialArgs = { inherit inputs; };
users = {
"nathan" = lib.mkMerge [
inputs.nathan.homeManagerModule
{
config.homeconfig = {
impermanence.enable = false;
hyprland.enable = true;
swaylock.enable = true;
wal.enable = true;
wayvnc.enable = false;
mpd.enable = true;
ags.enable = true;
calcurse.enable = true;
rofi.enable = true;
firefox.enable = true;
};
}
];
};
};*/
system.stateVersion = "24.11";
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
settings = {
experimental-features = [ "nix-command" "flakes" ];
};
};
networking.hostName = "live";
fonts.packages = with pkgs; [ fira-code-nerdfont ];
};
} }

View File

@@ -14,6 +14,7 @@
name = "boot"; name = "boot";
size = "1M"; size = "1M";
type = "EF02"; type = "EF02";
priority = 1;
}; };
esp = { esp = {
name = "ESP"; name = "ESP";
@@ -23,49 +24,22 @@
type = "filesystem"; type = "filesystem";
format = "vfat"; format = "vfat";
mountpoint = "/boot"; mountpoint = "/boot";
mountOptions = [ "unmask=0077" ];
}; };
}; };
root = { root = {
name = "root"; name = "root";
size = "100%"; size = "100%";
content = { content = {
type = "lvm_pv"; type = "filesystem";
vg = "root_vg"; format = "ext4";
};
};
};
};
};
};
lvm_vg = {
root_vg = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountpoint = "/"; mountpoint = "/";
}; };
};
"/persist" = { };
mountOptions = ["subvol=persist" "noatime"]; };
mountpoint = "/persist"; };
}; };
"/nix" = {
mountOptions = ["subvol=nix" "noatime"];
mountpoint = "/nix";
};
};
};
};
};
};
};
}; };
} }

View File

@@ -0,0 +1,75 @@
{ config, lib, pkgs, inputs, modulesPath, ... }: {
imports = with inputs; [
disko.nixosModules.default
(import ./disko.nix { device = "/dev/sda"; })
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
sops-nix.nixosModules.sops
home-manager.nixosModules.default
system.nixosModule
];
config = {
nixpkgs.hostPlatform = "x86_64-linux";
sysconfig.opts = {
sddm.enable = true;
openssh.enable = false;
pipewire.enable = true;
ags.enable = true;
hyprland.enable = true;
git.enable = true;
nh.enable = true;
};
users.users."nathan" = {
isNormalUser = true;
initialPassword = "7567";
extraGroups = [ "wheel" ];
};
home-manager = {
backupFileExtension = "backup";
extraSpecialArgs = { inherit inputs; };
users = {
"nathan" = lib.mkMerge [
inputs.nathan.homeManagerModule
{
config.homeconfig = {
impermanence.enable = false;
hyprland.enable = true;
swaylock.enable = true;
wal.enable = true;
wayvnc.enable = false;
mpd.enable = true;
ags.enable = true;
calcurse.enable = true;
rofi.enable = true;
firefox.enable = true;
};
}
];
};
};
system.stateVersion = "24.11";
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
settings = {
experimental-features = [ "nix-command" "flakes" ];
};
};
networking.hostName = "live";
fonts.packages = with pkgs; [ fira-code-nerdfont ];
};
}

View File

@@ -31,13 +31,6 @@
libsForQt5.qtquickcontrols2 libsForQt5.qtquickcontrols2
libsForQt5.qtgraphicaleffects libsForQt5.qtgraphicaleffects
]; ];
settings = {
Autologin = {
User = "nathan";
Session = "hyprland";
Relogin = true;
};
};
}; };
}; };
}; };