formatting

This commit is contained in:
Gustav Bruhn 2025-03-18 18:53:18 +01:00
parent 76357f1da8
commit 0bad6fe50e
7 changed files with 77 additions and 50 deletions

View File

@ -12,7 +12,12 @@
}; };
}; };
outputs = { self, nixpkgs, nixos-cosmic, ... }@inputs: { outputs = {
self,
nixpkgs,
nixos-cosmic,
...
} @ inputs: {
# use "nixos", or your hostname as the name of the configuration # use "nixos", or your hostname as the name of the configuration
# it's a better practice than "default" shown in the video # it's a better practice than "default" shown in the video
nixosConfigurations.framework = nixpkgs.lib.nixosSystem { nixosConfigurations.framework = nixpkgs.lib.nixosSystem {

View File

@ -1,16 +1,18 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, inputs, ... }:
{ {
imports = config,
[ # Include the results of the hardware scan. pkgs,
./hardware-configuration.nix inputs,
inputs.home-manager.nixosModules.default ...
../../modules/nixos/cosmic.nix }: {
]; imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
../../modules/nixos/cosmic.nix
];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
@ -46,8 +48,6 @@
LC_TIME = "sv_SE.UTF-8"; LC_TIME = "sv_SE.UTF-8";
}; };
# Configure keymap in X11 # Configure keymap in X11
services.xserver.xkb = { services.xserver.xkb = {
layout = "se"; layout = "se";
@ -83,14 +83,14 @@
users.users.bruhng = { users.users.bruhng = {
isNormalUser = true; isNormalUser = true;
description = "Gustav Bruhn"; description = "Gustav Bruhn";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = ["networkmanager" "wheel"];
packages = with pkgs; [ packages = with pkgs; [
# thunderbird # thunderbird
]; ];
}; };
home-manager = { home-manager = {
extraSpecialArgs = {inherit inputs; }; extraSpecialArgs = {inherit inputs;};
users = { users = {
"bruhng" = import ./home.nix; "bruhng" = import ./home.nix;
}; };
@ -105,10 +105,11 @@
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nil nil
discord discord
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. alejandra
# wget # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
@ -137,5 +138,4 @@
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment? system.stateVersion = "24.11"; # Did you read the comment?
} }

View File

@ -1,32 +1,36 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
]; pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/a76b94ad-7f3e-430f-9b33-c5ba404f4761"; device = "/dev/disk/by-uuid/a76b94ad-7f3e-430f-9b33-c5ba404f4761";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/1AA9-7C35"; device = "/dev/disk/by-uuid/1AA9-7C35";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = ["fmask=0077" "dmask=0077"];
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/7c91c076-9dc5-4e75-b3f8-c81da8bda982"; } {device = "/dev/disk/by-uuid/7c91c076-9dc5-4e75-b3f8-c81da8bda982";}
]; ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View File

@ -1,9 +1,11 @@
{ config, pkgs, ... }: {
config,
{ pkgs,
...
}: {
imports = [ imports = [
../../modules/home-manager/helix.nix ../../modules/home-manager/helix.nix
]; ];
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
home.username = "bruhng"; home.username = "bruhng";

View File

@ -1,9 +1,8 @@
{...}: {...}: {
{
programs.helix = { programs.helix = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
settings ={ settings = {
theme = "catppuccin_mocha"; theme = "catppuccin_mocha";
editor = { editor = {
line-number = "relative"; line-number = "relative";

View File

@ -1,6 +1,8 @@
{configs, pkgs, ...}:
{ {
configs,
pkgs,
...
}: {
services.desktopManager.cosmic.enable = true; services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true; services.displayManager.cosmic-greeter.enable = true;

View File

@ -0,0 +1,15 @@
with import <nixpkgs> {};
writeShellScriptBin "nixUpdate" ''
set -e
pushd ~/nixos/
# if git diff --quiet '*.nix'; then
# echo "no changes"
# popd
# exit 0
# fi
''