hmm
This commit is contained in:
19
flake.nix
19
flake.nix
@@ -3,13 +3,14 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Nixpkgs
|
# Nixpkgs
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
# Home manager
|
# Home manager
|
||||||
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
home-manager = {
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
@@ -21,8 +22,7 @@
|
|||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# FIXME replace with your hostname
|
cnix = nixpkgs.lib.nixosSystem {
|
||||||
your-hostname = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = {inherit inputs outputs;};
|
||||||
# > Our main nixos configuration file <
|
# > Our main nixos configuration file <
|
||||||
modules = [./nixos/configuration.nix];
|
modules = [./nixos/configuration.nix];
|
||||||
@@ -32,9 +32,8 @@
|
|||||||
# Standalone home-manager configuration entrypoint
|
# Standalone home-manager configuration entrypoint
|
||||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
# FIXME replace with your username@hostname
|
"cnst@cnix" = home-manager.lib.homeManagerConfiguration {
|
||||||
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
|
pkgs = pkgsFor.x86_64-linux;
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
|
||||||
extraSpecialArgs = {inherit inputs outputs;};
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
# > Our main home-manager configuration file <
|
# > Our main home-manager configuration file <
|
||||||
modules = [./home-manager/home.nix];
|
modules = [./home-manager/home.nix];
|
||||||
|
|||||||
@@ -40,13 +40,49 @@
|
|||||||
|
|
||||||
# TODO: Set your username
|
# TODO: Set your username
|
||||||
home = {
|
home = {
|
||||||
username = "your-username";
|
username = "cnst";
|
||||||
homeDirectory = "/home/your-username";
|
homeDirectory = "/home/cnst";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Add stuff for your user as you see fit:
|
# Add stuff for your user as you see fit:
|
||||||
# programs.neovim.enable = true;
|
programs.neovim.enable = true;
|
||||||
# home.packages = with pkgs; [ steam ];
|
home.packages = with pkgs; [
|
||||||
|
# Dev
|
||||||
|
pyright
|
||||||
|
python312Packages.pip
|
||||||
|
python3
|
||||||
|
nodejs_22
|
||||||
|
cargo
|
||||||
|
|
||||||
|
# Utils
|
||||||
|
unzip
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
gzip
|
||||||
|
p7zip
|
||||||
|
ripgrep
|
||||||
|
git
|
||||||
|
wireguard-tools
|
||||||
|
|
||||||
|
# Desktop
|
||||||
|
firefox
|
||||||
|
alacritty
|
||||||
|
wl-clipboard
|
||||||
|
dunst
|
||||||
|
keepassxc
|
||||||
|
ranger
|
||||||
|
xfce.thunar
|
||||||
|
xfce.thunar-volman
|
||||||
|
xfce.thunar-archive-plugin
|
||||||
|
xarchiver
|
||||||
|
gvfs
|
||||||
|
];
|
||||||
|
|
||||||
|
# Hyprland & accessories
|
||||||
|
programs.hyprland.enable = true;
|
||||||
|
programs.waybar.enable = true;
|
||||||
|
programs.nm-applet.indicator = true;
|
||||||
|
|
||||||
|
|
||||||
# Enable home-manager and git
|
# Enable home-manager and git
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
@@ -56,5 +92,5 @@
|
|||||||
systemd.user.startServices = "sd-switch";
|
systemd.user.startServices = "sd-switch";
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "24.05";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,25 +59,56 @@
|
|||||||
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||||
};
|
};
|
||||||
|
|
||||||
# FIXME: Add the rest of your current configuration
|
# System packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
neovim
|
||||||
|
];
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.device = "/dev/vda";
|
||||||
|
boot.loader.grub.useOSProber = true;
|
||||||
|
|
||||||
# TODO: Set your hostname
|
# TODO: Set your hostname
|
||||||
networking.hostName = "your-hostname";
|
networking.hostName = "cnix";
|
||||||
|
|
||||||
|
# Time zone & Locale
|
||||||
|
time.timeZone = "Europe/Stockholm";
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "sv_SE.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "sv_SE.UTF-8";
|
||||||
|
LC_MEASUREMENT = "sv_SE.UTF-8";
|
||||||
|
LC_MONETARY = "sv_SE.UTF-8";
|
||||||
|
LC_NAME = "sv_SE.UTF-8";
|
||||||
|
LC_NUMERIC = "sv_SE.UTF-8";
|
||||||
|
LC_PAPER = "sv_SE.UTF-8";
|
||||||
|
LC_TELEPHONE = "sv_SE.UTF-8";
|
||||||
|
LC_TIME = "sv_SE.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
# COnfigure keymap in X11
|
||||||
|
services.xserver = {
|
||||||
|
layout = "us";
|
||||||
|
xkbVariant = "";
|
||||||
|
};
|
||||||
|
|
||||||
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
|
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
|
||||||
users.users = {
|
users.users = {
|
||||||
# FIXME: Replace with your username
|
cnst = {
|
||||||
your-username = {
|
|
||||||
# TODO: You can set an initial password for your user.
|
# TODO: You can set an initial password for your user.
|
||||||
# If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install.
|
# If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install.
|
||||||
# Be sure to change it (using passwd) after rebooting!
|
# Be sure to change it (using passwd) after rebooting!
|
||||||
initialPassword = "correcthorsebatterystaple";
|
initialPassword = "1234";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
|
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
|
||||||
];
|
];
|
||||||
# TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc)
|
# TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc)
|
||||||
extraGroups = ["wheel"];
|
extraGroups = [ "wheel" "networkmanager" "audio" "video" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -95,5 +126,5 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "24.05";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,23 @@
|
|||||||
# This is just an example, you should generate yours with nixos-generate-config and put it in here.
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
{
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
{
|
||||||
device = "/dev/sda1";
|
imports =
|
||||||
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernalModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||||
|
boot.initrd.kernalModules = [ ];
|
||||||
|
boot.kernalModules = [ "kvm-amd ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
filesSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/66495946-e6f4-48db-bab3-e1d4cafc326d";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set your system kind (needed for flakes)
|
swapDevices = [ ];
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user