setup jade

This commit is contained in:
♥ Minnie ♥ 2023-05-02 08:52:44 +08:00
parent fb35749e62
commit 296b80ec16
14 changed files with 262 additions and 162 deletions

View file

@ -11,6 +11,11 @@
# inputs.nix-colors.homeManagerModules.default
# You can also split up your configuration and import pieces of it here:
# Jasmine's Desktop Environment
./jade/default.nix
# Programs
./programs/discocss.nix
./programs/git.nix
./programs/mangohud.nix
@ -60,11 +65,8 @@
packages = with pkgs; [
discord
spotify
# pkgs.unstable
unstable.prismlauncher
prismlauncher
];
file.".xinitrc".source = ./xinitrc;
};
# Copy user configuration

View file

@ -0,0 +1,20 @@
{ inputs, outputs, lib, config, pkgs, ... }:
{
imports = [
./xmonad
];
home.packages = with pkgs; [
dmenu
feh
wezterm
];
xdg.configFile = {
wezterm = { source = ./wezterm; recursive = true; };
};
home.file.".xinitrc".source = ./xinitrc;
}

10
home-manager/jade/xinitrc Normal file
View file

@ -0,0 +1,10 @@
#/bin/bash
# Setup our monitors
xrandr --output HDMI-A-0 --mode 1920x1080 --output DisplayPort-0 --mode 2560x1440 --right-of HDMI-A-0
# Apply our wallpaper
feh --bg-scale /etc/nixos/assets/chinatown.png
# Launch our window manager
exec xmonad

View file

View file

@ -0,0 +1,28 @@
BSD 3-Clause License
Copyright (c) 2023, sajenim
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -0,0 +1 @@
# xmobar-jsm

View file

@ -0,0 +1,80 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1680392223,
"narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"haskell-flake": {
"locked": {
"lastModified": 1682714267,
"narHash": "sha256-DsGj9AIKqKcWQQOuwbFU77rkehaICzISHhH7aezZ6OQ=",
"owner": "srid",
"repo": "haskell-flake",
"rev": "a904caac3e4638f84a28102762bf767dd1ae50c0",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "haskell-flake",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1682779028,
"narHash": "sha256-tFfSbwSLobpHRznAa35KEU3R+fsFWTlmpFhTUdXq8RE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "54abe781c482f51ff4ff534ebaba77db5bd97442",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1680213900,
"narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e3652e0735fbec227f342712f180f4f21f0594f2",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"haskell-flake": "haskell-flake",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -0,0 +1,46 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake";
};
outputs = inputs@{ self, nixpkgs, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [ inputs.haskell-flake.flakeModule ];
perSystem = { self', pkgs, ... }: {
# Typically, you just want a single project named "default". But
# multiple projects are also possible, each using different GHC version.
haskellProjects.default = {
# If you have a .cabal file in the root, this option is determined
# automatically. Otherwise, specify all your local packages here.
# packages.example.root = ./.;
# The base package set representing a specific GHC version.
# By default, this is pkgs.haskellPackages.
# You may also create your own. See https://haskell.flake.page/package-set
# basePackages = pkgs.haskellPackages;
# Dependency overrides go here. See https://haskell.flake.page/dependency
# source-overrides = { };
# overrides = self: super: { };
# devShell = {
# # Enabled by default
# enable = true;
#
# # Programs you want to make available in the shell.
# # Default programs can be disabled by setting to 'null'
# tools = hp: { fourmolu = hp.fourmolu; ghcid = null; };
#
# hlsCheck.enable = true;
# };
};
# haskell-flake doesn't set the default package, but you can do it here.
packages.default = self'.packages.xmobar-jsm;
};
};
}

View file

@ -0,0 +1,47 @@
import Xmobar
-- | Configuration
config :: Config
config = defaultConfig
-- general settings
{ font = "Fira Code Semi Bold 9"
, additionalFonts = [ "Symbols Nerd Font 2048-em 24" ]
, bgColor = bg1
, fgColor = fg0
, position = Static { xpos = 1920, ypos = 0, width = 2560, height = 24 }
-- commands to run
, commands =
[ Run $ XPropertyLog "_XMONAD_LOG_1"
, Run $ Com "uname" ["-r","-s"] "" 0
, Run $ Date "%a %b %_d %Y <fc=#d8a657>%H:%M:%S</fc>" "date" 10
, Run $ Weather "YPJT"
[ "-t", "Temp: <fc=#d3869b><tempC>C</fc> <fc=#7c6f64>|</fc> Wind: <fc=#a9b665><windKmh>km/h</fc> <fc=#7c6f64>|</fc> Humidity: <fc=#e78a4e><rh>%</fc>" ]
18000
]
-- format our bar
, sepChar = "%"
, alignSep = "}{"
, template = "<hspace=6/><fn=1>\59255</fn> <fc=#a9b665>%uname%</fc> <fc=#7c6f64>|</fc>%_XMONAD_LOG_1%}{%YPJT% <fc=#7c6f64>|</fc> %date%<hspace=6/>"
}
-- | Gruvbox material
bg0, bg1, fg0, fg1, red, orange, yellow, green, aqua, blue, purple :: String
-- backgrounds
bg0 = "#1d2021"
bg1 = "#282828"
-- foregrounds
fg0 = "#d4be98"
fg1 = "#ddc7a1"
-- greys
grey0 = "#7c6f64"
-- colors
red = "#ea6962"
orange = "#e78a4e"
yellow = "#d8a658"
green = "#a9b665"
aqua = "#89b482"
blue = "#7daea3"
purple = "#d3869b"
main :: IO ()
main = configFromArgs config >>= xmobar

View file

@ -0,0 +1,21 @@
cabal-version: 3.0
name: xmobar-jsm
version: 0.1.0.0
synopsis: A Minimalistic Text Based Status Bar
description: my xmobar configuration
license: BSD-3-Clause
license-file: LICENSE
author: sajenim
maintainer: its.jassy@pm.me
homepage: https://github.com/sajenim/jade
build-type: Simple
extra-source-files: README.md
executable xmobar-top
main-is: xmobar-top.hs
hs-source-dirs: src
ghc-options: -Wall -threaded
build-depends: base,
xmobar
default-language: Haskell2010

View file

@ -0,0 +1,10 @@
{ inputs, outputs, lib, config, pkgs, ... }:
{
xsession.windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
config = /etc/nixos/home-manager/jade/xmonad/xmonad-jsm/src/xmonad.hs;
};
}

@ -0,0 +1 @@
Subproject commit 9b39c82ae4bb5f29fa81eaf7d6a7111653cedcf0