Initial commit

This commit is contained in:
Alisceon 2025-07-20 17:46:39 +02:00
commit 333ecafb68
4 changed files with 168 additions and 0 deletions

34
flake.nix Normal file
View file

@ -0,0 +1,34 @@
{
description = "NixOS configuration for all hosts";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs.follows = "nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, home-manager, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in {
nixosConfigurations.laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit system pkgs;
};
modules = [
./hosts/electra/configuration.nix
./modules/common.nix
./modules/users/alisceon.nix
home-manager.nixosModules.home-manager
];
};
});
}

View file

@ -0,0 +1,81 @@
{ config, pkgs, ... }:
{
imports =
[ ./hardware-configuration.nix ];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.hostName = "electra";
networking.networkmanager.enable = true;
time.timeZone = "UTC";
i18n.defaultLocale = "en_US.UTF-8";
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
xkb.layout = "us";
displayManager.gdm.wayland = true;
};
services.printing.enable = true;
sound.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
services.fwupd.enable = true;
users.users.dummy = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "podman" ];
shell = pkgs.fish;
hashedPassword = "!" ; # placeholder
};
security.sudo.wheelNeedsPassword = false;
programs.fish.enable = true;
environment.systemPackages = with pkgs; [
git
wget
curl
podman
firefox
discord
signal-desktop
vscode
obsidian
alacritty
gnome.gnome-tweaks
gnome.dconf-editor
gnomeExtensions.pop-shell
tlp
bat
btop
ripgrep
fd
eza
];
virtualisation.podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
services.tlp.enable = true;
programs.dconf.enable = true;
environment.shells = with pkgs; [ fish ];
system.stateVersion = "24.05";
}

17
modules/common.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
security.rtkit.enable = true;
services.gnome.gnome-keyring.enable = true;
environment.variables.EDITOR = "nano";
nix.settings.auto-optimise-store = true;
systemd.extraConfig = ''
DefaultTimeoutStopSec=10s
'';
}

View file

@ -0,0 +1,36 @@
{ config, pkgs, ... }:
{
home-manager.users.alisceon = {
home.stateVersion = "24.05";
programs.fish.enable = true;
programs.git.enable = true;
programs.vscode.enable = true;
programs.firefox = {
enable = true;
nativeMessagingHosts = true;
};
programs.obsidian.enable = true;
programs.bat.enable = true;
programs.alacritty = {
enable = true;
settings.font.normal.family = "FiraCode Nerd Font";
};
home.packages = with pkgs; [
signal-desktop
discord
eza
fd
ripgrep
];
xdg.enable = true;
xdg.userDirs.enable = true;
xdg.mime.enable = true;
};
}