aboutsummaryrefslogtreecommitdiff
path: root/nixos/.flake/system
diff options
context:
space:
mode:
authorJacob Janzen <jacob.a.s.janzen@gmail.com>2024-09-27 18:27:52 -0500
committerJacob Janzen <jacob.a.s.janzen@gmail.com>2024-09-27 18:27:52 -0500
commitf7229cd87555011865a1bfbed9e36230d63d891e (patch)
tree048a80d3497b6a96a6c9f9be3957639fb2814593 /nixos/.flake/system
parenta9ce5f278243198310577165bb593a9eededad6c (diff)
move nixos to org
Diffstat (limited to 'nixos/.flake/system')
-rw-r--r--nixos/.flake/system/boot.nix6
-rw-r--r--nixos/.flake/system/boot.org11
-rw-r--r--nixos/.flake/system/core.org (renamed from nixos/.flake/system/core.nix)7
-rw-r--r--nixos/.flake/system/desktop.nix54
-rw-r--r--nixos/.flake/system/desktop.org103
-rw-r--r--nixos/.flake/system/locale.nix6
-rw-r--r--nixos/.flake/system/locale.org11
-rw-r--r--nixos/.flake/system/network.nix15
-rw-r--r--nixos/.flake/system/network.org48
-rw-r--r--nixos/.flake/system/users.nix9
-rw-r--r--nixos/.flake/system/users.org14
11 files changed, 191 insertions, 93 deletions
diff --git a/nixos/.flake/system/boot.nix b/nixos/.flake/system/boot.nix
deleted file mode 100644
index d911b6b..0000000
--- a/nixos/.flake/system/boot.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
- boot.loader.systemd-boot.enable = true;
- boot.loader.efi.canTouchEfiVariables = true;
-}
diff --git a/nixos/.flake/system/boot.org b/nixos/.flake/system/boot.org
new file mode 100644
index 0000000..fe98542
--- /dev/null
+++ b/nixos/.flake/system/boot.org
@@ -0,0 +1,11 @@
+#+title: Boot Configuration
+
+Enable =systemd-boot= as my boot loader.
+#+begin_src nix :tangle ~/.flake/system/boot.nix :mkdirp yes
+{ config, lib, pkgs, ... }:
+
+{
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+}
+#+end_src
diff --git a/nixos/.flake/system/core.nix b/nixos/.flake/system/core.org
index b15a520..e909198 100644
--- a/nixos/.flake/system/core.nix
+++ b/nixos/.flake/system/core.org
@@ -1,7 +1,7 @@
-# Edit this configuration file to define what should be installed on
-# your system. Help is available in the configuration.nix(5) man page, on
-# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
+#+title: System Core
+This file imports various system configuration components in addition to enabling flakes and defining the system version.
+#+begin_src nix :tangle ~/.flake/system/core.nix :mkdirp yes
{ config, lib, pkgs, ... }:
{
@@ -18,3 +18,4 @@
system.stateVersion = "24.05";
}
+#+end_src
diff --git a/nixos/.flake/system/desktop.nix b/nixos/.flake/system/desktop.nix
deleted file mode 100644
index 2e3fa2b..0000000
--- a/nixos/.flake/system/desktop.nix
+++ /dev/null
@@ -1,54 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
- nixpkgs.config.allowUnfree = true;
- security.pam.services.hyprlock = {};
- services.flatpak.enable = true;
- xdg.portal.enable = true;
- services.xserver.enable = true;
- services.greetd = {
- enable = true;
- settings = {
- default_session = {
- command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session --sessions ${pkgs.hyprland}/share/wayland-sessions --cmd \"dbus-run-session Hyprland\"";
- user = "greeter";
- };
- };
- };
- systemd.services.greetd.serviceConfig = {
- Type = "idle";
- StandardInput = "tty";
- StanardOutput = "tty";
- StandardError = "journal";
- TTYReset = true;
- TTYVHangup = true;
- TTYVTDisallocate = true;
- };
-
- programs.hyprland.enable = true;
-
- services.xserver.xkb.layout = "us";
-
- services.pipewire = {
- enable = true;
- pulse.enable = true;
- };
- environment.systemPackages = with pkgs; [
- dolphin
- firefox
- git
- greetd.tuigreet
- kitty
- neovim
- wget
- ];
- environment.sessionVariables.NIXOS_OZONE_WL = "1";
- programs.zsh.enable = true;
- environment.variables.EDITOR = "vim";
- environment.pathsToLink = [ "/share/zsh" ];
-
- programs.gnupg.agent = {
- enable = true;
- enableSSHSupport = true;
- };
-}
diff --git a/nixos/.flake/system/desktop.org b/nixos/.flake/system/desktop.org
new file mode 100644
index 0000000..0bb6a6e
--- /dev/null
+++ b/nixos/.flake/system/desktop.org
@@ -0,0 +1,103 @@
+#+title: Desktop System Configuration
+
+Open the desktop configuration.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ { config, lib, pkgs, ... }:
+
+ {
+#+end_src
+
+Allow unfree packages on this system.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ nixpkgs.config.allowUnfree = true;
+#+end_src
+
+Install necessary packages for the desktop.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ environment.systemPackages = with pkgs; [
+ dolphin
+ firefox
+ git
+ greetd.tuigreet
+ kitty
+ neovim
+ wget
+ ];
+#+end_src
+
+Use Neovim as my default editor.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ environment.variables.EDITOR = "nvim";
+#+end_src
+
+Enable GPG agent globally.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ programs.gnupg.agent = {
+ enable = true;
+ enableSSHSupport = true;
+ };
+#+end_src
+
+Install =zsh= and set up completions.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ programs.zsh.enable = true;
+ environment.pathsToLink = [ "/share/zsh" ];
+#+end_src
+
+Use the =us= keyboard layout.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ services.xserver.xkb.layout = "us";
+#+end_src
+
+Install Hyprland as a window manager.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ services.xserver.enable = true;
+ xdg.portal.enable = true;
+ programs.hyprland.enable = true;
+ environment.sessionVariables.NIXOS_OZONE_WL = "1";
+#+end_src
+
+Enable =pam= support for Hyprlock.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ security.pam.services.hyprlock = {};
+#+end_src
+
+Enable =greetd= with =tuigreet= as my login manager.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ services.greetd = {
+ enable = true;
+ settings = {
+ default_session = {
+ command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session --sessions ${pkgs.hyprland}/share/wayland-sessions --cmd \"dbus-run-session Hyprland\"";
+ user = "greeter";
+ };
+ };
+ };
+ systemd.services.greetd.serviceConfig = {
+ Type = "idle";
+ StandardInput = "tty";
+ StanardOutput = "tty";
+ StandardError = "journal";
+ TTYReset = true;
+ TTYVHangup = true;
+ TTYVTDisallocate = true;
+ };
+#+end_src
+
+Enable PipeWire.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ services.pipewire = {
+ enable = true;
+ pulse.enable = true;
+ };
+#+end_src
+
+Enable Flatpaks.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ services.flatpak.enable = true;
+#+end_src
+
+Close the desktop configuration.
+#+begin_src nix :tangle ~/.flake/system/desktop.nix :mkdirp yes
+ }
+#+end_src
diff --git a/nixos/.flake/system/locale.nix b/nixos/.flake/system/locale.nix
deleted file mode 100644
index 320604a..0000000
--- a/nixos/.flake/system/locale.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
- time.timeZone = "America/Winnipeg";
- i18n.defaultLocale = "en_CA.UTF-8";
-}
diff --git a/nixos/.flake/system/locale.org b/nixos/.flake/system/locale.org
new file mode 100644
index 0000000..63d05a0
--- /dev/null
+++ b/nixos/.flake/system/locale.org
@@ -0,0 +1,11 @@
+#+title: Locale Setup
+
+My timezone is Winnipeg, and I use Canadian English.
+#+begin_src nix :tangle ~/.flake/system/locale.nix :mkdirp yes
+ { config, lib, pkgs, ... }:
+
+ {
+ time.timeZone = "America/Winnipeg";
+ i18n.defaultLocale = "en_CA.UTF-8";
+ }
+#+end_src
diff --git a/nixos/.flake/system/network.nix b/nixos/.flake/system/network.nix
deleted file mode 100644
index 56951de..0000000
--- a/nixos/.flake/system/network.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
- networking.hostName = "nixos";
- networking.networkmanager.enable = true;
- hardware.bluetooth.enable = true;
- hardware.bluetooth.powerOnBoot = true;
- services.blueman.enable = true;
- services.printing.enable = true;
- services.openssh.enable = true;
- networking.firewall = {
- allowedTCPPorts = [ ];
- allowedUDPPorts = [ ];
- };
-}
diff --git a/nixos/.flake/system/network.org b/nixos/.flake/system/network.org
new file mode 100644
index 0000000..06a0251
--- /dev/null
+++ b/nixos/.flake/system/network.org
@@ -0,0 +1,48 @@
+#+title: Network Configuration
+
+Open the network configuration.
+#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
+ { config, lib, pkgs, ... }:
+
+ {
+#+end_src
+
+This system is called =nixos=.
+#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
+ networking.hostName = "nixos";
+#+end_src
+
+I use NetworkManager to configure my network.
+#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
+ networking.networkmanager.enable = true;
+#+end_src
+
+Enable Bluetooth at boot.
+#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
+ hardware.bluetooth.enable = true;
+ hardware.bluetooth.powerOnBoot = true;
+ services.blueman.enable = true;
+#+end_src
+
+Enable printing.
+#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
+ services.printing.enable = true;
+#+end_src
+
+Enable SSH.
+#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
+ services.openssh.enable = true;
+#+end_src
+
+Set up my firewall.
+#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
+ networking.firewall = {
+ allowedTCPPorts = [ ];
+ allowedUDPPorts = [ ];
+ };
+#+end_src
+
+Close the network configuration.
+#+begin_src nix :tangle ~/.flake/system/network.nix :mkdirp yes
+ }
+#+end_src
diff --git a/nixos/.flake/system/users.nix b/nixos/.flake/system/users.nix
deleted file mode 100644
index 59c9e21..0000000
--- a/nixos/.flake/system/users.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
- users.users.jane = {
- shell = pkgs.zsh;
- isNormalUser = true;
- extraGroups = [ "networkmanager" "wheel" ];
- };
-}
diff --git a/nixos/.flake/system/users.org b/nixos/.flake/system/users.org
new file mode 100644
index 0000000..498857a
--- /dev/null
+++ b/nixos/.flake/system/users.org
@@ -0,0 +1,14 @@
+#+title: User Configuration
+
+Set up my user account with =zsh= as default shell with =sudoers= and network management permissions.
+#+begin_src nix :tangle ~/.flake/system/users.nix :mkdirp yes
+{ config, lib, pkgs, ... }:
+
+{
+ users.users.jane = {
+ shell = pkgs.zsh;
+ isNormalUser = true;
+ extraGroups = [ "networkmanager" "wheel" ];
+ };
+}
+#+end_src