This commit is contained in:
Gustav Bruhn 2025-08-24 20:24:36 +02:00
parent 3b62fac314
commit 1bd4a22c68
4 changed files with 109 additions and 94 deletions

18
flake.lock generated
View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1754886238,
"narHash": "sha256-LTQomWOwG70lZR+78ZYSZ9sYELWNq3HJ7/tdHzfif/s=",
"lastModified": 1756022458,
"narHash": "sha256-J1i35r4HfNDdPpwL0vOBaZopQudAUVtartEerc1Jryc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0d492b89d1993579e63b9dbdaed17fd7824834da",
"rev": "9e3a33c0bcbc25619e540b9dfea372282f8a9740",
"type": "github"
},
"original": {
@ -22,11 +22,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1754564048,
"narHash": "sha256-dz303vGuzWjzOPOaYkS9xSW+B93PSAJxvBd6CambXVA=",
"lastModified": 1755330281,
"narHash": "sha256-aJHFJWP9AuI8jUGzI77LYcSlkA9wJnOIg4ZqftwNGXA=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "26ed7a0d4b8741fe1ef1ee6fa64453ca056ce113",
"rev": "3dac8a872557e0ca8c083cdcfc2f218d18e113b0",
"type": "github"
},
"original": {
@ -38,11 +38,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1754725699,
"narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
"lastModified": 1755615617,
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054",
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
"type": "github"
},
"original": {

View File

@ -7,8 +7,7 @@
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
../../modules/nixos/cosmic.nix
../../modules/nixos/common.nix
];
# Bootloader.
boot.loader = {
@ -29,61 +28,6 @@
networking.hostName = "desktop"; # Define your hostname.
nix.settings.experimental-features = ["nix-command" "flakes"];
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Stockholm";
# Select internationalisation properties.
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.xkb = {
layout = "se";
variant = "";
};
# Configure console keymap
console.keyMap = "sv-latin1";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
users.users.bruhng = {
isNormalUser = true;
description = "Gustav Bruhn";
extraGroups = ["networkmanager" "wheel"];
};
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
home-manager = {
extraSpecialArgs = {inherit inputs;};
users = {
@ -91,32 +35,5 @@
};
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
nil
discord
alejandra
inputs.zen-browser.packages.${pkgs.system}.default
tmux
fastfetch
nmap
spotify
evince
loupe
];
programs.steam.enable = true;
# List services that you want to enable:
services.fwupd.enable = true;
security.polkit.enable = true;
# fonts
fonts.packages = with pkgs; [
nerd-fonts.jetbrains-mono
];
system.stateVersion = "25.05"; # Do not channge
}

98
modules/nixos/common.nix Normal file
View File

@ -0,0 +1,98 @@
{
config,
pkgs,
inputs,
...
}: {
imports = [
inputs.home-manager.nixosModules.default
../../modules/nixos/cosmic.nix
];
nix.settings.experimental-features = ["nix-command" "flakes"];
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Stockholm";
# Select internationalisation properties.
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.xkb = {
layout = "se";
variant = "";
};
# Configure console keymap
console.keyMap = "sv-latin1";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
users.users.bruhng = {
isNormalUser = true;
description = "Gustav Bruhn";
extraGroups = ["networkmanager" "wheel"];
};
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
nil
discord
alejandra
inputs.zen-browser.packages.${pkgs.system}.default
tmux
fastfetch
nmap
spotify
evince
loupe
];
programs.steam.enable = true;
# List services that you want to enable:
services.fwupd.enable = true;
security.polkit.enable = true;
# fonts
fonts.packages = with pkgs; [
nerd-fonts.jetbrains-mono
];
}

View File

@ -20,7 +20,7 @@ fi
git add .
echo "New changes, Rebuilding..."
sudo nixos-rebuild switch --upgrade --flake . --specialisation $(cat /etc/active-specialisation)
sudo nixos-rebuild switch --upgrade --flake .
current=$(nixos-rebuild list-generations | grep current)