-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
451 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; }; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
|
||
} |
Oops, something went wrong.