Skip to content

Commit

Permalink
Merge home-manager/nixos config
Browse files Browse the repository at this point in the history
  • Loading branch information
FredeEB committed Dec 13, 2023
2 parents 8b830b2 + 097683b commit 24df4ea
Show file tree
Hide file tree
Showing 5 changed files with 451 additions and 0 deletions.
249 changes: 249 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
description = "Bun dotfiles nix flake";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
dotfiles = {
url = "github:fredeeb/dotfiles";
flake = false;
};
};

outputs = inputs@{ nixpkgs, dotfiles, nixos-hardware, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
nixosConfigurations = {
ideapad = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./systems/nixos.nix
./systems/ideapad.nix
];
specialArgs = inputs;
};
};
homeConfigurations = {
bun = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./users/bun.nix ];
extraSpecialArgs = { inherit inputs; };
};
};
};
}
29 changes: 29 additions & 0 deletions systems/ideapad.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];

boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];

networking.hostName = "ideapad";

fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};

"/boot" = {
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
};

swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];

networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
71 changes: 71 additions & 0 deletions systems/nixos.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{ config, pkgs, home-manager, ... }: {

imports = [
home-manager.nixosModules.default
];

users.users.bun = {
isNormalUser = true;
home = "/home/bun";
extraGroups = [ "wheel" "docker" ];
};

fonts.packages = with pkgs; [
noto-fonts
noto-fonts-emoji
(nerdfonts.override { fonts = [ "Iosevka" ]; })
];

# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

# Enable networking
# networking.networkmanager.enable = true;
networking.wireless.iwd.enable = true;
services.connman.enable = true;
services.connman.wifi.backend = "iwd";
# Set your time zone.
time.timeZone = "Europe/Copenhagen";

# Configure keymap in X11
services.xserver = {
enable = true;

autoRepeatDelay = 200;
autoRepeatInterval = 50;

# Keyboard
xkb = {
layout = "us";
options = "caps:escape";
};

displayManager.lightdm.enable = true;
windowManager.awesome.enable = true;
};

virtualisation.docker.enable = true;

# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};

environment.systemPackages = with pkgs; [
dunst
libnotify
];

# Enable the OpenSSH daemon.
services.openssh.enable = true;

nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;

system.stateVersion = "23.11";

}
Loading

0 comments on commit 24df4ea

Please sign in to comment.