authorgravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2023-12-28 21:33:09-08:00
committergravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2023-12-28 21:33:09-08:00
logc0c427ecc904d8c83ad7f0a10cbc4909aef6999e
tree6e97572268c790de85d9acf2dfd85a0c518ead84

base system


5 files changed, 401 insertions(+), 0 deletions(-)

configuration.nix created+198
...@@ -0,0 +1,198 @@
1#<BS> Edit this configuration file to define what should be installed on
2# your system. Help is available in the configuration.nix(5) man page
3# and in the NixOS manual (accessible by running ‘nixos-help’).
4
5{ config, pkgs, ... }:
6
7{
8 nix.settings.experimental-features = [ "nix-command" "flakes" ];
9 programs.hyprland.enable = true;
10 programs.zsh = {
11 enable = true;
12 ohMyZsh = {
13 enable = true;
14 plugins = ["git" "zsh-autosuggestions" "zsh-autocomplete" "sudo"];
15 theme = "powerlevel10k";
16};
17};
18
19 imports =
20 [ # Include the results of the hardware scan.
21 ./hardware-configuration.nix
22 ];
23
24 # Enable OpenGL
25 hardware.opengl = {
26 enable = true;
27 driSupport = true;
28 driSupport32Bit = true;
29 };
30 services.xserver.videoDrivers = ["nvidia"];
31
32 hardware.nvidia = {
33
34 # Modesetting is required.
35 modesetting.enable = true;
36
37 # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
38 powerManagement.enable = false;
39 # Fine-grained power management. Turns off GPU when not in use.
40 # Experimental and only works on modern Nvidia GPUs (Turing or newer).
41 powerManagement.finegrained = false;
42
43 # Use the NVidia open source kernel module (not to be confused with the
44 # independent third-party "nouveau" open source driver).
45 # Support is limited to the Turing and later architectures. Full list of
46 # supported GPUs is at:
47 # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
48 # Only available from driver 515.43.04+
49 # Currently alpha-quality/buggy, so false is currently the recommended setting.
50 open = false;
51
52 # Enable the Nvidia settings menu,
53 # accessible via `nvidia-settings`.
54 nvidiaSettings = true;
55
56 # Optionally, you may need to select the appropriate driver version for your specific GPU.
57 package = config.boot.kernelPackages.nvidiaPackages.stable;
58 };
59 # Bootloader.
60 #boot.loader.systemd-boot.enable = true;
61 #boot.loader.efi.canTouchEfiVariables = true;
62
63 boot.loader = {
64 efi = {
65 canTouchEfiVariables = true;
66 # assuming /boot is the mount point of the EFI partition in NixOS (as the installation section recommends).
67 efiSysMountPoint = "/boot";
68 };
69 grub = {
70 enable = true;
71 devices = [ "nodev" ];
72 useOSProber = true;
73 };
74 };
75 networking.hostName = "nixos"; # Define your hostname.
76 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
77
78 # Configure network proxy if necessary
79 # networking.proxy.default = "http://user:password@proxy:port/";
80 # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
81
82 # Enable networking
83 networking.networkmanager.enable = true;
84
85 # Set your time zone.
86 time.timeZone = "America/Los_Angeles";
87
88 # Select internationalisation properties.
89 i18n.defaultLocale = "en_US.UTF-8";
90
91 i18n.extraLocaleSettings = {
92 LC_ADDRESS = "en_US.UTF-8";
93 LC_IDENTIFICATION = "en_US.UTF-8";
94 LC_MEASUREMENT = "en_US.UTF-8";
95 LC_MONETARY = "en_US.UTF-8";
96 LC_NAME = "en_US.UTF-8";
97 LC_NUMERIC = "en_US.UTF-8";
98 LC_PAPER = "en_US.UTF-8";
99 LC_TELEPHONE = "en_US.UTF-8";
100 LC_TIME = "en_US.UTF-8";
101 };
102
103 # Enable the X11 windowing system.
104 services.xserver.enable = true;
105
106 # Enable the KDE Plasma Desktop Environment.
107 services.xserver.displayManager.sddm.enable = true;
108 services.xserver.desktopManager.plasma5.enable = true;
109
110 # Configure keymap in X11
111 services.xserver = {
112 layout = "us";
113 xkbVariant = "";
114 };
115
116 # Enable CUPS to print documents.
117 services.printing.enable = true;
118
119 # Enable sound with pipewire.
120 sound.enable = true;
121 hardware.pulseaudio.enable = false;
122 security.rtkit.enable = true;
123 services.pipewire = {
124 enable = true;
125 alsa.enable = true;
126 alsa.support32Bit = true;
127 pulse.enable = true;
128 # If you want to use JACK applications, uncomment this
129 #jack.enable = true;
130
131 # use the example session manager (no others are packaged yet so this is enabled by default,
132 # no need to redefine it in your config for now)
133 #media-session.enable = true;
134 };
135
136 # Enable touchpad support (enabled default in most desktopManager).
137 # services.xserver.libinput.enable = true;
138
139 # Define a user account. Don't forget to set a password with ‘passwd’.
140 users.users.nmarks = {
141 isNormalUser = true;
142 description = "Natalie Marks";
143 extraGroups = [ "networkmanager" "wheel" ];
144 packages = with pkgs; [
145 firefox
146 kate
147 vim
148 discord
149 kitty
150
151 # thunderbird
152 ];
153 };
154 programs.neovim = {
155 enable = true;
156 defaultEditor = true;
157};
158 environment.variables.EDITOR = "nvim";
159
160 # Allow unfree packages
161 nixpkgs.config.allowUnfree = true;
162
163 # List packages installed in system profile. To search, run:
164 # $ nix search wget
165 environment.systemPackages = with pkgs; [
166 vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
167 wget
168 git
169 ];
170
171 # Some programs need SUID wrappers, can be configured further or are
172 # started in user sessions.
173 programs.mtr.enable = true;
174 programs.gnupg.agent = {
175 enable = true;
176 enableSSHSupport = true;
177 };
178
179 # List services that you want to enable:
180
181 # Enable the OpenSSH daemon.
182 services.openssh.enable = true;
183
184 # Open ports in the firewall.
185 # networking.firewall.allowedTCPPorts = [ ... ];
186 # networking.firewall.allowedUDPPorts = [ ... ];
187 # Or disable the firewall altogether.
188 # networking.firewall.enable = false;
189
190 # This value determines the NixOS release from which the default
191 # settings for stateful data, like file locations and database versions
192 # on your system were taken. It‘s perfectly fine and recommended to leave
193 # this value at the release version of the first install of this system.
194 # Before changing this value read the documentation for this option
195 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
196 system.stateVersion = "23.05"; # Did you read the comment?
197
198}
flake.lock created+48
...@@ -0,0 +1,48 @@
1{
2 "nodes": {
3 "home-manager": {
4 "inputs": {
5 "nixpkgs": [
6 "nixpkgs"
7 ]
8 },
9 "locked": {
10 "lastModified": 1703367386,
11 "narHash": "sha256-FMbm48UGrBfOWGt8+opuS+uLBLQlRfhiYXhHNcYMS5k=",
12 "owner": "nix-community",
13 "repo": "home-manager",
14 "rev": "d5824a76bc6bb93d1dce9ebbbcb09a9b6abcc224",
15 "type": "github"
16 },
17 "original": {
18 "owner": "nix-community",
19 "ref": "release-23.11",
20 "repo": "home-manager",
21 "type": "github"
22 }
23 },
24 "nixpkgs": {
25 "locked": {
26 "lastModified": 1703467016,
27 "narHash": "sha256-/5A/dNPhbQx/Oa2d+Get174eNI3LERQ7u6WTWOlR1eQ=",
28 "owner": "NixOS",
29 "repo": "nixpkgs",
30 "rev": "d02d818f22c777aa4e854efc3242ec451e5d462a",
31 "type": "github"
32 },
33 "original": {
34 "id": "nixpkgs",
35 "ref": "nixos-23.11",
36 "type": "indirect"
37 }
38 },
39 "root": {
40 "inputs": {
41 "home-manager": "home-manager",
42 "nixpkgs": "nixpkgs"
43 }
44 }
45 },
46 "root": "root",
47 "version": 7
48}
flake.nix created+37
...@@ -0,0 +1,37 @@
1{
2 description = "My first flake!";
3
4 inputs = {
5 nixpkgs.url = "nixpkgs/nixos-23.11";
6 home-manager = {
7 url = "github:nix-community/home-manager/release-23.11";
8 inputs.nixpkgs.follows = "nixpkgs";
9 };
10
11 # use the following for unstable:
12 # nixpkgs.url = "nixpkgs/nixos-unstable";
13
14 # or any branch you want:
15 # nixpkgs.url = "nixpkgs/{BRANCH-NAME}"
16 };
17
18 outputs = { self, home-manager, nixpkgs, ... }:
19 let
20 system = "x86_64-linux";
21 lib = nixpkgs.lib;
22 pkgs = nixpkgs.legacyPackages.${system};
23 in {
24 nixosConfigurations = {
25 nmarks = lib.nixosSystem {
26 inherit system;
27 modules = [ ./configuration.nix ];
28 };
29 };
30 homeConfigurations = {
31 nmarks = home-manager.lib.homeManagerConfiguration {
32 inherit pkgs;
33 modules = [ ./home.nix ];
34 };
35 };
36 };
37}
hardware-configuration.nix created+40
...@@ -0,0 +1,40 @@
1# Do not modify this file! It was generated by ‘nixos-generate-config’
2# and may be overwritten by future invocations. Please make changes
3# to /etc/nixos/configuration.nix instead.
4{ config, lib, pkgs, modulesPath, ... }:
5
6{
7 imports =
8 [ (modulesPath + "/installer/scan/not-detected.nix")
9 ];
10
11 boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
12 boot.initrd.kernelModules = [ ];
13 boot.kernelModules = [ "kvm-amd" "wl" ];
14 boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
15
16 fileSystems."/" =
17 { device = "/dev/disk/by-uuid/5838d50d-e6e8-4ad2-a25e-524f4c46da35";
18 fsType = "ext4";
19 };
20
21 fileSystems."/boot" =
22 { device = "/dev/disk/by-uuid/2319-EE79";
23 fsType = "vfat";
24 };
25
26 swapDevices =
27 [ { device = "/dev/disk/by-uuid/a4128bb9-239c-4aa9-9777-5067feb77b28"; }
28 ];
29
30 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
31 # (the default) this is the recommended approach. When using systemd-networkd it's
32 # still possible to use this option, but it's recommended to use it in conjunction
33 # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
34 networking.useDHCP = lib.mkDefault true;
35 # networking.interfaces.enp34s0.useDHCP = lib.mkDefault true;
36 # networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
37
38 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
39 hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
40}
home.nix created+78
...@@ -0,0 +1,78 @@
1{ config, pkgs, ... }:
2
3{
4 # Home Manager needs a bit of information about you and the paths it should
5 # manage.
6 home.username = "nmarks";
7 home.homeDirectory = "/home/nmarks";
8
9 # This value determines the Home Manager release that your configuration is
10 # compatible with. This helps avoid breakage when a new Home Manager release
11 # introduces backwards incompatible changes.
12 #
13 # You should not change this value, even if you update Home Manager. If you do
14 # want to update the value, then make sure to first check the Home Manager
15 # release notes.
16 home.stateVersion = "23.05"; # Please read the comment before changing.
17
18 # The home.packages option allows you to install Nix packages into your
19 # environment.
20 home.packages = with pkgs; [
21 # # Adds the 'hello' command to your environment. It prints a friendly
22 # # "Hello, world!" when run.
23 # pkgs.hello
24
25 # # It is sometimes useful to fine-tune packages, for example, by applying
26 # # overrides. You can do that directly here, just don't forget the
27 # # parentheses. Maybe you want to install Nerd Fonts with a limited number of
28 # # fonts?
29 # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
30
31 # # You can also create simple shell scripts directly inside your
32 # # configuration. For example, this adds a command 'my-hello' to your
33 # # environment:
34 # (pkgs.writeShellScriptBin "my-hello" ''
35 # echo "Hello, ${config.home.username}!"
36 # '')
37 ];
38 programs.neovim = {
39 viAlias = true;
40 vimAlias = true;
41 };
42 #Link neovim config into nix
43 xdg.configFile.nvim.source = ./nvim;
44
45
46
47 # Home Manager is pretty good at managing dotfiles. The primary way to manage
48 # plain files is through 'home.file'.
49 home.file = {
50 # # Building this configuration will create a copy of 'dotfiles/screenrc' in
51 # # the Nix store. Activating the configuration will then make '~/.screenrc' a
52 # # symlink to the Nix store copy.
53 # ".screenrc".source = dotfiles/screenrc;
54
55 # # You can also set the file content immediately.
56 # ".gradle/gradle.properties".text = ''
57 # org.gradle.console=verbose
58 # org.gradle.daemon.idletimeout=3600000
59 # '';
60 };
61
62 # You can also manage environment variables but you will have to manually
63 # source
64 #
65 # ~/.nix-profile/etc/profile.d/hm-session-vars.sh
66 #
67 # or
68 #
69 # /etc/profiles/per-user/nmarks/etc/profile.d/hm-session-vars.sh
70 #
71 # if you don't want to manage your shell through Home Manager.
72 home.sessionVariables = {
73 # EDITOR = "emacs";
74 };
75
76 # Let Home Manager install and manage itself.
77 programs.home-manager.enable = true;
78}